diff options
author | Zou Nan hai <nanhai.zou@intel.com> | 2006-08-14 14:57:07 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2006-10-06 12:44:15 +0900 |
commit | af07e52128dff6d25d6efd94c9e22c21e7b30cec (patch) | |
tree | a299e7a7edc24bb6fb856576f04dafea91607629 /purgatory | |
parent | 9e741cbe256fa166d1e18b635cd55ae173eb0224 (diff) | |
download | kexec-tools-af07e52128dff6d25d6efd94c9e22c21e7b30cec.tar.gz |
ia64: kdump: patch clone ia64_boot_param area for crash
without this patch, crash tool will not able to analyze efi memmap of
first kernel from vmcore file.
This patch is against kexec-tools-1.101 with kdump10 patch.
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Removed bogus fragments caused by whitespace addition
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory')
-rw-r--r-- | purgatory/arch/ia64/entry.S | 3 | ||||
-rw-r--r-- | purgatory/arch/ia64/purgatory-ia64.c | 22 |
2 files changed, 15 insertions, 10 deletions
diff --git a/purgatory/arch/ia64/entry.S b/purgatory/arch/ia64/entry.S index 18215055..a1e9e87b 100644 --- a/purgatory/arch/ia64/entry.S +++ b/purgatory/arch/ia64/entry.S @@ -46,6 +46,8 @@ purgatory_start: br.call.sptk.many b0=ia64_env_setup movl r10=__kernel_entry;; ld8 r14=[r10];; + movl r10=__boot_param_base;; + ld8 r28=[r10];; mov b6=r14;; mov ar.lc=r0 mov ar.ec=r0 @@ -61,6 +63,7 @@ DECLARE_DATA8(__command_line) DECLARE_DATA8(__command_line_len) DECLARE_DATA8(__efi_memmap_base) DECLARE_DATA8(__efi_memmap_size) +DECLARE_DATA8(__boot_param_base) DECLARE_DATA8(__loaded_segments) DECLARE_DATA8(__loaded_segments_num) diff --git a/purgatory/arch/ia64/purgatory-ia64.c b/purgatory/arch/ia64/purgatory-ia64.c index c0115c01..dbf77a69 100644 --- a/purgatory/arch/ia64/purgatory-ia64.c +++ b/purgatory/arch/ia64/purgatory-ia64.c @@ -123,6 +123,7 @@ struct kexec_boot_params { uint64_t command_line_len; uint64_t efi_memmap_base; uint64_t efi_memmap_size; + uint64_t boot_param_base; struct loaded_segment *loaded_segments; unsigned long loaded_segments_num; }; @@ -243,13 +244,15 @@ ia64_env_setup(struct ia64_boot_param *boot_param, unsigned long *set_virtual_address_map; char *command_line = (char *)params->command_line; uint64_t command_line_len = params->command_line_len; - + struct ia64_boot_param *new_boot_param = + (struct ia64_boot_param *) params->boot_param_base; + memcpy(new_boot_param, boot_param, 4096); // patch efi_runtime->set_virtual_address_map to a // dummy function len = __dummy_efi_function_end - __dummy_efi_function; memcpy(command_line + command_line_len, __dummy_efi_function, len); - systab = (efi_system_table_t *)boot_param->efi_systab; + systab = (efi_system_table_t *)new_boot_param->efi_systab; runtime = (efi_runtime_services_t *)PA(systab->runtime); set_virtual_address_map = (unsigned long *)PA(runtime->set_virtual_address_map); @@ -257,15 +260,14 @@ ia64_env_setup(struct ia64_boot_param *boot_param, (unsigned long)(command_line + command_line_len); flush_icache_range(command_line + command_line_len, len); - patch_efi_memmap(params, boot_param); - - boot_param->efi_memmap = params->efi_memmap_base; + patch_efi_memmap(params, new_boot_param); - boot_param->command_line = params->command_line; - boot_param->console_info.orig_x = 0; - boot_param->console_info.orig_y = 0; - boot_param->initrd_start = params->ramdisk_base; - boot_param->initrd_size = params->ramdisk_size; + new_boot_param->efi_memmap = params->efi_memmap_base; + new_boot_param->command_line = params->command_line; + new_boot_param->console_info.orig_x = 0; + new_boot_param->console_info.orig_y = 0; + new_boot_param->initrd_start = params->ramdisk_base; + new_boot_param->initrd_size = params->ramdisk_size; } /* This function can be used to execute after the SHA256 verification. */ |