summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-30 17:59:15 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-30 17:59:15 +0100
commit1be243700efc9e36060c5fb65c951d5db6b98e94 (patch)
tree2f57d5092f4de4798e80e80b6dd29f984edb7683 /Private/NewBoot
parent1d3bed385c9666db5b1803ee8e02a2c4fdcc9f29 (diff)
Add ROADMAP details, add EFI Library for bootloader.
Add assignee to code in MailMap. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot')
-rw-r--r--Private/NewBoot/BootKit/BootKit.hxx (renamed from Private/NewBoot/BootKit/Boot.hxx)0
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/BootKit.cxx (renamed from Private/NewBoot/Source/HEL/AMD64/Boot.cxx)2
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx25
3 files changed, 8 insertions, 19 deletions
diff --git a/Private/NewBoot/BootKit/Boot.hxx b/Private/NewBoot/BootKit/BootKit.hxx
index 70607a9c..70607a9c 100644
--- a/Private/NewBoot/BootKit/Boot.hxx
+++ b/Private/NewBoot/BootKit/BootKit.hxx
diff --git a/Private/NewBoot/Source/HEL/AMD64/Boot.cxx b/Private/NewBoot/Source/HEL/AMD64/BootKit.cxx
index b3ff2206..68971e0c 100644
--- a/Private/NewBoot/Source/HEL/AMD64/Boot.cxx
+++ b/Private/NewBoot/Source/HEL/AMD64/BootKit.cxx
@@ -7,7 +7,7 @@
* ========================================================
*/
-#include <BootKit/Boot.hxx>
+#include <BootKit/BootKit.hxx>
constexpr HCore::UInt32 kVGABaseAddress = 0xb8000;
diff --git a/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx b/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx
index f155311f..b3e63bd9 100644
--- a/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx
+++ b/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx
@@ -7,39 +7,28 @@
* ========================================================
*/
-#include <BootKit/Boot.hxx>
+#define __BOOTLOADER__ 1
-namespace Detail {
-/**
-@brief Stop Execution of Bootloader.
-@param SystemTable EFI System Table.
-*/
-Void Stop(EfiSystemTable* SystemTable) noexcept {
- SystemTable->ConOut->OutputString(SystemTable->ConOut,
- L"HCoreLdr: Hanging...\r\n");
-
- while (true) {
- rt_cli();
- rt_halt();
- }
-}
-} // namespace Detail
+#include <BootKit/BootKit.hxx>
+#include <EFIKit/EFILib.hxx>
// don't remove EfiGUID, it will call initializer_list!
EFI_EXTERN_C int EfiMain(EfiHandlePtr ImageHandle,
EfiSystemTable* SystemTable) {
+ KeInitEFI(SystemTable);
+
SystemTable->ConOut->OutputString(SystemTable->ConOut,
L"HCoreLdr: Initializing...\r\n");
EfiLoadImageProtocol* protocol = nullptr;
EfiGUID guid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
- Int32 status_code = SystemTable->BootServices->OpenProtocol(
+ Int32 statusCode = SystemTable->BootServices->OpenProtocol(
ImageHandle, &guid, (VoidPtr*)&protocol, ImageHandle, nullptr,
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
- if (status_code != kEfiOk) {
+ if (statusCode != kEfiOk) {
SystemTable->ConOut->OutputString(
SystemTable->ConOut,
L"HCoreLdr: Could not locate EfiLoadImageProtocol! Aborting...\r\n");