40b2d330491150555b4751eb56fb84b2f2ba6fdc
[firefly-linux-kernel-4.4.55.git] / arch / x86 / include / asm / 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 extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
20 /*
21  * Any setup quirks to be performed?
22  */
23 struct mpc_config_processor;
24 struct mpc_config_bus;
25 struct mp_config_oemtable;
26 struct x86_quirks {
27         int (*arch_pre_time_init)(void);
28         int (*arch_time_init)(void);
29         int (*arch_pre_intr_init)(void);
30         int (*arch_intr_init)(void);
31         int (*arch_trap_init)(void);
32         char * (*arch_memory_setup)(void);
33         int (*mach_get_smp_config)(unsigned int early);
34         int (*mach_find_smp_config)(unsigned int reserve);
35
36         int *mpc_record;
37         int (*mpc_apic_id)(struct mpc_config_processor *m);
38         void (*mpc_oem_bus_info)(struct mpc_config_bus *m, char *name);
39         void (*mpc_oem_pci_bus)(struct mpc_config_bus *m);
40         void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable,
41                                     unsigned short oemsize);
42         int (*setup_ioapic_ids)(void);
43         int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip);
44 };
45
46 extern struct x86_quirks *x86_quirks;
47 extern unsigned long saved_video_mode;
48
49 #ifndef CONFIG_PARAVIRT
50 #define paravirt_post_allocator_init()  do {} while (0)
51 #endif
52 #endif /* __ASSEMBLY__ */
53
54 #ifdef __KERNEL__
55
56 #ifdef __i386__
57
58 #include <linux/pfn.h>
59 /*
60  * Reserved space for vmalloc and iomap - defined in asm/page.h
61  */
62 #define MAXMEM_PFN      PFN_DOWN(MAXMEM)
63 #define MAX_NONPAE_PFN  (1 << 20)
64
65 #endif /* __i386__ */
66
67 #define PARAM_SIZE 4096         /* sizeof(struct boot_params) */
68
69 #define OLD_CL_MAGIC            0xA33F
70 #define OLD_CL_ADDRESS          0x020   /* Relative to real mode data */
71 #define NEW_CL_POINTER          0x228   /* Relative to real mode data */
72
73 #ifndef __ASSEMBLY__
74 #include <asm/bootparam.h>
75
76 #ifndef _SETUP
77
78 /*
79  * This is set up by the setup-routine at boot-time
80  */
81 extern struct boot_params boot_params;
82
83 /*
84  * Do NOT EVER look at the BIOS memory size location.
85  * It does not work on many machines.
86  */
87 #define LOWMEMSIZE()    (0x9f000)
88
89 #ifdef __i386__
90
91 void __init i386_start_kernel(void);
92 extern void probe_roms(void);
93
94 extern unsigned long init_pg_tables_start;
95 extern unsigned long init_pg_tables_end;
96
97 #else
98 void __init x86_64_init_pda(void);
99 void __init x86_64_start_kernel(char *real_mode);
100 void __init x86_64_start_reservations(char *real_mode_data);
101
102 #endif /* __i386__ */
103 #endif /* _SETUP */
104 #endif /* __ASSEMBLY__ */
105 #endif  /*  __KERNEL__  */
106
107 #endif /* _ASM_X86_SETUP_H */