Skip to content

Commit

Permalink
Introduce a new ARM64 "--machdep vabits_actual=<value>" command
Browse files Browse the repository at this point in the history
line option for Linux 5.4 and later dumpfiles, which require the
kernel's dynamically-determined "vabits_actual" value for virtual
address translation.  Without the patch, the crash session fails
during initialization with the error message "crash: cannot determine
VA_BITS_ACTUAL".  This option will become unnecessary when the
proposed TCR_EL1.T1SZ vmcoreinfo entry entry is incorporated into
the kernel.
([email protected])
  • Loading branch information
Dave Anderson committed Apr 2, 2020
1 parent 8c28b56 commit d379b47
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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");
}
Expand Down
1 change: 1 addition & 0 deletions crash.8
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ ARM64:
phys_offset=<physical-address>
kimage_voffset=<kimage_voffset-value>
max_physmem_bits=<value>
vabits_actual=<value>
X86:
page_offset=<CONFIG_PAGE_OFFSET-value>
.fi
Expand Down
1 change: 1 addition & 0 deletions help.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ char *program_usage_info[] = {
" phys_offset=<physical-address>",
" kimage_voffset=<kimage_voffset-value>",
" max_physmem_bits=<value>",
" vabits_actual=<value>",
" X86:",
" page_offset=<CONFIG_PAGE_OFFSET-value>",
"",
Expand Down

0 comments on commit d379b47

Please sign in to comment.