diff options
Diffstat (limited to 'arch/ia64/kernel/efi.c')
-rw-r--r-- | arch/ia64/kernel/efi.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 772ba6fe110f..4061593e5b17 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> |
@@ -1009,6 +1010,11 @@ efi_memmap_init(unsigned long *s, unsigned long *e) | |||
1009 | } else | 1010 | } else |
1010 | ae = efi_md_end(md); | 1011 | ae = efi_md_end(md); |
1011 | 1012 | ||
1013 | #ifdef CONFIG_CRASH_DUMP | ||
1014 | /* saved_max_pfn should ignore max_addr= command line arg */ | ||
1015 | if (saved_max_pfn < (ae >> PAGE_SHIFT)) | ||
1016 | saved_max_pfn = (ae >> PAGE_SHIFT); | ||
1017 | #endif | ||
1012 | /* keep within max_addr= and min_addr= command line arg */ | 1018 | /* keep within max_addr= and min_addr= command line arg */ |
1013 | as = max(as, min_addr); | 1019 | as = max(as, min_addr); |
1014 | ae = min(ae, max_addr); | 1020 | ae = min(ae, max_addr); |
@@ -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 */ | ||
1189 | unsigned long | ||
1190 | vmcore_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 | ||