diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-30 23:15:54 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-30 23:15:54 +0100 |
| commit | 7bed9287589293bd9d712d152539591dee0b28c0 (patch) | |
| tree | 63977e35e13da414db1ea67d25a75a88ff1bc306 /Private/NewBoot/Source | |
| parent | 71a35e96d5597fca8882e96976e9461dc3dd85e9 (diff) | |
Add BFileReader class, next step will be implementing .Size(),
.Read()
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/Source')
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BootKit.cxx | 12 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx | 6 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/Platform.cxx | 2 |
3 files changed, 14 insertions, 6 deletions
diff --git a/Private/NewBoot/Source/HEL/AMD64/BootKit.cxx b/Private/NewBoot/Source/HEL/AMD64/BootKit.cxx index 19df55b0..b59c0140 100644 --- a/Private/NewBoot/Source/HEL/AMD64/BootKit.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/BootKit.cxx @@ -10,7 +10,7 @@ #include <BootKit/BootKit.hxx> #include <EFIKit/EFILib.hxx> -#include "EFIKit/EFI.hxx" +/// bugs 0 HCore::SizeT BStrLen(const char *ptr) { long long int cnt = 0; @@ -41,18 +41,22 @@ HCore::SizeT BSetMem(char *src, const char byte, const HCore::SizeT len) { /** @brief puts wrapper over VGA. */ -void BTextWriter::WriteString(const CharacterType *str) { - if (*str == 0 || !str) return; +BTextWriter &BTextWriter::WriteString(const CharacterType *str) { + if (*str == 0 || !str) return *this; ST->ConOut->OutputString(ST->ConOut, str); + + return *this; } /** @brief putc wrapper over VGA. */ -void BTextWriter::WriteCharacter(CharacterType c) { +BTextWriter &BTextWriter::WriteCharacter(CharacterType c) { EfiCharType str[2]; str[0] = c; str[1] = 0; ST->ConOut->OutputString(ST->ConOut, str); + + return *this; } diff --git a/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx b/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx index 89b3ece2..862226c2 100644 --- a/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx @@ -19,10 +19,14 @@ EFI_EXTERN_C int EfiMain(EfiHandlePtr ImageHandle, KeInitEFI(SystemTable); BTextWriter writer; - writer.WriteString(L"HCoreLdr: Booting from disk...\r\n"); + writer.WriteString(L"HCoreLdr: Booting from disk...").WriteString(L"\r\n"); + + UInt64 mapKey = 0; // TODO: Jump Code + EFI::ExitBootServices(SystemTable, mapKey, ImageHandle); EFI::Stop(SystemTable); + return kEfiOk; } diff --git a/Private/NewBoot/Source/HEL/AMD64/Platform.cxx b/Private/NewBoot/Source/HEL/AMD64/Platform.cxx index f72e0be1..729320b8 100644 --- a/Private/NewBoot/Source/HEL/AMD64/Platform.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/Platform.cxx @@ -14,7 +14,7 @@ * */ -#include <BootKit/Processor.hxx> +#include <BootKit/Platform.hxx> extern "C" void rt_halt(void) { asm volatile("hlt"); } |
