x86: Move get/find_smp_config to x86_init_ops
[deliverable/linux.git] / arch / x86 / include / asm / setup.h
CommitLineData
1965aae3
PA
1#ifndef _ASM_X86_SETUP_H
2#define _ASM_X86_SETUP_H
ef685298 3
dbca1df4
CG
4#ifdef __KERNEL__
5
ef685298
TG
6#define COMMAND_LINE_SIZE 2048
7
746ef0cd 8#ifndef __ASSEMBLY__
2785c8d0 9
57844a8f
TG
10#include <asm/x86_init.h>
11
3b33553b
IM
12/*
13 * Any setup quirks to be performed?
14 */
8e6dafd6 15
3c9cb6de 16struct x86_quirks {
63b5d7af 17 int (*arch_pre_time_init)(void);
3c9cb6de
YL
18 int (*arch_time_init)(void);
19 int (*arch_pre_intr_init)(void);
20 int (*arch_intr_init)(void);
21 int (*arch_trap_init)(void);
3c9cb6de
YL
22};
23
8e6dafd6
IM
24extern void x86_quirk_intr_init(void);
25
26extern void x86_quirk_trap_init(void);
27
28extern void x86_quirk_pre_time_init(void);
29extern void x86_quirk_time_init(void);
30
746ef0cd
GOC
31#endif /* __ASSEMBLY__ */
32
ef685298
TG
33#ifdef __i386__
34
35#include <linux/pfn.h>
36/*
37 * Reserved space for vmalloc and iomap - defined in asm/page.h
38 */
39#define MAXMEM_PFN PFN_DOWN(MAXMEM)
40#define MAX_NONPAE_PFN (1 << 20)
41
fa76dab9
PA
42#endif /* __i386__ */
43
44#define PARAM_SIZE 4096 /* sizeof(struct boot_params) */
ef685298 45
ef685298 46#define OLD_CL_MAGIC 0xA33F
fa76dab9 47#define OLD_CL_ADDRESS 0x020 /* Relative to real mode data */
ef685298
TG
48#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
49
ef685298
TG
50#ifndef __ASSEMBLY__
51#include <asm/bootparam.h>
52
15c55443 53/* Interrupt control for vSMPowered x86_64 systems */
70511134 54#ifdef CONFIG_X86_64
15c55443 55void vsmp_init(void);
129d8bc8
YL
56#else
57static inline void vsmp_init(void) { }
58#endif
15c55443
JSR
59
60void setup_bios_corruption_check(void);
61
62#ifdef CONFIG_X86_VISWS
63extern void visws_early_detect(void);
64extern int is_visws_box(void);
65#else
66static inline void visws_early_detect(void) { }
67static inline int is_visws_box(void) { return 0; }
68#endif
69
15c55443
JSR
70extern struct x86_quirks *x86_quirks;
71extern unsigned long saved_video_mode;
72
73#ifndef CONFIG_PARAVIRT
74#define paravirt_post_allocator_init() do {} while (0)
75#endif
76
8fee697d
TG
77extern void reserve_standard_io_resources(void);
78extern void i386_reserve_resources(void);
79
fa76dab9
PA
80#ifndef _SETUP
81
ef685298
TG
82/*
83 * This is set up by the setup-routine at boot-time
84 */
85extern struct boot_params boot_params;
86
ef685298
TG
87/*
88 * Do NOT EVER look at the BIOS memory size location.
89 * It does not work on many machines.
90 */
91#define LOWMEMSIZE() (0x9f000)
92
93dbda7c
JF
93/* exceedingly early brk-like allocator */
94extern unsigned long _brk_end;
95void *extend_brk(size_t size, size_t align);
96
796216a5
JF
97/*
98 * Reserve space in the brk section. The name must be unique within
99 * the file, and somewhat descriptive. The size is in bytes. Must be
100 * used at file scope.
101 *
102 * (This uses a temp function to wrap the asm so we can pass it the
103 * size parameter; otherwise we wouldn't be able to. We can't use a
104 * "section" attribute on a normal variable because it always ends up
105 * being @progbits, which ends up allocating space in the vmlinux
106 * executable.)
107 */
108#define RESERVE_BRK(name,sz) \
0b1c723d 109 static void __section(.discard) __used \
796216a5
JF
110 __brk_reservation_fn_##name##__(void) { \
111 asm volatile ( \
112 ".pushsection .brk_reservation,\"aw\",@nobits;" \
0b1c723d 113 ".brk." #name ":" \
796216a5 114 " 1:.skip %c0;" \
0b1c723d 115 " .size .brk." #name ", . - 1b;" \
796216a5
JF
116 " .popsection" \
117 : : "i" (sz)); \
118 }
119
95a71a45
YL
120#ifdef __i386__
121
f0d43100 122void __init i386_start_kernel(void);
a9c1182f 123extern void probe_roms(void);
746ef0cd 124
102e3b8d
JF
125#else
126void __init x86_64_start_kernel(char *real_mode);
f97013fd
JF
127void __init x86_64_start_reservations(char *real_mode_data);
128
ef685298 129#endif /* __i386__ */
fa76dab9 130#endif /* _SETUP */
796216a5
JF
131#else
132#define RESERVE_BRK(name,sz) \
133 .pushsection .brk_reservation,"aw",@nobits; \
0b1c723d 134.brk.name: \
796216a5 1351: .skip sz; \
0b1c723d 136 .size .brk.name,.-1b; \
796216a5 137 .popsection
ef685298
TG
138#endif /* __ASSEMBLY__ */
139#endif /* __KERNEL__ */
140
1965aae3 141#endif /* _ASM_X86_SETUP_H */
This page took 0.344922 seconds and 5 git commands to generate.