From ed7987748e6d55fb17cd965f4eb2abf948c1f81a Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 8 Apr 2025 14:17:29 +0200 Subject: boot: urgent nekernel patches. Signed-off-by: Amlal El Mahrouss --- dev/boot/modules/SysChk/SysChk.cc | 16 ++++++++++++++++ dev/boot/src/HEL/AMD64/BootEFI.cc | 7 ++----- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'dev') diff --git a/dev/boot/modules/SysChk/SysChk.cc b/dev/boot/modules/SysChk/SysChk.cc index f9af8517..471b89a4 100644 --- a/dev/boot/modules/SysChk/SysChk.cc +++ b/dev/boot/modules/SysChk/SysChk.cc @@ -21,11 +21,27 @@ #include #include +// Makes the compiler shut up. +#ifndef kMachineModel +#define kMachineModel "NeKrnl" +#endif // !kMachineModel + EXTERN_C Int32 SysChkModuleMain(Kernel::HEL::BootInfoHeader* handover) { #ifdef __NE_AMD64__ Boot::BDiskFormatFactory partition_factory; + if (partition_factory.IsPartitionValid()) + return kEfiOk; + + Boot::BDiskFormatFactory::BFileDescriptor desc{}; + + desc.fFileName[0] = '/'; + desc.fFileName[1] = 0; + desc.fKind = kNeFSCatalogKindDir; + + partition_factory.Format(kMachineModel, &desc, sizeof(Boot::BDiskFormatFactory::BFileDescriptor)); + if (partition_factory.IsPartitionValid()) return kEfiOk; diff --git a/dev/boot/src/HEL/AMD64/BootEFI.cc b/dev/boot/src/HEL/AMD64/BootEFI.cc index b7cda085..e07ad6d6 100644 --- a/dev/boot/src/HEL/AMD64/BootEFI.cc +++ b/dev/boot/src/HEL/AMD64/BootEFI.cc @@ -18,11 +18,6 @@ #include #include -// Makes the compiler shut up. -#ifndef kMachineModel -#define kMachineModel "Krnl" -#endif // !kMachineModel - #ifndef kExpectedWidth #define kExpectedWidth (800) #endif @@ -249,6 +244,8 @@ EFI_EXTERN_C EFI_API Int32 ModuleMain(EfiHandlePtr image_handle, FBDrawBitMapInRegion(zka_has_disk, NE_HAS_DISK_WIDTH, NE_HAS_DISK_HEIGHT, (kHandoverHeader->f_GOP.f_Width - NE_HAS_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - NE_HAS_DISK_HEIGHT) / 2); fb_clear(); + + Boot::Stop(); } } -- cgit v1.2.3