feat(kernel): use efi in kernel for smbios and rsdp info

This commit is contained in:
2025-04-19 12:27:28 +00:00
parent cd23c59c46
commit fe8682aa85
10 changed files with 1387 additions and 337 deletions

View File

@ -27,11 +27,14 @@
#include <debug.h>
#include <smp.hpp>
#include <cargs.h>
#include <efi.h>
#include <io.h>
#include "core/smbios.hpp"
#include "tests/t.h"
EFI_STATUS EFIAPI efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable);
bool DebuggerIsAttached = false;
NewLock(KernelLock);
@ -269,6 +272,9 @@ EXTERNC __no_stack_protector nif cold void Entry(BootInfo *Info)
if (strcmp(CPU::Hypervisor(), x86_CPUID_VENDOR_TCG) == 0)
DebuggerIsAttached = true;
if (bInfo.EFI.Info.IH || bInfo.EFI.Info.ST)
efi_main((EFI_HANDLE)bInfo.EFI.ImageHandle, (EFI_SYSTEM_TABLE *)bInfo.EFI.SystemTable);
#if defined(__amd64__) || defined(__i386__)
if (!bInfo.SMBIOSPtr)
{