From cb2f383f45dda8d1cdcef0b87fe4c70243659701 Mon Sep 17 00:00:00 2001 From: Amlal Date: Sun, 27 Apr 2025 17:30:36 +0200 Subject: dev, kernel: AHCI, HeFS filesystem, SysChk, and BootSATA improvements. what? - AHCI now writes to disk, forgot to do it. - Codebase's architecutre has been used to reuse the Generic+AHCI driver in SysChk for AHCI. (tradeoff is 256K in size instead of 36K) - DriveMgr now detects EPM. - And HeFS is still being worked on. Signed-off-by: Amlal --- dev/boot/BootKit/HW/SATA.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'dev/boot/BootKit/HW') diff --git a/dev/boot/BootKit/HW/SATA.h b/dev/boot/BootKit/HW/SATA.h index 7e84c061..5c70c18c 100644 --- a/dev/boot/BootKit/HW/SATA.h +++ b/dev/boot/BootKit/HW/SATA.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include @@ -20,14 +21,19 @@ class BootDeviceSATA final { Kernel::SizeT mBase{1024}; Kernel::Boolean mErr{false}; Kernel::Boolean mDetected{false}; + Kernel::SizeT mSize{0}; 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); + SizeT GetDiskSize() { return drv_get_size(); } + + constexpr static auto kSectorSize = kAHCISectorSize; + + BootDeviceSATA& Read(Boot::CharacterTypeUTF8* Buf, const Kernel::SizeT SecCount); + BootDeviceSATA& Write(Boot::CharacterTypeUTF8* Buf, const Kernel::SizeT SecCount); SATATrait& Leak(); -- cgit v1.2.3