From fb0d208bb2c6d8322ff1d483d92d143c6aaef9c1 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 13 Feb 2024 08:48:42 +0100 Subject: HCR-15: Improve kernel and bootloader. Signed-off-by: Amlal El Mahrouss --- Private/NewBoot/Source/FileReader.cxx | 17 +++++++---------- Private/NewBoot/Source/HEL/AMD64/AMD64-AHCI.cxx | 2 +- Private/NewBoot/Source/HEL/AMD64/AMD64-ATA.cxx | 2 +- Private/NewBoot/Source/RuntimeMain.cxx | 6 +++++- 4 files changed, 14 insertions(+), 13 deletions(-) (limited to 'Private/NewBoot/Source') diff --git a/Private/NewBoot/Source/FileReader.cxx b/Private/NewBoot/Source/FileReader.cxx index b26c4d78..5768cae0 100644 --- a/Private/NewBoot/Source/FileReader.cxx +++ b/Private/NewBoot/Source/FileReader.cxx @@ -19,11 +19,12 @@ /// BUGS: 0 //////////////////////////////////////////////////////////////////////////////////////////////////// -// -// -// @brief BImageReader class -// -// +/// +/// +/// @name BFileReader class +/// @brief Reads the file as a blob. +/// +/// //////////////////////////////////////////////////////////////////////////////////////////////////// /*** @@ -102,11 +103,7 @@ BFileReader::~BFileReader() { @brief this reads all of the buffer. @param ImageHandle used internally. */ -Void BFileReader::ReadAll() { - mWriter.WriteString(L"HCoreLdr: ReadAll: ") - .WriteString(mPath) - .WriteString(L"\r\n"); - +Void BFileReader::Read() { /// Allocate Handover page. if (mBlob == nullptr) { diff --git a/Private/NewBoot/Source/HEL/AMD64/AMD64-AHCI.cxx b/Private/NewBoot/Source/HEL/AMD64/AMD64-AHCI.cxx index 2363f8cb..357bd591 100644 --- a/Private/NewBoot/Source/HEL/AMD64/AMD64-AHCI.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/AMD64-AHCI.cxx @@ -14,7 +14,7 @@ * @version 0.1 * @date 2024-02-02 * - * @copyright Copyright (c) 2024 Mahrouss Logic + * @copyright Copyright (c) Mahrouss Logic * */ diff --git a/Private/NewBoot/Source/HEL/AMD64/AMD64-ATA.cxx b/Private/NewBoot/Source/HEL/AMD64/AMD64-ATA.cxx index 757c294d..5382fd30 100644 --- a/Private/NewBoot/Source/HEL/AMD64/AMD64-ATA.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/AMD64-ATA.cxx @@ -14,7 +14,7 @@ * @version 0.1 * @date 2024-02-02 * - * @copyright Copyright (c) 2024 Mahrouss Logic + * @copyright Copyright (c) Mahrouss Logic * */ diff --git a/Private/NewBoot/Source/RuntimeMain.cxx b/Private/NewBoot/Source/RuntimeMain.cxx index 40d9e819..a520b980 100644 --- a/Private/NewBoot/Source/RuntimeMain.cxx +++ b/Private/NewBoot/Source/RuntimeMain.cxx @@ -48,10 +48,14 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, .WriteString(SystemTable->FirmwareVendor) .WriteString(L"\r\n"); + writer.WriteString(L"HCoreLdr: Reading: ") + .WriteString(L"HCOREKRNL.EXE") + .WriteString(L"\r\n"); + BFileReader img(L"HCOREKRNL.EXE", ImageHandle); img.Size() = Detail::kBufferReadSz; - img.ReadAll(); + img.Read(); if (img.Error() == BFileReader::kOperationOkay) { BlobType blob = (BlobType)img.Blob(); -- cgit v1.2.3