From 21b3da78f806d6765f9dffa6a84c21346f171cee Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 21 Oct 2024 18:52:06 +0200 Subject: IMP: Implement AHCI support, can detect and read AHCI disks. TODO: Add Write support to the AHCI driver. Signed-off-by: Amlal El Mahrouss --- dev/zba/src/HEL/AMD64/BootATA.cxx | 2 +- dev/zba/src/HEL/AMD64/BootMain.cxx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'dev/zba/src') 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::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. -- cgit v1.2.3