x86: introduce x86_quirks
[pandora-kernel.git] / include / asm-x86 / setup.h
1 #ifndef _ASM_X86_SETUP_H
2 #define _ASM_X86_SETUP_H
3
4 #define COMMAND_LINE_SIZE 2048
5
6 #ifndef __ASSEMBLY__
7
8 /* Interrupt control for vSMPowered x86_64 systems */
9 void vsmp_init(void);
10
11 #ifdef CONFIG_X86_VISWS
12 extern void visws_early_detect(void);
13 extern int is_visws_box(void);
14 #else
15 static inline void visws_early_detect(void) { }
16 static inline int is_visws_box(void) { return 0; }
17 #endif
18
19 /*
20  * Any setup quirks to be performed?
21  */
22 struct x86_quirks {
23         int (*arch_time_init)(void);
24         int (*arch_pre_intr_init)(void);
25         int (*arch_intr_init)(void);
26         int (*arch_trap_init)(void);
27         char * (*arch_memory_setup)(void);
28         int (*mach_get_smp_config)(unsigned int early);
29         int (*mach_find_smp_config)(unsigned int reserve);
30 };
31
32 extern struct x86_quirks *x86_quirks;
33
34 #ifndef CONFIG_PARAVIRT
35 #define paravirt_post_allocator_init()  do {} while (0)
36 #endif
37 #endif /* __ASSEMBLY__ */
38
39 #ifdef __KERNEL__
40
41 #ifdef __i386__
42
43 #include <linux/pfn.h>
44 /*
45  * Reserved space for vmalloc and iomap - defined in asm/page.h
46  */
47 #define MAXMEM_PFN      PFN_DOWN(MAXMEM)
48 #define MAX_NONPAE_PFN  (1 << 20)
49
50 #endif /* __i386__ */
51
52 #define PARAM_SIZE 4096         /* sizeof(struct boot_params) */
53
54 #define OLD_CL_MAGIC            0xA33F
55 #define OLD_CL_ADDRESS          0x020   /* Relative to real mode data */
56 #define NEW_CL_POINTER          0x228   /* Relative to real mode data */
57
58 #ifndef __ASSEMBLY__
59 #include <asm/bootparam.h>
60
61 #ifndef _SETUP
62
63 /*
64  * This is set up by the setup-routine at boot-time
65  */
66 extern struct boot_params boot_params;
67
68 /*
69  * Do NOT EVER look at the BIOS memory size location.
70  * It does not work on many machines.
71  */
72 #define LOWMEMSIZE()    (0x9f000)
73
74 #ifdef __i386__
75
76 void __init i386_start_kernel(void);
77 extern void probe_roms(void);
78
79 extern unsigned long init_pg_tables_start;
80 extern unsigned long init_pg_tables_end;
81
82 #else
83 void __init x86_64_start_kernel(char *real_mode);
84 void __init x86_64_start_reservations(char *real_mode_data);
85
86 #endif /* __i386__ */
87 #endif /* _SETUP */
88 #endif /* __ASSEMBLY__ */
89 #endif  /*  __KERNEL__  */
90
91 #endif /* _ASM_X86_SETUP_H */