summaryrefslogtreecommitdiffhomepage
path: root/dev/zba/src
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-10-21 18:52:06 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-10-21 18:52:06 +0200
commit21b3da78f806d6765f9dffa6a84c21346f171cee (patch)
treedc57df6545c1106a82b9e871e301ac5d5c1cd876 /dev/zba/src
parent94a3d6b4656d4c2905da173b7ff6ecb074566ea3 (diff)
IMP: Implement AHCI support, can detect and read AHCI disks.
TODO: Add Write support to the AHCI driver. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/zba/src')
-rw-r--r--dev/zba/src/HEL/AMD64/BootATA.cxx2
-rw-r--r--dev/zba/src/HEL/AMD64/BootMain.cxx3
2 files changed, 4 insertions, 1 deletions
diff --git a/dev/zba/src/HEL/AMD64/BootATA.cxx b/dev/zba/src/HEL/AMD64/BootATA.cxx
index b975da1a..6561c150 100644
--- a/dev/zba/src/HEL/AMD64/BootATA.cxx
+++ b/dev/zba/src/HEL/AMD64/BootATA.cxx
@@ -83,7 +83,7 @@ ATAInit_Retry:
if (statRdy & ATA_SR_ERR)
{
writer.Write(
- L"NEWOSLDR: ATA: Select error, not an IDE based hard-drive.\r");
+ L"NEWOSLDR: ATA: error, not an IDE based hard-drive.\r");
return false;
}
diff --git a/dev/zba/src/HEL/AMD64/BootMain.cxx b/dev/zba/src/HEL/AMD64/BootMain.cxx
index 113f2d40..6010d21b 100644
--- a/dev/zba/src/HEL/AMD64/BootMain.cxx
+++ b/dev/zba/src/HEL/AMD64/BootMain.cxx
@@ -164,6 +164,7 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle,
// format the disk.
// ---------------------------------------------------- //
+#ifdef __AHCI__
if (!partition_factory.IsPartitionValid())
{
Boot::BDiskFormatFactory<BootDeviceATA>::BFileDescriptor root;
@@ -176,10 +177,12 @@ EFI_EXTERN_C EFI_API Int32 Main(EfiHandlePtr ImageHandle,
rt_reset_hardware();
}
+#endif
BS->GetMemoryMap(&size_struct_ptr, struct_ptr, &map_key, &sz_desc, &rev_desc);
struct_ptr = new EfiMemoryDescriptor[sz_desc];
+
BS->GetMemoryMap(&size_struct_ptr, struct_ptr, &map_key, &sz_desc, &rev_desc);
auto cDefaultMemoryMap = 0; // Grab any usable entries.