Page MenuHomeFreeBSD

powerpc/radix: add minidump support
Needs ReviewPublic

Authored by mchoo on Wed, Sep 16, 9:26 PM.
Tags
None
Referenced Files
F172245180: D59743.id.diff
Thu, Sep 17, 5:21 AM
F172240113: D59743.id186918.diff
Thu, Sep 17, 4:06 AM
F172240029: D59743.id186918.diff
Thu, Sep 17, 4:04 AM
F172238961: D59743.id186918.diff
Thu, Sep 17, 3:48 AM
F172214579: D59743.diff
Wed, Sep 16, 10:14 PM
Subscribers

Details

Reviewers
jhb
adrian
jhibbits
Group Reviewers
PowerPC
Summary

This revision is divided into two commits: kernel-side radix page table emitter and enabling libkvm to read radix minidumps

powerpc/radix: include page tables in minidumps

The radix pmap did not implement the minidump pmap callbacks, so radix
minidumps were emitted with an empty pmap section.  Such dumps do not
contain enough information for libkvm to translate kernel virtual
addresses.

Snapshot the 64KB radix root table in the pmap section, add lower-level
page-table pages to the sparse dump, and include pages backing non-DMAP
kernel mappings.  Keep the bulk direct map out of the dump while
retaining the relocated kernel image.

PR:		298532
MFC after:	2 weeks
MFC to:	stable/14, stable/15
Sponsored by:	FreeBSD Foundation
libkvm: support powerpc64 radix minidumps

PowerPC64 radix minidumps use a 64KB root directory followed by three
levels of 4KB page tables.  Add an MMU backend which walks those tables,
handles large-page leaves, and decodes their always-big-endian entries
on both powerpc64 and powerpc64le.

Reject old radix minidumps whose pmap section is empty with a specific
diagnostic.  Add a synthetic powerpc64le dump test which reads a page
through both its kernel and direct-map addresses.

PR:		298532
MFC after:	2 weeks
MFC to:	stable/14, stable/15
Sponsored by:	FreeBSD Foundation
Test Plan

Tested on QEMU. Dump extracted and LLDB (kvm_open2()) could read it without any problem.
Before, LLDB would say the core format isn't supported.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 77001
Build 73884: arc lint + arc unit