diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-01 22:29:30 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-01 22:29:30 +0100 |
| commit | 025593a068bc83f64386325b826179cafd95a03f (patch) | |
| tree | d6724e71e4cb855dc747699cb380c01b3e7a10bf /Private/NewBoot/BootKit/Arch | |
| parent | 9700c31e4958856ea9e4fa755a43d196fcf50614 (diff) | |
Bootloader: Improve PATA support, but will use UEFI SimpleFile to get
the kernel image.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/BootKit/Arch')
| -rw-r--r-- | Private/NewBoot/BootKit/Arch/ATA.hxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Private/NewBoot/BootKit/Arch/ATA.hxx b/Private/NewBoot/BootKit/Arch/ATA.hxx index 8327f5c8..6e692c3d 100644 --- a/Private/NewBoot/BootKit/Arch/ATA.hxx +++ b/Private/NewBoot/BootKit/Arch/ATA.hxx @@ -95,6 +95,9 @@ using namespace HCore; #define ATA_PRIMARY 0x00 #define ATA_SECONDARY 0x01 +#define ATA_CYL_LOW 4 +#define ATA_CYL_HIGH 5 + // IO Direction #define ATA_READ 0x00 #define ATA_WRITE 0x013 @@ -114,25 +117,25 @@ UInt16 ATAReadLba(UInt32 Lba, UInt8 Bus, Boolean Master); Void ATAWriteLba(UInt16 Byte, UInt32 Lba, UInt8 Bus, Boolean Master); Boolean ATAIsDetected(Void); -class ATAHelper final { +class BATADevice final { public: enum { kPrimary = ATA_PRIMARY, kSecondary = ATA_SECONDARY, }; - explicit ATAHelper() noexcept; + explicit BATADevice() noexcept; - HCORE_COPY_DEFAULT(ATAHelper); + HCORE_COPY_DEFAULT(BATADevice); struct ATATraits final { SizeT mBase{1024}; - UInt8 mBus{kPrimary}; + UInt16 mBus{kPrimary}; Boolean mMaster{false}; }; - ATAHelper& Read(WideChar*, const SizeT&); - ATAHelper& Write(WideChar*, const SizeT&); + BATADevice& Read(WideChar*, const SizeT&); + BATADevice& Write(WideChar*, const SizeT&); ATATraits& Traits(); |
