diff options
Diffstat (limited to 'Private/NewBoot/BootKit')
| -rw-r--r-- | Private/NewBoot/BootKit/Arch/ATA.hxx | 5 | ||||
| -rw-r--r-- | Private/NewBoot/BootKit/BootKit.hxx | 5 | ||||
| -rw-r--r-- | Private/NewBoot/BootKit/EPM.hxx | 2 | ||||
| -rw-r--r-- | Private/NewBoot/BootKit/Protocol.hxx | 58 |
4 files changed, 9 insertions, 61 deletions
diff --git a/Private/NewBoot/BootKit/Arch/ATA.hxx b/Private/NewBoot/BootKit/Arch/ATA.hxx index 5c42237a..4042aaa9 100644 --- a/Private/NewBoot/BootKit/Arch/ATA.hxx +++ b/Private/NewBoot/BootKit/Arch/ATA.hxx @@ -127,13 +127,14 @@ class BATADevice final { }; explicit BATADevice() noexcept; + ~BATADevice() = default; HCORE_COPY_DEFAULT(BATADevice); struct ATATraits final { SizeT mBase{1024}; UInt16 mBus{kPrimary}; - Boolean mMaster{false}; + Boolean mMaster{true}; }; operator bool() { return ATAIsDetected(); } @@ -154,3 +155,5 @@ enum { kATADeviceSATA_PI, kATADeviceCount, }; + +#define kATASectorSz 512 diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx index 70519aba..b0dbccd5 100644 --- a/Private/NewBoot/BootKit/BootKit.hxx +++ b/Private/NewBoot/BootKit/BootKit.hxx @@ -48,6 +48,8 @@ class BTextWriter final { BTextWriter(const BTextWriter &) = default; }; +HCore::SizeT BCopyMem(CharacterType *dest, CharacterType *src, + const HCore::SizeT len); HCore::SizeT BStrLen(const CharacterType *ptr); HCore::SizeT BSetMem(CharacterType *src, const CharacterType byte, const HCore::SizeT len); @@ -80,8 +82,7 @@ class BFileReader final { private: Int32 mErrorCode{kOperationOkay}; - CharacterType mPath[255]; - BATADevice mDevice; + CharacterType mPath[kPathLen]; }; /***********************************************************************************/ diff --git a/Private/NewBoot/BootKit/EPM.hxx b/Private/NewBoot/BootKit/EPM.hxx index 803d500c..359eed1b 100644 --- a/Private/NewBoot/BootKit/EPM.hxx +++ b/Private/NewBoot/BootKit/EPM.hxx @@ -9,4 +9,4 @@ #pragma once -#include <HALKit/EPM.hxx> +#include <EFIKit/EPM.hxx> diff --git a/Private/NewBoot/BootKit/Protocol.hxx b/Private/NewBoot/BootKit/Protocol.hxx index 2f84d0a8..b2725794 100644 --- a/Private/NewBoot/BootKit/Protocol.hxx +++ b/Private/NewBoot/BootKit/Protocol.hxx @@ -9,61 +9,5 @@ #pragma once +#include <EFIKit/BootProtocol.hxx> #include <EFIKit/EFI.hxx> - -/* useful macros */ - -#define kHandoverMagic 0xBAD55 - -#define kBaseHandoverStruct 0x80000000 -#define kHandoverStructSz sizeof(HEL::HandoverHeader) - -namespace HCore::HEL { -/** - @brief the kind of executable we're loading. -*/ -enum { - kTypeKernel = 100, - kTypeKernelDriver = 101, - kTypeRsrc = 102, - kTypeCount = 3, -}; - -/** - @brief The executable architecture. -*/ - -enum { - kArchAmd64 = 122, - kArchCount = 2, -}; - -/** -@brief The first struct that we read when inspecting The executable -it tells us more about it and IS format independent. -*/ -struct __attribute__((packed)) HandoverHeader final { - Int32 f_TargetMagic; - Int32 f_TargetType; - Int32 f_TargetArch; - UIntPtr f_TargetStartAddress; -}; - -struct HandoverInformationHeader { - HandoverHeader* f_Header; - voidPtr f_VirtualStart; - SizeT f_VirtualSize; - voidPtr f_PhysicalStart; - SizeT f_PhysicalSize; - Char f_FirmwareVendorName[32]; - SizeT f_FirmwareVendorLen; - voidPtr f_RsdPtr; - voidPtr f_SmBIOS; - voidPtr f_RTC; -}; - -/** - @brief Handover Jump Proc -*/ -typedef UInt64 (*HandoverProc)(HandoverInformationHeader* pHandover); -} // namespace HCore::HEL |
