summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-29 15:14:37 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-29 15:14:37 +0100
commitb89b9bc8ec4955f3eef3d34a4c917ace0a5cf2d9 (patch)
tree4d82f613f7e2fbb306fb9ab8b86506b4334ebeee /Private/NewBoot
parente8af9b5cdc8efd7eee7a53c6fd78918fa2b0a810 (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')
-rw-r--r--Private/NewBoot/CxxRuntime/manifest.json4
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/EfiMain.cxx11
-rw-r--r--Private/NewBoot/Source/makefile1
3 files changed, 9 insertions, 7 deletions
diff --git a/Private/NewBoot/CxxRuntime/manifest.json b/Private/NewBoot/CxxRuntime/manifest.json
index 42b5d166..e4afd692 100644
--- a/Private/NewBoot/CxxRuntime/manifest.json
+++ b/Private/NewBoot/CxxRuntime/manifest.json
@@ -1,3 +1,3 @@
{
- "pluginName": "C++Kit"
-} \ No newline at end of file
+ "pluginName": "MP-C++ Runtime for HCore."
+}
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++