diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-03-04 15:38:28 +0000 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-03-04 15:38:28 +0000 |
| commit | 357e7a82bc85acee0ed05c6dc0fd870990859df9 (patch) | |
| tree | 896663a5f2ec9498513b99659c5d73a8718ece7e /Private/NewBoot | |
| parent | 332fab8d57aac52b9664785cbda989260962a41c (diff) | |
| parent | 64c8674bc09985fcf7119cfb2b88cad3081b1603 (diff) | |
Merge branch 'unstable' into 'trunk'
HCoreKrnl:HAL: Work on interrupts for AMD64
See merge request mahrouss-logic/micro-kernel!8
Diffstat (limited to 'Private/NewBoot')
| -rw-r--r-- | Private/NewBoot/BootKit/EPM.hxx | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/BootMain.cxx | 26 |
2 files changed, 10 insertions, 18 deletions
diff --git a/Private/NewBoot/BootKit/EPM.hxx b/Private/NewBoot/BootKit/EPM.hxx index 328906f2..2d20237d 100644 --- a/Private/NewBoot/BootKit/EPM.hxx +++ b/Private/NewBoot/BootKit/EPM.hxx @@ -9,4 +9,4 @@ #pragma once -#include <EFIKit/EPM.hxx> +#include <FirmwareKit/EPM.hxx> diff --git a/Private/NewBoot/Source/BootMain.cxx b/Private/NewBoot/Source/BootMain.cxx index 53a217b6..67c6929a 100644 --- a/Private/NewBoot/Source/BootMain.cxx +++ b/Private/NewBoot/Source/BootMain.cxx @@ -7,8 +7,6 @@ * ======================================================== */ -#define __BOOTLOADER__ 1 - #include <BootKit/BootKit.hxx> #include <KernelKit/MSDOS.hpp> #include <KernelKit/PE.hpp> @@ -21,7 +19,7 @@ #endif // ifdef __x86_64__ #ifndef kBootKrnlSections -#error Please provide the amount of sections the kernel has. +#error [NewBoot/HCoreLdr] Please provide the amount of sections the kernel has. #endif // !kBootKrnlSections #define kBootReadSize \ @@ -33,11 +31,13 @@ typedef void (*bt_main_type)(HEL::HandoverInformationHeader* HIH); EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, EfiSystemTable* SystemTable) { - InitEFI(SystemTable); - InitQT(); + InitEFI(SystemTable); // Init the efi library. + InitQT(); // Quick Toolkit for UI BTextWriter writer; + /// Splash screen stuff + writer.Write(L"MahroussLogic (R) HCoreLdr: "); writer.Write(BVersionString::Shared()).Write(L"\r\n"); @@ -52,6 +52,8 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, .Write(SystemTable->FirmwareVendor) .Write(L"\r\n"); + /// Read Kernel blob. + BFileReader kernelImg(L"HCOREKRNL.EXE", ImageHandle); kernelImg.Size(kBootReadSize); @@ -70,6 +72,7 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, ExecOptionalHeaderPtr optHdr = reinterpret_cast<ExecOptionalHeaderPtr>( (UIntPtr)&ptrHdr->mCharacteristics + 1); + // first check for kernel.cfg inside ESP/EPM. BFileReader systemIni(L"KERNEL.CFG", ImageHandle); systemIni.Size(1); @@ -83,18 +86,7 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, UInt64 posSeek = 0; - /**** - * - * LOAD KERNEL CODE - * - * - * - * - * - * - * - * LOAD KERNEL CODE - */ + // load sections here kernelImg.File()->SetPosition(kernelImg.File(), &posSeek); kernelImg.Size(kBootReadSize + |
