diff options
Diffstat (limited to 'dev/Boot/BootKit/HW')
| -rw-r--r-- | dev/Boot/BootKit/HW/ATA.hxx | 58 | ||||
| -rw-r--r-- | dev/Boot/BootKit/HW/SATA.hxx | 46 |
2 files changed, 0 insertions, 104 deletions
diff --git a/dev/Boot/BootKit/HW/ATA.hxx b/dev/Boot/BootKit/HW/ATA.hxx deleted file mode 100644 index 2c6416f8..00000000 --- a/dev/Boot/BootKit/HW/ATA.hxx +++ /dev/null @@ -1,58 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once - -#include <Modules/ATA/ATA.hxx> -#include <BootKit/Device.hxx> - -using namespace Kernel; - -class BootDeviceATA final : public Device -{ -public: - enum - { - kPrimary = ATA_PRIMARY_IO, - kSecondary = ATA_SECONDARY_IO, - }; - - explicit BootDeviceATA() noexcept; - ~BootDeviceATA() = default; - - NEWOS_COPY_DEFAULT(BootDeviceATA); - - enum - { - kSectorSize = kATASectorSize - }; - - struct ATATrait final : public Device::Trait - { - UInt16 mBus{kPrimary}; - UInt8 mMaster{0}; - Boolean mErr{false}; - - operator bool() - { - return !mErr; - } - }; - -public: - operator bool(); - - SizeT GetSectorsCount() noexcept; - SizeT GetDiskSize() noexcept; - - BootDeviceATA& Read(Char* Buf, const SizeT& SecCount) override; - BootDeviceATA& Write(Char* Buf, const SizeT& SecCount) override; - - ATATrait& Leak() override; - -private: - ATATrait mTrait; -}; diff --git a/dev/Boot/BootKit/HW/SATA.hxx b/dev/Boot/BootKit/HW/SATA.hxx deleted file mode 100644 index 4704ece4..00000000 --- a/dev/Boot/BootKit/HW/SATA.hxx +++ /dev/null @@ -1,46 +0,0 @@ -/* ------------------------------------------- - - Copyright ZKA Technologies. - -------------------------------------------- */ - -#pragma once - -#include <CompilerKit/CompilerKit.hxx> -#include <Modules/AHCI/AHCI.hxx> - -class BootDeviceSATA final -{ -public: - explicit BootDeviceSATA() noexcept; - ~BootDeviceSATA() = default; - - NEWOS_COPY_DEFAULT(BootDeviceSATA); - - struct SATATrait final - { - Kernel::SizeT mBase{1024}; - Kernel::Boolean mErr{false}; - Kernel::Boolean mDetected{false}; - - operator bool() - { - return !this->mErr; - } - }; - - operator bool() - { - return this->Leak().mDetected; - } - - BootDeviceSATA& Read(Kernel::WideChar* Buf, const Kernel::SizeT& SecCount); - BootDeviceSATA& Write(Kernel::WideChar* Buf, const Kernel::SizeT& SecCount); - - SATATrait& Leak(); - -private: - SATATrait mTrait; -}; - -#define kAHCISectorSz 4096 |
