blob: 40b2d330491150555b4751eb56fb84b2f2ba6fdc [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_SETUP_H
2#define _ASM_X86_SETUP_H
Thomas Gleixneref685292007-10-23 22:37:24 +02003
4#define COMMAND_LINE_SIZE 2048
5
Glauber de Oliveira Costa746ef0c2008-01-30 13:31:11 +01006#ifndef __ASSEMBLY__
Glauber Costa2785c8d2008-02-11 17:16:03 -02007
8/* Interrupt control for vSMPowered x86_64 systems */
9void vsmp_init(void);
10
Ingo Molnar3b335532008-07-10 17:30:40 +020011#ifdef CONFIG_X86_VISWS
12extern void visws_early_detect(void);
Ingo Molnar5548ed12008-07-10 16:53:21 +020013extern int is_visws_box(void);
Ingo Molnar3b335532008-07-10 17:30:40 +020014#else
15static inline void visws_early_detect(void) { }
Ingo Molnar5548ed12008-07-10 16:53:21 +020016static inline int is_visws_box(void) { return 0; }
Ingo Molnar3b335532008-07-10 17:30:40 +020017#endif
18
Yinghai Lu569712b2008-11-16 03:12:49 -080019extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
Ingo Molnar3b335532008-07-10 17:30:40 +020020/*
21 * Any setup quirks to be performed?
22 */
Yinghai Lu64898a82008-07-19 18:01:16 -070023struct mpc_config_processor;
24struct mpc_config_bus;
25struct mp_config_oemtable;
Yinghai Lu3c9cb6d2008-07-19 02:07:25 -070026struct x86_quirks {
Yinghai Lu63b5d7a2008-07-19 18:02:26 -070027 int (*arch_pre_time_init)(void);
Yinghai Lu3c9cb6d2008-07-19 02:07:25 -070028 int (*arch_time_init)(void);
29 int (*arch_pre_intr_init)(void);
30 int (*arch_intr_init)(void);
31 int (*arch_trap_init)(void);
32 char * (*arch_memory_setup)(void);
33 int (*mach_get_smp_config)(unsigned int early);
34 int (*mach_find_smp_config)(unsigned int reserve);
Yinghai Lu64898a82008-07-19 18:01:16 -070035
36 int *mpc_record;
37 int (*mpc_apic_id)(struct mpc_config_processor *m);
38 void (*mpc_oem_bus_info)(struct mpc_config_bus *m, char *name);
39 void (*mpc_oem_pci_bus)(struct mpc_config_bus *m);
40 void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable,
41 unsigned short oemsize);
Yinghai Lua4dbc342008-07-25 02:14:28 -070042 int (*setup_ioapic_ids)(void);
Yinghai Lu569712b2008-11-16 03:12:49 -080043 int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip);
Yinghai Lu3c9cb6d2008-07-19 02:07:25 -070044};
45
46extern struct x86_quirks *x86_quirks;
Jaswinder Singh5314d482008-07-21 22:12:23 +053047extern unsigned long saved_video_mode;
Ingo Molnar3b335532008-07-10 17:30:40 +020048
Glauber de Oliveira Costa746ef0c2008-01-30 13:31:11 +010049#ifndef CONFIG_PARAVIRT
50#define paravirt_post_allocator_init() do {} while (0)
51#endif
52#endif /* __ASSEMBLY__ */
53
Thomas Gleixner96a388d2007-10-11 11:20:03 +020054#ifdef __KERNEL__
Thomas Gleixneref685292007-10-23 22:37:24 +020055
56#ifdef __i386__
57
58#include <linux/pfn.h>
59/*
60 * Reserved space for vmalloc and iomap - defined in asm/page.h
61 */
62#define MAXMEM_PFN PFN_DOWN(MAXMEM)
63#define MAX_NONPAE_PFN (1 << 20)
64
Thomas Gleixneref685292007-10-23 22:37:24 +020065#endif /* __i386__ */
66
H. Peter Anvinfa76dab2007-10-23 22:37:25 +020067#define PARAM_SIZE 4096 /* sizeof(struct boot_params) */
68
69#define OLD_CL_MAGIC 0xA33F
70#define OLD_CL_ADDRESS 0x020 /* Relative to real mode data */
71#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
72
Thomas Gleixneref685292007-10-23 22:37:24 +020073#ifndef __ASSEMBLY__
74#include <asm/bootparam.h>
75
H. Peter Anvinfa76dab2007-10-23 22:37:25 +020076#ifndef _SETUP
77
Thomas Gleixneref685292007-10-23 22:37:24 +020078/*
79 * This is set up by the setup-routine at boot-time
80 */
81extern struct boot_params boot_params;
82
Thomas Gleixneref685292007-10-23 22:37:24 +020083/*
84 * Do NOT EVER look at the BIOS memory size location.
85 * It does not work on many machines.
86 */
87#define LOWMEMSIZE() (0x9f000)
88
Yinghai Lu95a71a42008-06-18 17:27:08 -070089#ifdef __i386__
90
Yinghai Luf0d43102008-05-29 12:56:36 -070091void __init i386_start_kernel(void);
Yinghai Lua9c11822008-06-21 15:39:41 -070092extern void probe_roms(void);
Yinghai Luf0d43102008-05-29 12:56:36 -070093
94extern unsigned long init_pg_tables_start;
Thomas Gleixneref685292007-10-23 22:37:24 +020095extern unsigned long init_pg_tables_end;
96
Jeremy Fitzhardinge102e3b82008-06-25 00:19:09 -040097#else
Jeremy Fitzhardinge5b09b282008-07-08 15:06:42 -070098void __init x86_64_init_pda(void);
Jeremy Fitzhardinge102e3b82008-06-25 00:19:09 -040099void __init x86_64_start_kernel(char *real_mode);
Jeremy Fitzhardingef97013f2008-06-25 00:19:18 -0400100void __init x86_64_start_reservations(char *real_mode_data);
101
Thomas Gleixneref685292007-10-23 22:37:24 +0200102#endif /* __i386__ */
H. Peter Anvinfa76dab2007-10-23 22:37:25 +0200103#endif /* _SETUP */
Thomas Gleixneref685292007-10-23 22:37:24 +0200104#endif /* __ASSEMBLY__ */
105#endif /* __KERNEL__ */
106
H. Peter Anvin1965aae2008-10-22 22:26:29 -0700107#endif /* _ASM_X86_SETUP_H */