From b1da8bbbe9635e7ae40d8cd145cf340532e43b2b Mon Sep 17 00:00:00 2001 From: Alexander Egorenkov Date: Mon, 11 Oct 2021 14:03:33 +0200 Subject: [PATCH] zdump/dfi: Introduce symbolic constants for OLDMEM base and size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace magic values with descriptive names to improve readability. Signed-off-by: Alexander Egorenkov Signed-off-by: Jan Höppner --- zdump/dfi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zdump/dfi.c b/zdump/dfi.c index c8de1b97..d4d7b0a3 100644 --- a/zdump/dfi.c +++ b/zdump/dfi.c @@ -18,6 +18,9 @@ #define TIME_FMT_STR "%a, %d %b %Y %H:%M:%S %z" #define PROGRESS_HASH_CNT 50 +#define KDUMP_OLDMEM_BASE 0x10418 +#define KDUMP_OLDMEM_SIZE 0x10420 + /* * DFI vector - ensure that tape is the first in the list and devmem the second! */ @@ -613,9 +616,9 @@ static void kdump_init(void) util_log_print(UTIL_LOG_TRACE, "DFI kdump initialization\n"); - if (dfi_mem_phys_read(0x10418, &base, sizeof(base))) + if (dfi_mem_phys_read(KDUMP_OLDMEM_BASE, &base, sizeof(base))) return; - if (dfi_mem_phys_read(0x10420, &size, sizeof(size))) + if (dfi_mem_phys_read(KDUMP_OLDMEM_SIZE, &size, sizeof(size))) return; if (base == 0 || size == 0) return;