diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-31 14:41:48 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-31 14:41:48 +0100 |
| commit | eb2046d6cc73540f540b30e94bf4593ddf24100e (patch) | |
| tree | 914d18ef616590806855a3c43bc2d2e1f17a420f /Private/NewBoot | |
| parent | c660c54ef256688553e3face26a8f6b5fe8553a7 (diff) | |
- Update UEFI implementation of SimpleTextProtocol.
- Working on BFileReader.
- Working on Interrupts for AMD64.
- Refactor copyright remove year.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot')
| -rw-r--r-- | Private/NewBoot/BootKit/BootKit.hxx | 6 | ||||
| -rw-r--r-- | Private/NewBoot/BootKit/Platform.hxx | 1 | ||||
| -rw-r--r-- | Private/NewBoot/BootKit/Protocol.hxx | 2 | ||||
| -rw-r--r-- | Private/NewBoot/NetBoot/module.cxx | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BootKit.cxx | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx | 10 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/Platform.cxx | 12 | ||||
| -rw-r--r-- | Private/NewBoot/Source/makefile | 2 |
8 files changed, 24 insertions, 13 deletions
diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx index e4c14d3a..6f0ee927 100644 --- a/Private/NewBoot/BootKit/BootKit.hxx +++ b/Private/NewBoot/BootKit/BootKit.hxx @@ -2,7 +2,7 @@ * ======================================================== * * NewBoot - * Copyright 2024 Mahrouss Logic, all rights reserved. + * Copyright Mahrouss Logic, all rights reserved. * * ======================================================== */ @@ -56,9 +56,11 @@ HCore::SizeT BSetMem(char *src, const char byte, const HCore::SizeT len); */ class BFileReader final { public: - explicit BFileReader() = default; + explicit BFileReader(const char *path); ~BFileReader() = default; + HCore::VoidPtr ReadAll(); + public: BFileReader &operator=(const BFileReader &) = default; BFileReader(const BFileReader &) = default; diff --git a/Private/NewBoot/BootKit/Platform.hxx b/Private/NewBoot/BootKit/Platform.hxx index d4143094..917678b9 100644 --- a/Private/NewBoot/BootKit/Platform.hxx +++ b/Private/NewBoot/BootKit/Platform.hxx @@ -20,5 +20,6 @@ extern "C" void rt_halt(); extern "C" void rt_cli(); extern "C" void rt_sti(); extern "C" void rt_cld(); +extern "C" void rt_std(); #endif /* ifdef __x86_64__ */ diff --git a/Private/NewBoot/BootKit/Protocol.hxx b/Private/NewBoot/BootKit/Protocol.hxx index d9f7836a..2f84d0a8 100644 --- a/Private/NewBoot/BootKit/Protocol.hxx +++ b/Private/NewBoot/BootKit/Protocol.hxx @@ -2,7 +2,7 @@ * ======================================================== * * NewBoot - * Copyright 2024 Mahrouss Logic, all rights reserved. + * Copyright Mahrouss Logic, all rights reserved. * * ======================================================== */ diff --git a/Private/NewBoot/NetBoot/module.cxx b/Private/NewBoot/NetBoot/module.cxx index 759e5cfe..b7e4727f 100644 --- a/Private/NewBoot/NetBoot/module.cxx +++ b/Private/NewBoot/NetBoot/module.cxx @@ -2,7 +2,7 @@ * ======================================================== * * NetBoot - * Copyright 2024 Mahrouss Logic, all rights reserved. + * Copyright Mahrouss Logic, all rights reserved. * * ======================================================== */ diff --git a/Private/NewBoot/Source/HEL/AMD64/BootKit.cxx b/Private/NewBoot/Source/HEL/AMD64/BootKit.cxx index b59c0140..e0dd5172 100644 --- a/Private/NewBoot/Source/HEL/AMD64/BootKit.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/BootKit.cxx @@ -2,7 +2,7 @@ * ======================================================== * * NewBoot - * Copyright 2024 Mahrouss Logic, all rights reserved. + * Copyright Mahrouss Logic, all rights reserved. * * ======================================================== */ diff --git a/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx b/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx index 5a34572b..7fd55ec1 100644 --- a/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/Entrypoint.cxx @@ -2,7 +2,7 @@ * ======================================================== * * NewBoot - * Copyright 2024 Mahrouss Logic, all rights reserved. + * Copyright Mahrouss Logic, all rights reserved. * * ======================================================== */ @@ -18,13 +18,19 @@ 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 disk...").WriteString(L"\r\n"); + writer.WriteString(L"HCoreLdr: Booting from \\Volume0\\...") + .WriteString(L"\r\n"); UInt64 mapKey = 0; // TODO: Jump Code + KeRuntimeStop(L"HCoreLdr", L"Couldn't find HCoreKrnl.exe! Aborting..."); + EFI::ExitBootServices(SystemTable, mapKey, ImageHandle); EFI::Stop(); diff --git a/Private/NewBoot/Source/HEL/AMD64/Platform.cxx b/Private/NewBoot/Source/HEL/AMD64/Platform.cxx index 729320b8..9b26f517 100644 --- a/Private/NewBoot/Source/HEL/AMD64/Platform.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/Platform.cxx @@ -2,7 +2,7 @@ * ======================================================== * * NewBoot - * Copyright 2024 Mahrouss Logic, all rights reserved. + * Copyright Mahrouss Logic, all rights reserved. * * ======================================================== */ @@ -16,10 +16,12 @@ #include <BootKit/Platform.hxx> -extern "C" void rt_halt(void) { asm volatile("hlt"); } +extern "C" void rt_halt() { asm volatile("hlt"); } -extern "C" void rt_cli(void) { asm volatile("cli"); } +extern "C" void rt_cli() { asm volatile("cli"); } -extern "C" void rt_sti(void) { asm volatile("sti"); } +extern "C" void rt_sti() { asm volatile("sti"); } -extern "C" void rt_cld(void) { asm volatile("cld"); } +extern "C" void rt_cld() { asm volatile("cld"); } + +extern "C" void rt_std() { asm volatile("std"); } diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile index 74ab7878..4e8f17d2 100644 --- a/Private/NewBoot/Source/makefile +++ b/Private/NewBoot/Source/makefile @@ -10,7 +10,7 @@ FLAG_GNU=-fshort-wchar -fPIC -D__DBG__ -DEFI_FUNCTION_WRAPPER -I../ -I../../ -I. .PHONY: invalid-recipe invalid-recipe: - @echo "invalid-recipe: Use make arch-<arch> all instead." + @echo "invalid-recipe: Use make bootloader-<arch> all instead." .PHONY: bootloader-amd64 bootloader-amd64: |
