diff options
author | Tony Luck <tony.luck@intel.com> | 2005-10-28 17:32:30 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-10-28 17:32:30 -0400 |
commit | 5833f1420b96c4f9b193b7f2fcbc0003dc032fe8 (patch) | |
tree | ccb3933b3c694ba4724c3a392d6e275d992ed86b /arch/ia64/kernel/setup.c | |
parent | a1e78db3f54d3481726ed2d3d58d8ad5b19b13d0 (diff) | |
parent | d719948e623622cf9fc8016f7ec63422d929eb3b (diff) |
Pull new-efi-memmap into release branch
Diffstat (limited to 'arch/ia64/kernel/setup.c')
-rw-r--r-- | arch/ia64/kernel/setup.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index e256b114bf4e..f95fd2766634 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -78,6 +78,19 @@ struct screen_info screen_info; | |||
78 | unsigned long vga_console_iobase; | 78 | unsigned long vga_console_iobase; |
79 | unsigned long vga_console_membase; | 79 | unsigned long vga_console_membase; |
80 | 80 | ||
81 | static struct resource data_resource = { | ||
82 | .name = "Kernel data", | ||
83 | .flags = IORESOURCE_BUSY | IORESOURCE_MEM | ||
84 | }; | ||
85 | |||
86 | static struct resource code_resource = { | ||
87 | .name = "Kernel code", | ||
88 | .flags = IORESOURCE_BUSY | IORESOURCE_MEM | ||
89 | }; | ||
90 | extern void efi_initialize_iomem_resources(struct resource *, | ||
91 | struct resource *); | ||
92 | extern char _text[], _end[], _etext[]; | ||
93 | |||
81 | unsigned long ia64_max_cacheline_size; | 94 | unsigned long ia64_max_cacheline_size; |
82 | unsigned long ia64_iobase; /* virtual address for I/O accesses */ | 95 | unsigned long ia64_iobase; /* virtual address for I/O accesses */ |
83 | EXPORT_SYMBOL(ia64_iobase); | 96 | EXPORT_SYMBOL(ia64_iobase); |
@@ -171,6 +184,22 @@ sort_regions (struct rsvd_region *rsvd_region, int max) | |||
171 | } | 184 | } |
172 | } | 185 | } |
173 | 186 | ||
187 | /* | ||
188 | * Request address space for all standard resources | ||
189 | */ | ||
190 | static int __init register_memory(void) | ||
191 | { | ||
192 | code_resource.start = ia64_tpa(_text); | ||
193 | code_resource.end = ia64_tpa(_etext) - 1; | ||
194 | data_resource.start = ia64_tpa(_etext); | ||
195 | data_resource.end = ia64_tpa(_end) - 1; | ||
196 | efi_initialize_iomem_resources(&code_resource, &data_resource); | ||
197 | |||
198 | return 0; | ||
199 | } | ||
200 | |||
201 | __initcall(register_memory); | ||
202 | |||
174 | /** | 203 | /** |
175 | * reserve_memory - setup reserved memory areas | 204 | * reserve_memory - setup reserved memory areas |
176 | * | 205 | * |
@@ -211,6 +240,9 @@ reserve_memory (void) | |||
211 | } | 240 | } |
212 | #endif | 241 | #endif |
213 | 242 | ||
243 | efi_memmap_init(&rsvd_region[n].start, &rsvd_region[n].end); | ||
244 | n++; | ||
245 | |||
214 | /* end of memory marker */ | 246 | /* end of memory marker */ |
215 | rsvd_region[n].start = ~0UL; | 247 | rsvd_region[n].start = ~0UL; |
216 | rsvd_region[n].end = ~0UL; | 248 | rsvd_region[n].end = ~0UL; |