#include "kapi/boot_modules.hpp" #include "kapi/system.hpp" #include namespace kapi::boot_modules { namespace { constinit auto static registry = std::optional{}; } // namespace auto set_boot_module_registry(boot_module_registry & new_registry) -> void { if (registry) { system::panic("[x86_64] Boot module registry has already been set."); } registry = new_registry; } auto get_boot_module_registry() -> boot_module_registry & { if (!registry) { system::panic("[x86_64] Boot module registry has not been initialized."); } return *registry; } } // namespace kapi::boot_modules