summaryrefslogtreecommitdiffhomepage
path: root/dev/boot/modules/SysChk/SysChk.cc
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-04-27 17:30:36 +0200
committerAmlal <amlal@nekernel.org>2025-04-27 17:30:36 +0200
commitcb2f383f45dda8d1cdcef0b87fe4c70243659701 (patch)
treef109c3c44fa3f142d34f8ca61cfa69672e556614 /dev/boot/modules/SysChk/SysChk.cc
parent14d5ee9e0cfededddfceec73d5dfa8a2fcda6c5d (diff)
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 <amlal@nekernel.org>
Diffstat (limited to 'dev/boot/modules/SysChk/SysChk.cc')
-rw-r--r--dev/boot/modules/SysChk/SysChk.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/dev/boot/modules/SysChk/SysChk.cc b/dev/boot/modules/SysChk/SysChk.cc
index a3697bb1..05ac6da0 100644
--- a/dev/boot/modules/SysChk/SysChk.cc
+++ b/dev/boot/modules/SysChk/SysChk.cc
@@ -9,6 +9,7 @@
#include <BootKit/BootKit.h>
#include <BootKit/BootThread.h>
+#include <BootKit/HW/SATA.h>
#include <FirmwareKit/EFI.h>
#include <FirmwareKit/EFI/API.h>
#include <FirmwareKit/Handover.h>
@@ -26,17 +27,16 @@
#endif // !kMachineModel
EXTERN_C Int32 SysChkModuleMain(Kernel::HEL::BootInfoHeader* handover) {
-#if defined(__ATA_PIO__)
fw_init_efi((EfiSystemTable*) handover->f_FirmwareCustomTables[1]);
+#if defined(__ATA_PIO__)
Boot::BDiskFormatFactory<BootDeviceATA> partition_factory;
-
+#elif defined(__AHCI__)
+ Boot::BDiskFormatFactory<BootDeviceSATA> partition_factory;
+#endif
if (partition_factory.IsPartitionValid()) return kEfiOk;
- return partition_factory.Format(kMachineModel) == YES;
-#else
- NE_UNUSED(handover);
+ auto ret = partition_factory.Format(kMachineModel) == YES;
- return kEfiOk;
-#endif
+ return ret;
}