diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-08 14:17:29 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-08 14:17:29 +0200 |
| commit | ed7987748e6d55fb17cd965f4eb2abf948c1f81a (patch) | |
| tree | 4498a91b9d49ee07d8e3b1648f3aa9b876313d8f | |
| parent | 6dfe91e2f6d91011c57e0dd0858a7907f35bb71b (diff) | |
boot: urgent nekernel patches.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | dev/boot/modules/SysChk/SysChk.cc | 16 | ||||
| -rw-r--r-- | dev/boot/src/HEL/AMD64/BootEFI.cc | 7 |
2 files changed, 18 insertions, 5 deletions
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,6 +21,11 @@ #include <BootKit/BootThread.h> #include <modules/CoreGfx/CoreGfx.h> +// Makes the compiler shut up. +#ifndef kMachineModel +#define kMachineModel "NeKrnl" +#endif // !kMachineModel + EXTERN_C Int32 SysChkModuleMain(Kernel::HEL::BootInfoHeader* handover) { #ifdef __NE_AMD64__ @@ -29,6 +34,17 @@ EXTERN_C Int32 SysChkModuleMain(Kernel::HEL::BootInfoHeader* handover) if (partition_factory.IsPartitionValid()) return kEfiOk; + Boot::BDiskFormatFactory<BootDeviceATA>::BFileDescriptor desc{}; + + desc.fFileName[0] = '/'; + desc.fFileName[1] = 0; + desc.fKind = kNeFSCatalogKindDir; + + partition_factory.Format(kMachineModel, &desc, sizeof(Boot::BDiskFormatFactory<BootDeviceATA>::BFileDescriptor)); + + if (partition_factory.IsPartitionValid()) + return kEfiOk; + return kEfiFail; #else 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 <BootKit/BootThread.h> #include <modules/CoreGfx/CoreGfx.h> -// 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(); } } |
