diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-25 08:19:06 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-25 08:19:06 +0200 |
| commit | f6a38d6c14b314d7b85855f311527ede869db96f (patch) | |
| tree | 8c6dfa8f2638d14b44ffb7b091e2d69efce34711 /Private/NewBoot/Source | |
| parent | 8153dc983802115951836f2b164af371ee6e3d73 (diff) | |
MHR-16: see below.
- Use QR-code to redirect to support page inside bootloader.
- Start working on NewLoader, since the PEF linker is done.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/Source')
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BootFileReader.cxx | 6 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BootMain.cxx | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Private/NewBoot/Source/HEL/AMD64/BootFileReader.cxx b/Private/NewBoot/Source/HEL/AMD64/BootFileReader.cxx index aab5db1f..0e126ada 100644 --- a/Private/NewBoot/Source/HEL/AMD64/BootFileReader.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/BootFileReader.cxx @@ -66,7 +66,7 @@ BFileReader::BFileReader(const CharacterTypeUTF16* path, if (efp->OpenVolume(efp, &rootFs) != kEfiOk) { mWriter.Write(L"New Boot: Fetch-Protocol: No-Such-Volume").Write(L"\r\n"); - EFI::RaiseHardError(L"NoSuchVolume", L"No Such volume."); + EFI::ThrowError(L"NoSuchVolume", L"No Such volume."); this->mErrorCode = kNotSupported; return; } @@ -78,7 +78,7 @@ BFileReader::BFileReader(const CharacterTypeUTF16* path, mWriter.Write(L"New Boot: Fetch-Protocol: No-Such-Path: ") .Write(mPath) .Write(L"\r\n"); - EFI::RaiseHardError(L"NoSuchPath", L"No Such file on filesystem."); + EFI::ThrowError(L"NoSuchPath", L"No Such file on filesystem."); this->mErrorCode = kNotSupported; return; } @@ -110,7 +110,7 @@ Void BFileReader::ReadAll(SizeT until, SizeT chunk) { if (auto err = BS->AllocatePool(EfiLoaderCode, until, (VoidPtr*)&mBlob) != kEfiOk) { mWriter.Write(L"*** EFI-Code: ").Write(err).Write(L" ***\r\n"); - EFI::RaiseHardError(L"NewBoot_PageError", L"Allocation error."); + EFI::ThrowError(L"NewBoot_PageError", L"Allocation error."); } } diff --git a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx index d314c949..7120bcd9 100644 --- a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx @@ -67,7 +67,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, if (BS->AllocatePool(EfiLoaderData, sizeof(UInt32), (VoidPtr*)&SizePtr) != kEfiOk) { - EFI::RaiseHardError(L"Bad-Alloc", L"New Boot ran out of memory!"); + EFI::ThrowError(L"Bad-Alloc", L"New Boot ran out of memory!"); } /**** @@ -80,7 +80,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, if (BS->AllocatePool(EfiLoaderData, sizeof(EfiMemoryDescriptor), (VoidPtr*)&Descriptor) != kEfiOk) { - EFI::RaiseHardError(L"Bad-Alloc", L"New Boot ran out of memory!"); + EFI::ThrowError(L"Bad-Alloc", L"New Boot ran out of memory!"); } HEL::HandoverInformationHeader* handoverHdrPtr = nullptr; @@ -179,14 +179,14 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, headerKind->Magic[3] == kPefMagic[3] && headerKind->Magic[4] == kPefMagic[4]) { if (headerKind->Abi != kPefAbi || headerKind->Cpu != kPefArchAMD64) { - EFI::RaiseHardError(L"Bad-Architecture", + EFI::ThrowError(L"Bad-Architecture", L"New Boot can't run this architecture."); } NewOS::HEL::BootMainKind main = (NewOS::HEL::BootMainKind) nullptr; if (!main) { - EFI::RaiseHardError(L"Bad-Exec", + EFI::ThrowError(L"Bad-Exec", L"New Boot can't recognize this executable."); } @@ -200,7 +200,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, } } - EFI::RaiseHardError(L"Invalid-PEF-Executable", L"PEF executable expected. Got something else."); + EFI::ThrowError(L"Invalid-PEF-Executable", L"PEF executable expected. Got something else."); return kEfiFail; } |
