// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) // Official repository: https://github.com/ne-foss-org/nekernel #include #include #include #include #include #include #include #include #include #include #include #include #include // Makes the compiler shut up. #ifndef kMachineModel #define kMachineModel "OS" #endif // !kMachineModel EXTERN_C Int32 SysChkModuleMain(Kernel::HEL::BootInfoHeader* handover) { fw_init_efi((EfiSystemTable*) handover->f_FirmwareCustomTables[Kernel::HEL::kHandoverTableST]); #if defined(__ATA_PIO__) Boot::BDiskFormatFactory partition_factory; #elif defined(__AHCI__) Boot::BDiskFormatFactory partition_factory; #endif if (!partition_factory.IsPartitionValid()) return kEfiFail; return partition_factory.Format(kMachineModel); }