From 4cadbff15541ca09ced3321acfdf302fced29ee9 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 29 Jan 2024 19:54:04 +0100 Subject: NewBoot: Working on EFI implementation to load kernel into memory... Signed-off-by: Amlal El Mahrouss --- Private/NewBoot/BootKit/Protocol.hxx | 38 +++++++++++++++--------------------- 1 file changed, 16 insertions(+), 22 deletions(-) (limited to 'Private/NewBoot/BootKit') diff --git a/Private/NewBoot/BootKit/Protocol.hxx b/Private/NewBoot/BootKit/Protocol.hxx index c2dc1a9d..68b837b4 100644 --- a/Private/NewBoot/BootKit/Protocol.hxx +++ b/Private/NewBoot/BootKit/Protocol.hxx @@ -11,41 +11,35 @@ #include -namespace HEL -{ -using namespace hCore; - +namespace hCore::HEL { /** @brief the kind of executable we're loading. */ -enum -{ - kTypeKernel = 100, - kTypeKernelDriver = 101, - kTypeRsrc = 102, - kTypeCount = 3, +enum { + kTypeKernel = 100, + kTypeKernelDriver = 101, + kTypeRsrc = 102, + kTypeCount = 3, }; /** @brief The executable architecture. */ -enum -{ - kArchAmd64 = 122, - kArchCount = 2, +enum { + kArchAmd64 = 122, + kArchCount = 2, }; -struct __attribute__((packed)) HandoverHeader final -{ - Int32 targetMagic; - Int32 targetType; - Int32 targetArch; - UIntPtr protocolHeaderTable; +struct __attribute__((packed)) HandoverHeader final { + Int32 targetMagic; + Int32 targetType; + Int32 targetArch; + UIntPtr startAddress; }; -} // namespace HEL +} // namespace hCore::HEL #define kHandoverMagic 0xBAD55 -#define kBaseHandoverStruct 0x10000000 +#define kBaseHandoverStruct 0x80000000 #define kHandoverStructSz sizeof(HEL::HandoverHeader) -- cgit v1.2.3