From 4c7aebf1b8964b99b89a25da0965b30fe6c7e6b3 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 16 Feb 2024 14:57:04 +0100 Subject: HCR-18: Last commit, working on HCR-12 now. Signed-off-by: Amlal El Mahrouss --- Private/NewBoot/BootKit/BootKit.hxx | 2 +- Private/NewBoot/Source/FileReader.cxx | 2 +- Private/NewBoot/Source/RuntimeMain.cxx | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx index d8865712..dcb8daf4 100644 --- a/Private/NewBoot/BootKit/BootKit.hxx +++ b/Private/NewBoot/BootKit/BootKit.hxx @@ -64,7 +64,7 @@ class BFileReader final { explicit BFileReader(const CharacterType *path, EfiHandlePtr ImageHandle); ~BFileReader(); - Void Read(); + Void ReadAll(); enum { kOperationOkay, diff --git a/Private/NewBoot/Source/FileReader.cxx b/Private/NewBoot/Source/FileReader.cxx index 5768cae0..d81248ea 100644 --- a/Private/NewBoot/Source/FileReader.cxx +++ b/Private/NewBoot/Source/FileReader.cxx @@ -103,7 +103,7 @@ BFileReader::~BFileReader() { @brief this reads all of the buffer. @param ImageHandle used internally. */ -Void BFileReader::Read() { +Void BFileReader::ReadAll() { /// Allocate Handover page. if (mBlob == nullptr) { diff --git a/Private/NewBoot/Source/RuntimeMain.cxx b/Private/NewBoot/Source/RuntimeMain.cxx index 78e73db2..38eb0ea8 100644 --- a/Private/NewBoot/Source/RuntimeMain.cxx +++ b/Private/NewBoot/Source/RuntimeMain.cxx @@ -21,7 +21,7 @@ #error Unknown CPU. #endif // ifdef __x86_64__ -#define kBufferReadSz \ +#define kHeadersSz \ (sizeof(DosHeader) + sizeof(ExecHeader) + sizeof(ExecOptionalHeader)) EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, @@ -53,8 +53,8 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, BFileReader img(L"HCOREKRNL.EXE", ImageHandle); - img.Size(kBufferReadSz); - img.Read(); + img.Size(kHeadersSz); + img.ReadAll(); if (img.Error() == BFileReader::kOperationOkay) { BlobType blob = (BlobType)img.Blob(); -- cgit v1.2.3