1 #ifndef __X86_SETUP_H_
2 #define __X86_SETUP_H_
3 
4 #include <xen/multiboot.h>
5 #include <asm/numa.h>
6 
7 /* vCPU pointer used prior to there being a valid one around */
8 #define INVALID_VCPU ((struct vcpu *)0xccccccccccccc000UL)
9 
10 extern const char __2M_text_start[], __2M_text_end[];
11 extern const char __2M_rodata_start[], __2M_rodata_end[];
12 extern char __2M_init_start[], __2M_init_end[];
13 extern char __2M_rwdata_start[], __2M_rwdata_end[];
14 
15 extern unsigned long xenheap_initial_phys_start;
16 
17 void early_cpu_init(void);
18 void early_time_init(void);
19 
20 int intel_cpu_init(void);
21 int amd_init_cpu(void);
22 int cyrix_init_cpu(void);
23 int nsc_init_cpu(void);
24 int centaur_init_cpu(void);
25 int transmeta_init_cpu(void);
26 
27 void set_nr_cpu_ids(unsigned int max_cpus);
28 
29 void numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn);
30 void arch_init_memory(void);
31 void subarch_init_memory(void);
32 
33 void init_IRQ(void);
34 
35 #ifdef CONFIG_VIDEO
36 void vesa_init(void);
37 void vesa_mtrr_init(void);
38 #else
vesa_init(void)39 static inline void vesa_init(void) {};
vesa_mtrr_init(void)40 static inline void vesa_mtrr_init(void) {};
41 #endif
42 
43 int construct_dom0(
44     struct domain *d,
45     const module_t *kernel, unsigned long kernel_headroom,
46     module_t *initrd,
47     void *(*bootstrap_map)(const module_t *),
48     char *cmdline);
49 void setup_io_bitmap(struct domain *d);
50 
51 unsigned long initial_images_nrpages(nodeid_t node);
52 void discard_initial_images(void);
53 
54 unsigned int dom0_max_vcpus(void);
55 
56 int xen_in_range(unsigned long mfn);
57 
58 void microcode_grab_module(
59     unsigned long *, const multiboot_info_t *, void *(*)(const module_t *));
60 
61 extern uint8_t kbd_shift_flags;
62 
63 #ifdef NDEBUG
64 # define highmem_start 0
65 #else
66 extern unsigned long highmem_start;
67 #endif
68 
69 #ifdef CONFIG_SHADOW_PAGING
70 extern bool opt_dom0_shadow;
71 #else
72 #define opt_dom0_shadow false
73 #endif
74 extern bool dom0_pvh;
75 
76 #endif
77