diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-03 20:39:06 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-03 20:39:06 +0100 |
| commit | f99e383775fa43c5c1354067962b1590ff2abdae (patch) | |
| tree | f83a9b232c0424963fc9989b517e53f903ee036f /Private/NewBoot/BootKit/Arch | |
| parent | 0ca5d0d92ee326f3deda797403c27090bd0784ab (diff) | |
NewBoot: Will work on AHCI instead, ATA is not getting any further in
the future.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/BootKit/Arch')
| -rw-r--r-- | Private/NewBoot/BootKit/Arch/AHCI.hxx | 12 | ||||
| -rw-r--r-- | Private/NewBoot/BootKit/Arch/ATA.hxx | 11 |
2 files changed, 16 insertions, 7 deletions
diff --git a/Private/NewBoot/BootKit/Arch/AHCI.hxx b/Private/NewBoot/BootKit/Arch/AHCI.hxx new file mode 100644 index 00000000..2e3739b5 --- /dev/null +++ b/Private/NewBoot/BootKit/Arch/AHCI.hxx @@ -0,0 +1,12 @@ +/* + * ======================================================== + * + * NewBoot + * Copyright Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + +#pragma once + +#include <Drivers/AHCI/Defines.hxx> diff --git a/Private/NewBoot/BootKit/Arch/ATA.hxx b/Private/NewBoot/BootKit/Arch/ATA.hxx index 4042aaa9..4b4eb399 100644 --- a/Private/NewBoot/BootKit/Arch/ATA.hxx +++ b/Private/NewBoot/BootKit/Arch/ATA.hxx @@ -111,12 +111,6 @@ using namespace HCore; #define ATA_ADDRESS3(x) (x + 5) #define ATA_COMMAND(x) (x + 7) -Boolean ATAInitDriver(UInt8 Bus, UInt8 Drv); -Void ATAWait(UInt16 IO); -Void ATAReadLba(UInt32 Lba, UInt8 Bus, Boolean Master, wchar_t* Buf, - SizeT Offset); -Void ATAWriteLba(UInt32 Lba, UInt8 Bus, Boolean Master, wchar_t* Buf, - SizeT Offset); Boolean ATAIsDetected(Void); class BATADevice final { @@ -134,7 +128,10 @@ class BATADevice final { struct ATATraits final { SizeT mBase{1024}; UInt16 mBus{kPrimary}; - Boolean mMaster{true}; + UInt8 mMaster{0}; + Boolean mErr{false}; + + operator bool() { return !mErr; } }; operator bool() { return ATAIsDetected(); } |
