diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-29 15:14:37 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-29 15:14:37 +0100 |
| commit | b89b9bc8ec4955f3eef3d34a4c917ace0a5cf2d9 (patch) | |
| tree | 4d82f613f7e2fbb306fb9ab8b86506b4334ebeee /Private/NewBoot/Source | |
| parent | e8af9b5cdc8efd7eee7a53c6fd78918fa2b0a810 (diff) | |
Bootloader: Add support for Boot Services.
Kernel: Did refactor to code in Drive Manager, XPM has become EPM.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/Source')
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/EfiMain.cxx | 11 | ||||
| -rw-r--r-- | Private/NewBoot/Source/makefile | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/Private/NewBoot/Source/HEL/AMD64/EfiMain.cxx b/Private/NewBoot/Source/HEL/AMD64/EfiMain.cxx index a6b80fc1..0102fa8c 100644 --- a/Private/NewBoot/Source/HEL/AMD64/EfiMain.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/EfiMain.cxx @@ -11,14 +11,15 @@ #include <BootKit/Processor.hxx> #include <BootKit/Protocol.hxx> -extern "C" int EfiMain(void *ImageHandle, EfiSystemTable *SystemTable) +EFI_EXTERN_C int EfiMain(EfiHandlePtr ImageHandle, EfiSystemTable *SystemTable) { - SystemTable->conOut->outputString(SystemTable->conOut, L"HCoreLdr: Starting HCore...\r\n"); + SystemTable->ConOut->OutputString(SystemTable->ConOut, L"HCoreLdr: Starting \\EPM\\HCore...\r\n"); - while (true) + if (SystemTable->BootServices->ExitBootServices(ImageHandle, kBaseHandoverStruct) != kEfiOk) { - rt_cli(); - rt_halt(); + SystemTable->ConOut->OutputString(SystemTable->ConOut, L"HCoreLdr: Could not Exit UEFI!\r\nHanging...\r\n"); + + return kEfiFail; } return kEfiOk; diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile index b84f4425..6ccec377 100644 --- a/Private/NewBoot/Source/makefile +++ b/Private/NewBoot/Source/makefile @@ -1,5 +1,6 @@ ################################################## # ; (C) Mahrouss Logic, 2024, all rights reserved. +# This is the bootloader makefile. ################################################## CC_GNU=x86_64-w64-mingw32-g++ |
