Page MenuHomeFreeBSD

[PPC64] Initial kernel minidump implementation
Needs ReviewPublic

Authored by luporl on Fri, Sep 6, 2:31 PM.

Details

Summary

The starting point was the implementation at POWER9BSD. From there, I've removed all POWER9 specific code and added a few new methods in PPC64 MMU interface, to isolate platform specific code.
For now, the new methods were implemented only on pseries, but I plan to add PowerNV support next.

Test Plan

To generate a minidump, the following steps can be used, on a GENERIC64 kernel:

sysctl debug.kdb.panic=1
db> dump

Reboot and after the system starts up the minidump should be available at /var/crash, provided that dumpdev was configured properly.

With a patched libkvm (to be posted soon), it is then possible to translate addresses and read the dumped memory pages.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 26474
Build 24895: arc lint + arc unit

Event Timeline

luporl created this revision.Fri, Sep 6, 2:31 PM

Only a trivial review so far.

sys/kern/kern_dump.c
295

I don't think this is needed. minidumps don't work on powerpc64 anyway, so don't even bother with using the ELF fallback that does work on powerpc (more or less). Just call minidumpsys() as below, and make the check "#if !defined(powerpc) || defined(powerpc64)".

sys/powerpc/aim/mmu_oea64.c
146

I don't think this will work correctly. VM_MIN_KERNEL_ADDRESS is 0xe000000000000000UL, which fits the mask perfectly, so will be a false positive.

luporl added inline comments.Fri, Sep 6, 6:52 PM
sys/powerpc/aim/mmu_oea64.c
146

You are right. That explains some missing pages in the dump :)

luporl updated this revision to Diff 61879.Tue, Sep 10, 12:43 PM
  • Address jhibbits comments and add missing UMA bits
luporl marked 2 inline comments as done.Tue, Sep 10, 12:46 PM
luporl updated this revision to Diff 62050.EditedFri, Sep 13, 6:34 PM
  • Added startkernel, endkernel to minidump header

This is needed in order to properly handle relocated kernels in libkvm.