11965aae3SH. Peter Anvin #ifndef _ASM_X86_SETUP_H 21965aae3SH. Peter Anvin #define _ASM_X86_SETUP_H 3bb898558SAl Viro 4dbca1df4SCyrill Gorcunov #ifdef __KERNEL__ 5dbca1df4SCyrill Gorcunov 6bb898558SAl Viro #define COMMAND_LINE_SIZE 2048 7bb898558SAl Viro 8bb898558SAl Viro #ifndef __ASSEMBLY__ 9bb898558SAl Viro 10bb898558SAl Viro /* 11bb898558SAl Viro * Any setup quirks to be performed? 12bb898558SAl Viro */ 13f4f21b71SJaswinder Singh Rajput struct mpc_cpu; 1400fb8606SJaswinder Singh Rajput struct mpc_bus; 15b0e239ffSJaswinder Singh Rajput struct mpc_oemtable; 168e6dafd6SIngo Molnar 17bb898558SAl Viro struct x86_quirks { 18bb898558SAl Viro int (*arch_pre_time_init)(void); 19bb898558SAl Viro int (*arch_time_init)(void); 20bb898558SAl Viro int (*arch_pre_intr_init)(void); 21bb898558SAl Viro int (*arch_intr_init)(void); 22bb898558SAl Viro int (*arch_trap_init)(void); 23bb898558SAl Viro char * (*arch_memory_setup)(void); 24bb898558SAl Viro int (*mach_get_smp_config)(unsigned int early); 25bb898558SAl Viro int (*mach_find_smp_config)(unsigned int reserve); 26bb898558SAl Viro 27bb898558SAl Viro int *mpc_record; 28f4f21b71SJaswinder Singh Rajput int (*mpc_apic_id)(struct mpc_cpu *m); 2900fb8606SJaswinder Singh Rajput void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name); 3000fb8606SJaswinder Singh Rajput void (*mpc_oem_pci_bus)(struct mpc_bus *m); 31b0e239ffSJaswinder Singh Rajput void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable, 32bb898558SAl Viro unsigned short oemsize); 33bb898558SAl Viro int (*setup_ioapic_ids)(void); 34bb898558SAl Viro }; 35bb898558SAl Viro 368e6dafd6SIngo Molnar extern void x86_quirk_pre_intr_init(void); 378e6dafd6SIngo Molnar extern void x86_quirk_intr_init(void); 388e6dafd6SIngo Molnar 398e6dafd6SIngo Molnar extern void x86_quirk_trap_init(void); 408e6dafd6SIngo Molnar 418e6dafd6SIngo Molnar extern void x86_quirk_pre_time_init(void); 428e6dafd6SIngo Molnar extern void x86_quirk_time_init(void); 438e6dafd6SIngo Molnar 44bb898558SAl Viro #endif /* __ASSEMBLY__ */ 45bb898558SAl Viro 46bb898558SAl Viro #ifdef __i386__ 47bb898558SAl Viro 48bb898558SAl Viro #include <linux/pfn.h> 49bb898558SAl Viro /* 50bb898558SAl Viro * Reserved space for vmalloc and iomap - defined in asm/page.h 51bb898558SAl Viro */ 52bb898558SAl Viro #define MAXMEM_PFN PFN_DOWN(MAXMEM) 53bb898558SAl Viro #define MAX_NONPAE_PFN (1 << 20) 54bb898558SAl Viro 55bb898558SAl Viro #endif /* __i386__ */ 56bb898558SAl Viro 57bb898558SAl Viro #define PARAM_SIZE 4096 /* sizeof(struct boot_params) */ 58bb898558SAl Viro 59bb898558SAl Viro #define OLD_CL_MAGIC 0xA33F 60bb898558SAl Viro #define OLD_CL_ADDRESS 0x020 /* Relative to real mode data */ 61bb898558SAl Viro #define NEW_CL_POINTER 0x228 /* Relative to real mode data */ 62bb898558SAl Viro 63bb898558SAl Viro #ifndef __ASSEMBLY__ 64bb898558SAl Viro #include <asm/bootparam.h> 65bb898558SAl Viro 6615c55443SJaswinder Singh Rajput /* Interrupt control for vSMPowered x86_64 systems */ 67*129d8bc8SYinghai Lu #ifdef CONFIG_X86_VSMP 6815c55443SJaswinder Singh Rajput void vsmp_init(void); 69*129d8bc8SYinghai Lu #else 70*129d8bc8SYinghai Lu static inline void vsmp_init(void) { } 71*129d8bc8SYinghai Lu #endif 7215c55443SJaswinder Singh Rajput 7315c55443SJaswinder Singh Rajput void setup_bios_corruption_check(void); 7415c55443SJaswinder Singh Rajput 7515c55443SJaswinder Singh Rajput #ifdef CONFIG_X86_VISWS 7615c55443SJaswinder Singh Rajput extern void visws_early_detect(void); 7715c55443SJaswinder Singh Rajput extern int is_visws_box(void); 7815c55443SJaswinder Singh Rajput #else 7915c55443SJaswinder Singh Rajput static inline void visws_early_detect(void) { } 8015c55443SJaswinder Singh Rajput static inline int is_visws_box(void) { return 0; } 8115c55443SJaswinder Singh Rajput #endif 8215c55443SJaswinder Singh Rajput 8315c55443SJaswinder Singh Rajput extern struct x86_quirks *x86_quirks; 8415c55443SJaswinder Singh Rajput extern unsigned long saved_video_mode; 8515c55443SJaswinder Singh Rajput 8615c55443SJaswinder Singh Rajput #ifndef CONFIG_PARAVIRT 8715c55443SJaswinder Singh Rajput #define paravirt_post_allocator_init() do {} while (0) 8815c55443SJaswinder Singh Rajput #endif 8915c55443SJaswinder Singh Rajput 90bb898558SAl Viro #ifndef _SETUP 91bb898558SAl Viro 92bb898558SAl Viro /* 93bb898558SAl Viro * This is set up by the setup-routine at boot-time 94bb898558SAl Viro */ 95bb898558SAl Viro extern struct boot_params boot_params; 96bb898558SAl Viro 97bb898558SAl Viro /* 98bb898558SAl Viro * Do NOT EVER look at the BIOS memory size location. 99bb898558SAl Viro * It does not work on many machines. 100bb898558SAl Viro */ 101bb898558SAl Viro #define LOWMEMSIZE() (0x9f000) 102bb898558SAl Viro 103bb898558SAl Viro #ifdef __i386__ 104bb898558SAl Viro 105bb898558SAl Viro void __init i386_start_kernel(void); 106bb898558SAl Viro extern void probe_roms(void); 107bb898558SAl Viro 108bb898558SAl Viro extern unsigned long init_pg_tables_start; 109bb898558SAl Viro extern unsigned long init_pg_tables_end; 110bb898558SAl Viro 111bb898558SAl Viro #else 112bb898558SAl Viro void __init x86_64_start_kernel(char *real_mode); 113bb898558SAl Viro void __init x86_64_start_reservations(char *real_mode_data); 114bb898558SAl Viro 115bb898558SAl Viro #endif /* __i386__ */ 116bb898558SAl Viro #endif /* _SETUP */ 117bb898558SAl Viro #endif /* __ASSEMBLY__ */ 118bb898558SAl Viro #endif /* __KERNEL__ */ 119bb898558SAl Viro 1201965aae3SH. Peter Anvin #endif /* _ASM_X86_SETUP_H */ 121