diff options
| author | amlal <amlal@el-mahrouss-logic.com> | 2024-03-17 07:25:31 +0100 |
|---|---|---|
| committer | amlal <amlal@el-mahrouss-logic.com> | 2024-03-17 07:25:31 +0100 |
| commit | 45548d516ddf5e88bf80940365d151e1bd69c29f (patch) | |
| tree | f7347078e07a9d524e874f7f6c23622d538064bc /Private/NewBoot/BootKit | |
| parent | a4d4de6913fb7dd54847b0e5a004c3100bc02459 (diff) | |
HCR-14: A series of important fixes and improvements regarding the
kernel.
Signed-off-by: amlal <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/NewBoot/BootKit')
| -rw-r--r-- | Private/NewBoot/BootKit/Arch/AHCI.hxx | 38 | ||||
| -rw-r--r-- | Private/NewBoot/BootKit/Arch/ATA.hxx | 4 | ||||
| -rw-r--r-- | Private/NewBoot/BootKit/Arch/SATA.hxx | 38 |
3 files changed, 39 insertions, 41 deletions
diff --git a/Private/NewBoot/BootKit/Arch/AHCI.hxx b/Private/NewBoot/BootKit/Arch/AHCI.hxx deleted file mode 100644 index 9505377b..00000000 --- a/Private/NewBoot/BootKit/Arch/AHCI.hxx +++ /dev/null @@ -1,38 +0,0 @@ -/* ------------------------------------------- - - Copyright Mahrouss Logic - -------------------------------------------- */ - -#pragma once - -#include <CompilerKit/CompilerKit.hxx> -#include <Drivers/AHCI/Defines.hxx> - -class BDeviceAHCI final { - public: - explicit BDeviceAHCI() noexcept; - ~BDeviceAHCI() = default; - - HCORE_COPY_DEFAULT(BDeviceAHCI); - - struct AHCITraits final { - HCore::SizeT fBase{1024}; - HCore::Boolean fError{false}; - HCore::Boolean fDetected{false}; - - operator bool() { return !this->fError; } - }; - - operator bool() { return this->Leak().fDetected; } - - BDeviceAHCI& Read(HCore::WideChar* Buf, const HCore::SizeT& SecCount); - BDeviceAHCI& Write(HCore::WideChar* Buf, const HCore::SizeT& SecCount); - - AHCITraits& Leak(); - - private: - AHCITraits mTraits; -}; - -#define kAHCISectorSz 512 diff --git a/Private/NewBoot/BootKit/Arch/ATA.hxx b/Private/NewBoot/BootKit/Arch/ATA.hxx index 3370fdba..15d36317 100644 --- a/Private/NewBoot/BootKit/Arch/ATA.hxx +++ b/Private/NewBoot/BootKit/Arch/ATA.hxx @@ -8,8 +8,6 @@ #include <Drivers/ATA/Defines.hxx> -Boolean IsATADetected(Void); - class BDeviceATA final { public: enum { @@ -31,7 +29,7 @@ class BDeviceATA final { operator bool() { return !mErr; } }; - operator bool() { return IsATADetected(); } + operator bool(); BDeviceATA& Read(WideChar* Buf, const SizeT& SecCount); BDeviceATA& Write(WideChar* Buf, const SizeT& SecCount); diff --git a/Private/NewBoot/BootKit/Arch/SATA.hxx b/Private/NewBoot/BootKit/Arch/SATA.hxx new file mode 100644 index 00000000..3e37be19 --- /dev/null +++ b/Private/NewBoot/BootKit/Arch/SATA.hxx @@ -0,0 +1,38 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +#pragma once + +#include <CompilerKit/CompilerKit.hxx> +#include <Drivers/AHCI/Defines.hxx> + +class BDeviceSATA final { + public: + explicit BDeviceSATA() noexcept; + ~BDeviceSATA() = default; + + HCORE_COPY_DEFAULT(BDeviceSATA); + + struct AHCITraits final { + HCore::SizeT mBase{1024}; + HCore::Boolean mErr{false}; + HCore::Boolean mDetected{false}; + + operator bool() { return !this->mErr; } + }; + + operator bool() { return this->Leak().mDetected; } + + BDeviceSATA& Read(HCore::WideChar* Buf, const HCore::SizeT& SecCount); + BDeviceSATA& Write(HCore::WideChar* Buf, const HCore::SizeT& SecCount); + + AHCITraits& Leak(); + + private: + AHCITraits mTraits; +}; + +#define kAHCISectorSz 512 |
