diff options
author | Tony Luck <tony.luck@intel.com> | 2005-10-28 21:32:30 (GMT) |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-10-28 21:32:30 (GMT) |
commit | 5833f1420b96c4f9b193b7f2fcbc0003dc032fe8 (patch) | |
tree | ccb3933b3c694ba4724c3a392d6e275d992ed86b /arch/ia64/kernel/setup.c | |
parent | a1e78db3f54d3481726ed2d3d58d8ad5b19b13d0 (diff) | |
parent | d719948e623622cf9fc8016f7ec63422d929eb3b (diff) | |
download | linux-fsl-qoriq-5833f1420b96c4f9b193b7f2fcbc0003dc032fe8.tar.xz |
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 e256b11..f95fd27 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c @@ -78,6 +78,19 @@ struct screen_info screen_info; unsigned long vga_console_iobase; unsigned long vga_console_membase; +static struct resource data_resource = { + .name = "Kernel data", + .flags = IORESOURCE_BUSY | IORESOURCE_MEM +}; + +static struct resource code_resource = { + .name = "Kernel code", + .flags = IORESOURCE_BUSY | IORESOURCE_MEM +}; +extern void efi_initialize_iomem_resources(struct resource *, + struct resource *); +extern char _text[], _end[], _etext[]; + unsigned long ia64_max_cacheline_size; unsigned long ia64_iobase; /* virtual address for I/O accesses */ EXPORT_SYMBOL(ia64_iobase); @@ -171,6 +184,22 @@ sort_regions (struct rsvd_region *rsvd_region, int max) } } +/* + * Request address space for all standard resources + */ +static int __init register_memory(void) +{ + code_resource.start = ia64_tpa(_text); + code_resource.end = ia64_tpa(_etext) - 1; + data_resource.start = ia64_tpa(_etext); + data_resource.end = ia64_tpa(_end) - 1; + efi_initialize_iomem_resources(&code_resource, &data_resource); + + return 0; +} + +__initcall(register_memory); + /** * reserve_memory - setup reserved memory areas * @@ -211,6 +240,9 @@ reserve_memory (void) } #endif + efi_memmap_init(&rsvd_region[n].start, &rsvd_region[n].end); + n++; + /* end of memory marker */ rsvd_region[n].start = ~0UL; rsvd_region[n].end = ~0UL; |