HomeFreeBSD

Add SYSCTL to get KERNBASE and relocated KERNBASE

Description

Add SYSCTL to get KERNBASE and relocated KERNBASE

This change adds 2 new SYSCTLs, to retrieve the original and relocated KERNBASE
values. This provides an easy, architecture independent way to calculate the
running kernel displacement (current/load address minus original base address).

The initial goal for this change is to add a new libkvm function that returns
the kernel displacement, both for live kernels and crashdumps. This would in
turn be used by kgdb to find out how to relocate kernel symbols (if needed).

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D23284

Details

Provenance
luporlAuthored on
Reviewer
jhb
Differential Revision
D23284: Add SYSCTL to get KERNBASE and relocated KERNBASE
Parents
rS357569: zfsboot: vdev_read_pad2 does allocate buffer with wrong size
Branches
Unknown
Tags
Unknown