aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/setup.c
diff options
context:
space:
mode:
authorKhalid Aziz <khalid.aziz@hp.com>2005-09-19 18:42:36 -0400
committerTony Luck <tony.luck@intel.com>2005-09-19 18:42:36 -0400
commitbe379124c0a5abfbe57dab2823fe8a71ce797aee (patch)
treec16b8dce920a001431add24bcd12cc1f12bf824d /arch/ia64/kernel/setup.c
parentd8c97d5f3aa348272df2ccb4e224b1cf9a1eb6d7 (diff)
[IA64] include EFI memory information in /proc/iomem
User mode kexec tools expect to find information about physical memory in /proc/iomem (as they do on x86) to validate the addresses that the new kernel will use. Signed-off-by: Khalid Aziz <khalid.aziz@hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/setup.c')
-rw-r--r--arch/ia64/kernel/setup.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 1658d687b79c..83b37c410ccd 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -78,6 +78,19 @@ struct screen_info screen_info;
78unsigned long vga_console_iobase; 78unsigned long vga_console_iobase;
79unsigned long vga_console_membase; 79unsigned long vga_console_membase;
80 80
81static struct resource data_resource = {
82 .name = "Kernel data",
83 .flags = IORESOURCE_BUSY | IORESOURCE_MEM
84};
85
86static struct resource code_resource = {
87 .name = "Kernel code",
88 .flags = IORESOURCE_BUSY | IORESOURCE_MEM
89};
90extern void efi_initialize_iomem_resources(struct resource *,
91 struct resource *);
92extern char _text[], _edata[], _etext[];
93
81unsigned long ia64_max_cacheline_size; 94unsigned long ia64_max_cacheline_size;
82unsigned long ia64_iobase; /* virtual address for I/O accesses */ 95unsigned long ia64_iobase; /* virtual address for I/O accesses */
83EXPORT_SYMBOL(ia64_iobase); 96EXPORT_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 */
190static 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(_edata) - 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 *