blob: 2585075da9b41f61cd23b1516258fbf2ff2fba57 [file] [log] [blame]
Thomas Gleixneref685292007-10-23 22:37:24 +02001#ifndef _ASM_X86_SETUP_H
2#define _ASM_X86_SETUP_H
3
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
Ingo Molnar3b335532008-07-10 17:30:40 +020011#ifdef CONFIG_X86_VISWS
12extern void visws_early_detect(void);
Ingo Molnar5548ed12008-07-10 16:53:21 +020013extern int is_visws_box(void);
Ingo Molnar3b335532008-07-10 17:30:40 +020014#else
15static inline void visws_early_detect(void) { }
Ingo Molnar5548ed12008-07-10 16:53:21 +020016static inline int is_visws_box(void) { return 0; }
Ingo Molnar3b335532008-07-10 17:30:40 +020017#endif
18
19/*
20 * Any setup quirks to be performed?
21 */
Yinghai Lu64898a82008-07-19 18:01:16 -070022struct mpc_config_processor;
23struct mpc_config_bus;
24struct mp_config_oemtable;
Yinghai Lu3c9cb6d2008-07-19 02:07:25 -070025struct x86_quirks {
26 int (*arch_time_init)(void);
27 int (*arch_pre_intr_init)(void);
28 int (*arch_intr_init)(void);
29 int (*arch_trap_init)(void);
30 char * (*arch_memory_setup)(void);
31 int (*mach_get_smp_config)(unsigned int early);
32 int (*mach_find_smp_config)(unsigned int reserve);
Yinghai Lu64898a82008-07-19 18:01:16 -070033
34 int *mpc_record;
35 int (*mpc_apic_id)(struct mpc_config_processor *m);
36 void (*mpc_oem_bus_info)(struct mpc_config_bus *m, char *name);
37 void (*mpc_oem_pci_bus)(struct mpc_config_bus *m);
38 void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable,
39 unsigned short oemsize);
Yinghai Lu3c9cb6d2008-07-19 02:07:25 -070040};
41
42extern struct x86_quirks *x86_quirks;
Ingo Molnar3b335532008-07-10 17:30:40 +020043
Glauber de Oliveira Costa746ef0c2008-01-30 13:31:11 +010044#ifndef CONFIG_PARAVIRT
45#define paravirt_post_allocator_init() do {} while (0)
46#endif
47#endif /* __ASSEMBLY__ */
48
Thomas Gleixner96a388d2007-10-11 11:20:03 +020049#ifdef __KERNEL__
Thomas Gleixneref685292007-10-23 22:37:24 +020050
51#ifdef __i386__
52
53#include <linux/pfn.h>
54/*
55 * Reserved space for vmalloc and iomap - defined in asm/page.h
56 */
57#define MAXMEM_PFN PFN_DOWN(MAXMEM)
58#define MAX_NONPAE_PFN (1 << 20)
59
Thomas Gleixneref685292007-10-23 22:37:24 +020060#endif /* __i386__ */
61
H. Peter Anvinfa76dab2007-10-23 22:37:25 +020062#define PARAM_SIZE 4096 /* sizeof(struct boot_params) */
63
64#define OLD_CL_MAGIC 0xA33F
65#define OLD_CL_ADDRESS 0x020 /* Relative to real mode data */
66#define NEW_CL_POINTER 0x228 /* Relative to real mode data */
67
Thomas Gleixneref685292007-10-23 22:37:24 +020068#ifndef __ASSEMBLY__
69#include <asm/bootparam.h>
70
H. Peter Anvinfa76dab2007-10-23 22:37:25 +020071#ifndef _SETUP
72
Thomas Gleixneref685292007-10-23 22:37:24 +020073/*
74 * This is set up by the setup-routine at boot-time
75 */
76extern struct boot_params boot_params;
77
Thomas Gleixneref685292007-10-23 22:37:24 +020078/*
79 * Do NOT EVER look at the BIOS memory size location.
80 * It does not work on many machines.
81 */
82#define LOWMEMSIZE() (0x9f000)
83
Yinghai Lu95a71a42008-06-18 17:27:08 -070084#ifdef __i386__
85
Yinghai Luf0d43102008-05-29 12:56:36 -070086void __init i386_start_kernel(void);
Yinghai Lua9c11822008-06-21 15:39:41 -070087extern void probe_roms(void);
Yinghai Luf0d43102008-05-29 12:56:36 -070088
89extern unsigned long init_pg_tables_start;
Thomas Gleixneref685292007-10-23 22:37:24 +020090extern unsigned long init_pg_tables_end;
91
Jeremy Fitzhardinge102e3b82008-06-25 00:19:09 -040092#else
93void __init x86_64_start_kernel(char *real_mode);
Jeremy Fitzhardingef97013f2008-06-25 00:19:18 -040094void __init x86_64_start_reservations(char *real_mode_data);
95
Thomas Gleixneref685292007-10-23 22:37:24 +020096#endif /* __i386__ */
H. Peter Anvinfa76dab2007-10-23 22:37:25 +020097#endif /* _SETUP */
Thomas Gleixneref685292007-10-23 22:37:24 +020098#endif /* __ASSEMBLY__ */
99#endif /* __KERNEL__ */
100
101#endif /* _ASM_X86_SETUP_H */