diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-31 17:09:04 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-31 17:09:04 +0100 |
| commit | 8f7904569a60721cfd051a359dd17cc86ea67cfe (patch) | |
| tree | ad432b67b1ec26cf560c4ad7a02ed8322b36d4b2 /Private | |
| parent | 91a554f36af763394835f29ecdefdf2d6448a6c3 (diff) | |
Kernel: add Terminal init sequence in KeInitEFI.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private')
| -rw-r--r-- | Private/EFIKit/EFILib.hxx | 3 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx | 5 | ||||
| -rw-r--r-- | Private/Source/NewFS-Journal.cxx | 8 | ||||
| -rw-r--r-- | Private/makefile | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/Private/EFIKit/EFILib.hxx b/Private/EFIKit/EFILib.hxx index 0d076b24..e7b135ef 100644 --- a/Private/EFIKit/EFILib.hxx +++ b/Private/EFIKit/EFILib.hxx @@ -43,6 +43,9 @@ inline void KeInitEFI(EfiSystemTable* SystemTable) noexcept { ST = SystemTable; BS = ST->BootServices; + + ST->ConOut->ClearScreen(SystemTable->ConOut); + ST->ConOut->SetAttribute(SystemTable->ConOut, kEFIYellow); } inline void KeRuntimeStop(const EfiCharType* ErrorCode, diff --git a/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx b/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx index 3e96ff14..17d308df 100644 --- a/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx @@ -18,16 +18,13 @@ EFI_EXTERN_C int EfiMain(EfiHandlePtr ImageHandle, EfiSystemTable* SystemTable) { KeInitEFI(SystemTable); - SystemTable->ConOut->ClearScreen(SystemTable->ConOut); - SystemTable->ConOut->SetAttribute(SystemTable->ConOut, kEFIYellow); - BTextWriter writer; writer.WriteString(L"HCoreLdr: Booting from \\Volume0\\...") .WriteString(L"\r\n"); UInt64 mapKey = 0; - BFileReader reader(L"\\MAHROUSS\\Root\\System\\HCoreKrnl.efi\0"); + BFileReader reader(L"\\MAHROUSS\\Root\\System\\HCoreKrnl.exe\0"); auto blob = reader.ReadAll(); if (!blob) diff --git a/Private/Source/NewFS-Journal.cxx b/Private/Source/NewFS-Journal.cxx index 1412c7b0..029e051a 100644 --- a/Private/Source/NewFS-Journal.cxx +++ b/Private/Source/NewFS-Journal.cxx @@ -27,13 +27,13 @@ class NewFSJournalRunner final { : fLoadRoutine(load_runner) { MUST_PASS(fLoadRoutine); - fLoadRoutine(this); + // load runner + if (fLoadRoutine) fLoadRoutine(this); } + /// @brief Unload journal runner ~NewFSJournalRunner() noexcept { - MUST_PASS(fUnloadRoutine); - - fUnloadRoutine(this); + if (fUnloadRoutine) fUnloadRoutine(this); } HCORE_COPY_DEFAULT(NewFSJournalRunner); diff --git a/Private/makefile b/Private/makefile index 9ac4a434..5ec3e277 100644 --- a/Private/makefile +++ b/Private/makefile @@ -10,7 +10,7 @@ ASM = nasm ASMFLAGS = -f elf64 # This file is the kernel, responsible of task management, memory, drivers and more. -KERNEL = HCoreKrnl.efi +KERNEL = HCoreKrnl.exe # The kernel entrypoint SCRIPT = --script=Linker/Platforms/PC.lds |
