diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-24 10:37:20 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-24 10:37:20 +0100 |
| commit | b842e2d8e09189d527006ca5b3dec58128afe953 (patch) | |
| tree | a410656e642c4ae4472c054b7c69fef98d2c5433 /Private/NewBoot/Source/BootMain.cxx | |
| parent | eaf9ec361fa0b9a56057a7143d15a0ee31258f0d (diff) | |
Kernel: :boom: Fixing stuff due to misguided efforts.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/Source/BootMain.cxx')
| -rw-r--r-- | Private/NewBoot/Source/BootMain.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Private/NewBoot/Source/BootMain.cxx b/Private/NewBoot/Source/BootMain.cxx index ea83e1f4..73ca1364 100644 --- a/Private/NewBoot/Source/BootMain.cxx +++ b/Private/NewBoot/Source/BootMain.cxx @@ -72,7 +72,7 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, .WriteString(L"\r\n"); #endif - BFileReader img(L"HCOREKRNL.EXE", ImageHandle); + BFileReader img(L"HCOREKRNL.DLL", ImageHandle); img.Size(kHeadersSz); img.ReadAll(); @@ -90,6 +90,13 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, ExecOptionalHeaderPtr optHdr = reinterpret_cast<ExecOptionalHeaderPtr>( ptrHdr + sizeof(ExecHeader)); + if (optHdr->mSubsystem != 0xAFAF) { + writer.WriteString(L"HCoreLdr: This is not an HCore app: Subsystem: ") + .WriteString(optHdr->mSubsystem) + .WriteString(L"\r\n"); + EFI::Stop(); + } + UInt32 MapKey = 0; UInt32* Size; EfiMemoryDescriptor* Descriptor; @@ -157,7 +164,7 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, #ifdef __BUNDLE_KERNEL__ RuntimeMain(handoverHdrPtr); #else - // Load HCoreKrnl.exe (TODO) + // Load HCoreKrnl.dll (TODO) #endif // ifdef __BUNDLE_KERNEL__ |
