diff --git a/arm64.c b/arm64.c index 6abcfe05..09b1b766 100644 --- a/arm64.c +++ b/arm64.c @@ -747,6 +747,8 @@ arm64_parse_machdep_arg_l(char *argstring, char *param, ulong *value) if (STRNEQ(argstring, "max_physmem_bits")) { *value = dtol(p, flags, &err); + } else if (STRNEQ(argstring, "vabits_actual")) { + *value = dtol(p, flags, &err); } else if (megabytes) { *value = dtol(p, flags, &err); if (!err) @@ -816,6 +818,12 @@ arm64_parse_cmdline_args(void) "setting max_physmem_bits to: %ld\n\n", machdep->max_physmem_bits); continue; + } else if (arm64_parse_machdep_arg_l(arglist[i], "vabits_actual", + &machdep->machspec->VA_BITS_ACTUAL)) { + error(NOTE, + "setting vabits_actual to: %ld\n\n", + machdep->machspec->VA_BITS_ACTUAL); + continue; } error(WARNING, "ignoring --machdep option: %s\n", @@ -3890,6 +3898,9 @@ arm64_calc_VA_BITS(void) machdep->machspec->VA_BITS_ACTUAL = value; machdep->machspec->VA_BITS = value; machdep->machspec->VA_START = _VA_START(machdep->machspec->VA_BITS_ACTUAL); + } else if (machdep->machspec->VA_BITS_ACTUAL) { + machdep->machspec->VA_BITS = machdep->machspec->VA_BITS_ACTUAL; + machdep->machspec->VA_START = _VA_START(machdep->machspec->VA_BITS_ACTUAL); } else error(FATAL, "cannot determine VA_BITS_ACTUAL\n"); } diff --git a/crash.8 b/crash.8 index f9de36d8..994a2e05 100644 --- a/crash.8 +++ b/crash.8 @@ -280,6 +280,7 @@ ARM64: phys_offset= kimage_voffset= max_physmem_bits= + vabits_actual= X86: page_offset= .fi diff --git a/help.c b/help.c index eda5ce97..c443cad7 100644 --- a/help.c +++ b/help.c @@ -181,6 +181,7 @@ char *program_usage_info[] = { " phys_offset=", " kimage_voffset=", " max_physmem_bits=", + " vabits_actual=", " X86:", " page_offset=", "",