Vegard Nossum | 77ef50a | 2008-06-18 17:08:48 +0200 | [diff] [blame] | 1 | #ifndef ASM_X86__SETUP_H |
| 2 | #define ASM_X86__SETUP_H |
Thomas Gleixner | ef68529 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 3 | |
| 4 | #define COMMAND_LINE_SIZE 2048 |
| 5 | |
Glauber de Oliveira Costa | 746ef0c | 2008-01-30 13:31:11 +0100 | [diff] [blame] | 6 | #ifndef __ASSEMBLY__ |
Glauber Costa | 2785c8d | 2008-02-11 17:16:03 -0200 | [diff] [blame] | 7 | |
| 8 | /* Interrupt control for vSMPowered x86_64 systems */ |
| 9 | void vsmp_init(void); |
| 10 | |
Ingo Molnar | 3b33553 | 2008-07-10 17:30:40 +0200 | [diff] [blame] | 11 | #ifdef CONFIG_X86_VISWS |
| 12 | extern void visws_early_detect(void); |
Ingo Molnar | 5548ed1 | 2008-07-10 16:53:21 +0200 | [diff] [blame] | 13 | extern int is_visws_box(void); |
Ingo Molnar | 3b33553 | 2008-07-10 17:30:40 +0200 | [diff] [blame] | 14 | #else |
| 15 | static inline void visws_early_detect(void) { } |
Ingo Molnar | 5548ed1 | 2008-07-10 16:53:21 +0200 | [diff] [blame] | 16 | static inline int is_visws_box(void) { return 0; } |
Ingo Molnar | 3b33553 | 2008-07-10 17:30:40 +0200 | [diff] [blame] | 17 | #endif |
| 18 | |
| 19 | /* |
| 20 | * Any setup quirks to be performed? |
| 21 | */ |
Yinghai Lu | 64898a8 | 2008-07-19 18:01:16 -0700 | [diff] [blame] | 22 | struct mpc_config_processor; |
| 23 | struct mpc_config_bus; |
| 24 | struct mp_config_oemtable; |
Yinghai Lu | 3c9cb6d | 2008-07-19 02:07:25 -0700 | [diff] [blame] | 25 | struct x86_quirks { |
Yinghai Lu | 63b5d7a | 2008-07-19 18:02:26 -0700 | [diff] [blame] | 26 | int (*arch_pre_time_init)(void); |
Yinghai Lu | 3c9cb6d | 2008-07-19 02:07:25 -0700 | [diff] [blame] | 27 | int (*arch_time_init)(void); |
| 28 | int (*arch_pre_intr_init)(void); |
| 29 | int (*arch_intr_init)(void); |
| 30 | int (*arch_trap_init)(void); |
| 31 | char * (*arch_memory_setup)(void); |
| 32 | int (*mach_get_smp_config)(unsigned int early); |
| 33 | int (*mach_find_smp_config)(unsigned int reserve); |
Yinghai Lu | 64898a8 | 2008-07-19 18:01:16 -0700 | [diff] [blame] | 34 | |
| 35 | int *mpc_record; |
| 36 | int (*mpc_apic_id)(struct mpc_config_processor *m); |
| 37 | void (*mpc_oem_bus_info)(struct mpc_config_bus *m, char *name); |
| 38 | void (*mpc_oem_pci_bus)(struct mpc_config_bus *m); |
| 39 | void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable, |
| 40 | unsigned short oemsize); |
Yinghai Lu | a4dbc34 | 2008-07-25 02:14:28 -0700 | [diff] [blame] | 41 | int (*setup_ioapic_ids)(void); |
Yinghai Lu | 3c9cb6d | 2008-07-19 02:07:25 -0700 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | extern struct x86_quirks *x86_quirks; |
Jaswinder Singh | 5314d48 | 2008-07-21 22:12:23 +0530 | [diff] [blame] | 45 | extern unsigned long saved_video_mode; |
Ingo Molnar | 3b33553 | 2008-07-10 17:30:40 +0200 | [diff] [blame] | 46 | |
Glauber de Oliveira Costa | 746ef0c | 2008-01-30 13:31:11 +0100 | [diff] [blame] | 47 | #ifndef CONFIG_PARAVIRT |
| 48 | #define paravirt_post_allocator_init() do {} while (0) |
| 49 | #endif |
| 50 | #endif /* __ASSEMBLY__ */ |
| 51 | |
Thomas Gleixner | 96a388d | 2007-10-11 11:20:03 +0200 | [diff] [blame] | 52 | #ifdef __KERNEL__ |
Thomas Gleixner | ef68529 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 53 | |
| 54 | #ifdef __i386__ |
| 55 | |
| 56 | #include <linux/pfn.h> |
| 57 | /* |
| 58 | * Reserved space for vmalloc and iomap - defined in asm/page.h |
| 59 | */ |
| 60 | #define MAXMEM_PFN PFN_DOWN(MAXMEM) |
| 61 | #define MAX_NONPAE_PFN (1 << 20) |
| 62 | |
Thomas Gleixner | ef68529 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 63 | #endif /* __i386__ */ |
| 64 | |
H. Peter Anvin | fa76dab | 2007-10-23 22:37:25 +0200 | [diff] [blame] | 65 | #define PARAM_SIZE 4096 /* sizeof(struct boot_params) */ |
| 66 | |
| 67 | #define OLD_CL_MAGIC 0xA33F |
| 68 | #define OLD_CL_ADDRESS 0x020 /* Relative to real mode data */ |
| 69 | #define NEW_CL_POINTER 0x228 /* Relative to real mode data */ |
| 70 | |
Thomas Gleixner | ef68529 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 71 | #ifndef __ASSEMBLY__ |
| 72 | #include <asm/bootparam.h> |
| 73 | |
H. Peter Anvin | fa76dab | 2007-10-23 22:37:25 +0200 | [diff] [blame] | 74 | #ifndef _SETUP |
| 75 | |
Thomas Gleixner | ef68529 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 76 | /* |
| 77 | * This is set up by the setup-routine at boot-time |
| 78 | */ |
| 79 | extern struct boot_params boot_params; |
| 80 | |
Thomas Gleixner | ef68529 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 81 | /* |
| 82 | * Do NOT EVER look at the BIOS memory size location. |
| 83 | * It does not work on many machines. |
| 84 | */ |
| 85 | #define LOWMEMSIZE() (0x9f000) |
| 86 | |
Yinghai Lu | 95a71a4 | 2008-06-18 17:27:08 -0700 | [diff] [blame] | 87 | #ifdef __i386__ |
| 88 | |
Yinghai Lu | f0d4310 | 2008-05-29 12:56:36 -0700 | [diff] [blame] | 89 | void __init i386_start_kernel(void); |
Yinghai Lu | a9c1182 | 2008-06-21 15:39:41 -0700 | [diff] [blame] | 90 | extern void probe_roms(void); |
Yinghai Lu | f0d4310 | 2008-05-29 12:56:36 -0700 | [diff] [blame] | 91 | |
| 92 | extern unsigned long init_pg_tables_start; |
Thomas Gleixner | ef68529 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 93 | extern unsigned long init_pg_tables_end; |
| 94 | |
Jeremy Fitzhardinge | 102e3b8 | 2008-06-25 00:19:09 -0400 | [diff] [blame] | 95 | #else |
Jeremy Fitzhardinge | 5b09b28 | 2008-07-08 15:06:42 -0700 | [diff] [blame] | 96 | void __init x86_64_init_pda(void); |
Jeremy Fitzhardinge | 102e3b8 | 2008-06-25 00:19:09 -0400 | [diff] [blame] | 97 | void __init x86_64_start_kernel(char *real_mode); |
Jeremy Fitzhardinge | f97013f | 2008-06-25 00:19:18 -0400 | [diff] [blame] | 98 | void __init x86_64_start_reservations(char *real_mode_data); |
| 99 | |
Thomas Gleixner | ef68529 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 100 | #endif /* __i386__ */ |
H. Peter Anvin | fa76dab | 2007-10-23 22:37:25 +0200 | [diff] [blame] | 101 | #endif /* _SETUP */ |
Thomas Gleixner | ef68529 | 2007-10-23 22:37:24 +0200 | [diff] [blame] | 102 | #endif /* __ASSEMBLY__ */ |
| 103 | #endif /* __KERNEL__ */ |
| 104 | |
Vegard Nossum | 77ef50a | 2008-06-18 17:08:48 +0200 | [diff] [blame] | 105 | #endif /* ASM_X86__SETUP_H */ |