diff options
Diffstat (limited to 'arch/x86/xen/setup.c')
-rw-r--r-- | arch/x86/xen/setup.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 82517e4a752a..e0a39595bde3 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -13,9 +13,11 @@ | |||
13 | #include <asm/vdso.h> | 13 | #include <asm/vdso.h> |
14 | #include <asm/e820.h> | 14 | #include <asm/e820.h> |
15 | #include <asm/setup.h> | 15 | #include <asm/setup.h> |
16 | #include <asm/acpi.h> | ||
16 | #include <asm/xen/hypervisor.h> | 17 | #include <asm/xen/hypervisor.h> |
17 | #include <asm/xen/hypercall.h> | 18 | #include <asm/xen/hypercall.h> |
18 | 19 | ||
20 | #include <xen/page.h> | ||
19 | #include <xen/interface/callback.h> | 21 | #include <xen/interface/callback.h> |
20 | #include <xen/interface/physdev.h> | 22 | #include <xen/interface/physdev.h> |
21 | #include <xen/features.h> | 23 | #include <xen/features.h> |
@@ -27,8 +29,6 @@ | |||
27 | extern const char xen_hypervisor_callback[]; | 29 | extern const char xen_hypervisor_callback[]; |
28 | extern const char xen_failsafe_callback[]; | 30 | extern const char xen_failsafe_callback[]; |
29 | 31 | ||
30 | unsigned long *phys_to_machine_mapping; | ||
31 | EXPORT_SYMBOL(phys_to_machine_mapping); | ||
32 | 32 | ||
33 | /** | 33 | /** |
34 | * machine_specific_memory_setup - Hook for machine specific memory setup. | 34 | * machine_specific_memory_setup - Hook for machine specific memory setup. |
@@ -38,9 +38,31 @@ char * __init xen_memory_setup(void) | |||
38 | { | 38 | { |
39 | unsigned long max_pfn = xen_start_info->nr_pages; | 39 | unsigned long max_pfn = xen_start_info->nr_pages; |
40 | 40 | ||
41 | max_pfn = min(MAX_DOMAIN_PAGES, max_pfn); | ||
42 | |||
41 | e820.nr_map = 0; | 43 | e820.nr_map = 0; |
42 | add_memory_region(0, LOWMEMSIZE(), E820_RAM); | 44 | |
43 | add_memory_region(HIGH_MEMORY, PFN_PHYS(max_pfn)-HIGH_MEMORY, E820_RAM); | 45 | e820_add_region(0, PFN_PHYS(max_pfn), E820_RAM); |
46 | |||
47 | /* | ||
48 | * Even though this is normal, usable memory under Xen, reserve | ||
49 | * ISA memory anyway because too many things think they can poke | ||
50 | * about in there. | ||
51 | */ | ||
52 | e820_add_region(ISA_START_ADDRESS, ISA_END_ADDRESS - ISA_START_ADDRESS, | ||
53 | E820_RESERVED); | ||
54 | |||
55 | /* | ||
56 | * Reserve Xen bits: | ||
57 | * - mfn_list | ||
58 | * - xen_start_info | ||
59 | * See comment above "struct start_info" in <xen/interface/xen.h> | ||
60 | */ | ||
61 | e820_add_region(__pa(xen_start_info->mfn_list), | ||
62 | xen_start_info->pt_base - xen_start_info->mfn_list, | ||
63 | E820_RESERVED); | ||
64 | |||
65 | sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); | ||
44 | 66 | ||
45 | return "Xen"; | 67 | return "Xen"; |
46 | } | 68 | } |