git: kernel: Implement sysctl 'debug.dump_modinfo' to dump boot metadata

Aaron LI aly at
Tue Feb 21 06:17:25 PST 2023

commit adcd479a9e10a483cbe706328cc7a0a5b4b4fd43
Author: Aaron LI <aly at>
Date:   Sun Feb 19 17:47:23 2023 +0800

    kernel: Implement sysctl 'debug.dump_modinfo' to dump boot metadata
    The boot metadata (also referred to as modinfo, or preload metadata)
    provides information about the size and location of the kernel,
    pre-loaded modules, and other metadata (e.g. the EFI framebuffer) to be
    consumed during by the kernel during early boot. It is encoded as a
    series of type-length-value entries and is usually constructed by
    loader(8) and passed to the kernel.
    Although much of the module information is available via kldstat(8),
    there is no easy way to debug the metadata in its entirety. Add some
    routines to parse this data and allow it to be printed to the console
    during early boot or output via the sysctl 'debug.dump_modinfo'.
    Obtained-from: FreeBSD (revision 366542, commit

Summary of changes:
 sys/kern/subr_module.c | 174 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 174 insertions(+)

DragonFly BSD source repository

More information about the Commits mailing list