Linux 3.11-rc3
[cris-mirror.git] / arch / x86 / include / asm / setup.h
blobb7bf3505e1ec0ba4d1c42c51aeae60babf150a55
1 #ifndef _ASM_X86_SETUP_H
2 #define _ASM_X86_SETUP_H
4 #include <uapi/asm/setup.h>
7 #define COMMAND_LINE_SIZE 2048
9 #ifdef __i386__
11 #include <linux/pfn.h>
13 * Reserved space for vmalloc and iomap - defined in asm/page.h
15 #define MAXMEM_PFN PFN_DOWN(MAXMEM)
16 #define MAX_NONPAE_PFN (1 << 20)
18 #endif /* __i386__ */
20 #define PARAM_SIZE 4096 /* sizeof(struct boot_params) */
22 #define OLD_CL_MAGIC 0xA33F
23 #define OLD_CL_ADDRESS 0x020 /* Relative to real mode data */
24 #define NEW_CL_POINTER 0x228 /* Relative to real mode data */
26 #ifndef __ASSEMBLY__
27 #include <asm/bootparam.h>
28 #include <asm/x86_init.h>
30 /* Interrupt control for vSMPowered x86_64 systems */
31 #ifdef CONFIG_X86_64
32 void vsmp_init(void);
33 #else
34 static inline void vsmp_init(void) { }
35 #endif
37 void setup_bios_corruption_check(void);
39 #ifdef CONFIG_X86_VISWS
40 extern void visws_early_detect(void);
41 #else
42 static inline void visws_early_detect(void) { }
43 #endif
45 extern unsigned long saved_video_mode;
47 extern void reserve_standard_io_resources(void);
48 extern void i386_reserve_resources(void);
49 extern void setup_default_timer_irq(void);
51 #ifdef CONFIG_X86_INTEL_MID
52 extern void x86_mrst_early_setup(void);
53 #else
54 static inline void x86_mrst_early_setup(void) { }
55 #endif
57 #ifdef CONFIG_X86_INTEL_CE
58 extern void x86_ce4100_early_setup(void);
59 #else
60 static inline void x86_ce4100_early_setup(void) { }
61 #endif
63 #ifndef _SETUP
66 * This is set up by the setup-routine at boot-time
68 extern struct boot_params boot_params;
71 * Do NOT EVER look at the BIOS memory size location.
72 * It does not work on many machines.
74 #define LOWMEMSIZE() (0x9f000)
76 /* exceedingly early brk-like allocator */
77 extern unsigned long _brk_end;
78 void *extend_brk(size_t size, size_t align);
81 * Reserve space in the brk section. The name must be unique within
82 * the file, and somewhat descriptive. The size is in bytes. Must be
83 * used at file scope.
85 * (This uses a temp function to wrap the asm so we can pass it the
86 * size parameter; otherwise we wouldn't be able to. We can't use a
87 * "section" attribute on a normal variable because it always ends up
88 * being @progbits, which ends up allocating space in the vmlinux
89 * executable.)
91 #define RESERVE_BRK(name,sz) \
92 static void __section(.discard.text) __used notrace \
93 __brk_reservation_fn_##name##__(void) { \
94 asm volatile ( \
95 ".pushsection .brk_reservation,\"aw\",@nobits;" \
96 ".brk." #name ":" \
97 " 1:.skip %c0;" \
98 " .size .brk." #name ", . - 1b;" \
99 " .popsection" \
100 : : "i" (sz)); \
103 /* Helper for reserving space for arrays of things */
104 #define RESERVE_BRK_ARRAY(type, name, entries) \
105 type *name; \
106 RESERVE_BRK(name, sizeof(type) * entries)
108 extern void probe_roms(void);
109 #ifdef __i386__
111 void __init i386_start_kernel(void);
113 #else
114 void __init x86_64_start_kernel(char *real_mode);
115 void __init x86_64_start_reservations(char *real_mode_data);
117 #endif /* __i386__ */
118 #endif /* _SETUP */
119 #else
120 #define RESERVE_BRK(name,sz) \
121 .pushsection .brk_reservation,"aw",@nobits; \
122 .brk.name: \
123 1: .skip sz; \
124 .size .brk.name,.-1b; \
125 .popsection
126 #endif /* __ASSEMBLY__ */
127 #endif /* _ASM_X86_SETUP_H */