HomeFreeBSD

sys: make the kernel metadata pointer global

Description

sys: make the kernel metadata pointer global

The way we got the kernel metadata pointer was by calling
preload_search_by_type with one of the following three: "elf kernel",
"elf32 kernel" and "elf64 kernel". Which one(s) we used wasn't
consistent though. Sometimes we would only try "elf kernel", and other
times we would try one of the latter two if the first failed. However,
the loader only ever sets "elf kernel" as the kernel type.

Now, the kmdp is a global, preload_kmdp, and it's initialized using
preload_initkmdp in machdep.c (or machdep_boot.c on arm/64).
preload_initkmdp takes a single boolean argument that tells us whether
not finding the kmdp is fatal or not.

Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1394

Details

Provenance
ahmadkhalifa570_gmail.comAuthored on Aug 22 2024, 7:05 PM
impCommitted on Jan 24 2025, 9:25 PM
Parents
rG3ad01642fe9e: iflib(4): Replace admin taskqueue group with per-interface taskqueues
Branches
Unknown
Tags
Unknown