aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/efi.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel/efi.c')
-rw-r--r--arch/ia64/kernel/efi.c38
1 files changed, 37 insertions, 1 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 772ba6fe110f..f45f91d38cab 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -21,6 +21,7 @@
21 * Skip non-WB memory and ignore empty memory ranges. 21 * Skip non-WB memory and ignore empty memory ranges.
22 */ 22 */
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/bootmem.h>
24#include <linux/kernel.h> 25#include <linux/kernel.h>
25#include <linux/init.h> 26#include <linux/init.h>
26#include <linux/types.h> 27#include <linux/types.h>
@@ -970,6 +971,11 @@ efi_memmap_init(unsigned long *s, unsigned long *e)
970 if (!is_memory_available(md)) 971 if (!is_memory_available(md))
971 continue; 972 continue;
972 973
974#ifdef CONFIG_CRASH_DUMP
975 /* saved_max_pfn should ignore max_addr= command line arg */
976 if (saved_max_pfn < (efi_md_end(md) >> PAGE_SHIFT))
977 saved_max_pfn = (efi_md_end(md) >> PAGE_SHIFT);
978#endif
973 /* 979 /*
974 * Round ends inward to granule boundaries 980 * Round ends inward to granule boundaries
975 * Give trimmings to uncached allocator 981 * Give trimmings to uncached allocator
@@ -1136,7 +1142,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
1136/* find a block of memory aligned to 64M exclude reserved regions 1142/* find a block of memory aligned to 64M exclude reserved regions
1137 rsvd_regions are sorted 1143 rsvd_regions are sorted
1138 */ 1144 */
1139unsigned long 1145unsigned long __init
1140kdump_find_rsvd_region (unsigned long size, 1146kdump_find_rsvd_region (unsigned long size,
1141 struct rsvd_region *r, int n) 1147 struct rsvd_region *r, int n)
1142{ 1148{
@@ -1177,3 +1183,33 @@ kdump_find_rsvd_region (unsigned long size,
1177 return ~0UL; 1183 return ~0UL;
1178} 1184}
1179#endif 1185#endif
1186
1187#ifdef CONFIG_PROC_VMCORE
1188/* locate the size find a the descriptor at a certain address */
1189unsigned long
1190vmcore_find_descriptor_size (unsigned long address)
1191{
1192 void *efi_map_start, *efi_map_end, *p;
1193 efi_memory_desc_t *md;
1194 u64 efi_desc_size;
1195 unsigned long ret = 0;
1196
1197 efi_map_start = __va(ia64_boot_param->efi_memmap);
1198 efi_map_end = efi_map_start + ia64_boot_param->efi_memmap_size;
1199 efi_desc_size = ia64_boot_param->efi_memdesc_size;
1200
1201 for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
1202 md = p;
1203 if (efi_wb(md) && md->type == EFI_LOADER_DATA
1204 && md->phys_addr == address) {
1205 ret = efi_md_size(md);
1206 break;
1207 }
1208 }
1209
1210 if (ret == 0)
1211 printk(KERN_WARNING "Cannot locate EFI vmcore descriptor\n");
1212
1213 return ret;
1214}
1215#endif