blob: ebe858cdc8a3048f75ecc10526ee17753f97bc05 [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_SETUP_H
2#define _ASM_X86_SETUP_H
Thomas Gleixneref685292007-10-23 22:37:24 +02003
4#define COMMAND_LINE_SIZE 2048
5
Glauber de Oliveira Costa746ef0c2008-01-30 13:31:11 +01006#ifndef __ASSEMBLY__
Glauber Costa2785c8d2008-02-11 17:16:03 -02007
8/* Interrupt control for vSMPowered x86_64 systems */
9void vsmp_init(void);
10
Arjan van de Ven6784f7d2008-10-05 11:33:42 -070011
12void setup_bios_corruption_check(void);
13
14
Ingo Molnar3b335532008-07-10 17:30:40 +020015#ifdef CONFIG_X86_VISWS
16extern void visws_early_detect(void);
Ingo Molnar5548ed12008-07-10 16:53:21 +020017extern int is_visws_box(void);
Ingo Molnar3b335532008-07-10 17:30:40 +020018#else
19static inline void visws_early_detect(void) { }
Ingo Molnar5548ed12008-07-10 16:53:21 +020020static inline int is_visws_box(void) { return 0; }
Ingo Molnar3b335532008-07-10 17:30:40 +020021#endif
22
Yinghai Lu569712b2008-11-16 03:12:49 -080023extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
Yinghai Lu54ac14a2008-11-17 15:19:53 -080024extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);
Ingo Molnar3b335532008-07-10 17:30:40 +020025/*
26 * Any setup quirks to be performed?
27 */
Jaswinder Singh Rajputf4f21b72009-01-03 15:48:52 +053028struct mpc_cpu;
Jaswinder Singh Rajput00fb8602009-01-03 15:47:32 +053029struct mpc_bus;
Jaswinder Singh Rajputb0e239f2009-01-03 15:52:54 +053030struct mpc_oemtable;
Yinghai Lu3c9cb6d2008-07-19 02:07:25 -070031struct x86_quirks {
Yinghai Lu63b5d7a2008-07-19 18:02:26 -070032 int (*arch_pre_time_init)(void);
Yinghai Lu3c9cb6d2008-07-19 02:07:25 -070033 int (*arch_time_init)(void);
34 int (*arch_pre_intr_init)(void);
35 int (*arch_intr_init)(void);
36 int (*arch_trap_init)(void);
37 char * (*arch_memory_setup)(void);
38 int (*mach_get_smp_config)(unsigned int early);
39 int (*mach_find_smp_config)(unsigned int reserve);
Yinghai Lu64898a82008-07-19 18:01:16 -070040
41 int *mpc_record;
Jaswinder Singh Rajputf4f21b72009-01-03 15:48:52 +053042 int (*mpc_apic_id)(struct mpc_cpu *m);
Jaswinder Singh Rajput00fb8602009-01-03 15:47:32 +053043 void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name);
44 void (*mpc_oem_pci_bus)(struct mpc_bus *m);
Jaswinder Singh Rajputb0e239f2009-01-03 15:52:54 +053045 void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable,
Yinghai Lu64898a82008-07-19 18:01:16 -070046 unsigned short oemsize);
Yinghai Lua4dbc342008-07-25 02:14:28 -070047 int (*setup_ioapic_ids)(void);
Yinghai Lu54ac14a2008-11-17 15:19:53 -080048 int (*update_genapic)(void);
Yinghai Lu3c9cb6d2008-07-19 02:07:25 -070049};
50
51extern struct x86_quirks *x86_quirks;
Jaswinder Singh5314d482008-07-21 22:12:23 +053052extern unsigned long saved_video_mode;
Ingo Molnar3b335532008-07-10 17:30:40 +020053
Glauber de Oliveira Costa746ef0c2008-01-30 13:31:11 +010054#ifndef CONFIG_PARAVIRT
55#define paravirt_post_allocator_init() do {} while (0)
56#endif
57#endif /* __ASSEMBLY__ */
58
Thomas Gleixner96a388d2007-10-11 11:20:03 +020059#ifdef __KERNEL__
Thomas Gleixneref685292007-10-23 22:37:24 +020060
61#ifdef __i386__
62
63#include <linux/pfn.h>
64/*
65 * Reserved space for vmalloc and iomap - defined in asm/page.h
66 */
67#define MAXMEM_PFN PFN_DOWN(MAXMEM)
68#define MAX_NONPAE_PFN (1 << 20)
69
Thomas Gleixneref685292007-10-23 22:37:24 +020070#endif /* __i386__ */
71
H. Peter Anvinfa76dab2007-10-23 22:37:25 +020072#define PARAM_SIZE 4096 /* sizeof(struct boot_params) */
73
74#define OLD_CL_MAGIC 0xA33F
75#define OLD_CL_ADDRESS 0x020 /* Relative to real mode data */
76#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
77
Thomas Gleixneref685292007-10-23 22:37:24 +020078#ifndef __ASSEMBLY__
79#include <asm/bootparam.h>
80
H. Peter Anvinfa76dab2007-10-23 22:37:25 +020081#ifndef _SETUP
82
Thomas Gleixneref685292007-10-23 22:37:24 +020083/*
84 * This is set up by the setup-routine at boot-time
85 */
86extern struct boot_params boot_params;
87
Thomas Gleixneref685292007-10-23 22:37:24 +020088/*
89 * Do NOT EVER look at the BIOS memory size location.
90 * It does not work on many machines.
91 */
92#define LOWMEMSIZE() (0x9f000)
93
Yinghai Lu95a71a42008-06-18 17:27:08 -070094#ifdef __i386__
95
Yinghai Luf0d43102008-05-29 12:56:36 -070096void __init i386_start_kernel(void);
Yinghai Lua9c11822008-06-21 15:39:41 -070097extern void probe_roms(void);
Yinghai Luf0d43102008-05-29 12:56:36 -070098
99extern unsigned long init_pg_tables_start;
Thomas Gleixneref685292007-10-23 22:37:24 +0200100extern unsigned long init_pg_tables_end;
101
Jeremy Fitzhardinge102e3b82008-06-25 00:19:09 -0400102#else
Jeremy Fitzhardinge5b09b282008-07-08 15:06:42 -0700103void __init x86_64_init_pda(void);
Jeremy Fitzhardinge102e3b82008-06-25 00:19:09 -0400104void __init x86_64_start_kernel(char *real_mode);
Jeremy Fitzhardingef97013f2008-06-25 00:19:18 -0400105void __init x86_64_start_reservations(char *real_mode_data);
106
Thomas Gleixneref685292007-10-23 22:37:24 +0200107#endif /* __i386__ */
H. Peter Anvinfa76dab2007-10-23 22:37:25 +0200108#endif /* _SETUP */
Thomas Gleixneref685292007-10-23 22:37:24 +0200109#endif /* __ASSEMBLY__ */
110#endif /* __KERNEL__ */
111
H. Peter Anvin1965aae2008-10-22 22:26:29 -0700112#endif /* _ASM_X86_SETUP_H */