From d3c9b5287789534340146ffdb696f67aa8b7308d Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 25 Apr 2024 12:12:19 +0200 Subject: MHR-16: Format, and revert previous staged commit. Signed-off-by: Amlal El Mahrouss --- Private/FirmwareKit/EFI/API.hxx | 7 ------- Private/NewBoot/Source/HEL/AMD64/BootMain.cxx | 18 +++++++++++------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Private/FirmwareKit/EFI/API.hxx b/Private/FirmwareKit/EFI/API.hxx index 093d10b3..0e2ef200 100644 --- a/Private/FirmwareKit/EFI/API.hxx +++ b/Private/FirmwareKit/EFI/API.hxx @@ -121,13 +121,6 @@ inline void InitEFI(EfiSystemTable *SystemTable) noexcept { ST->BootServices->SetWatchdogTimer(0, 0, 0, nullptr); ST->ConOut->EnableCursor(ST->ConOut, false); - - if (ST->FirmwareVendor[0] != '@' || - ST->FirmwareVendor[1] != 'M' || - ST->FirmwareVendor[1] != 'H' || - ST->FirmwareVendor[1] != 'R') { - EFI::ThrowError(L"Unsupported Firmware", L"Firmware is unsupported, please build OVMF by yourself."); - } } #ifdef __BOOTLOADER__ diff --git a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx index cdbb2f36..356db88b 100644 --- a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx @@ -4,13 +4,13 @@ ------------------------------------------- */ -#include -#include #include #include +#include #include #include #include +#include /** Graphics related. */ @@ -178,16 +178,19 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, containerKind->Magic[2] == kPefMagic[2] && containerKind->Magic[3] == kPefMagic[3] && containerKind->Magic[4] == kPefMagic[4]) { - if (containerKind->Abi != kPefAbi || containerKind->Cpu != kPefArchAMD64) { + if (containerKind->Abi != kPefAbi || + containerKind->Cpu != kPefArchAMD64) { EFI::ThrowError(L"Bad-Architecture", - L"New Boot can't run this architecture."); + L"New Boot can't run this architecture."); } - NewOS::HEL::BootMainKind main = reinterpret_cast(containerKind + containerKind->Start); + NewOS::HEL::BootMainKind main = + reinterpret_cast(containerKind + + containerKind->Start); if (!main) { EFI::ThrowError(L"Bad-Exec", - L"New Boot can't recognize this executable."); + L"New Boot can't recognize this executable."); } EFI::ExitBootServices(MapKey, ImageHandle); @@ -200,7 +203,8 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, } } - EFI::ThrowError(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; } -- cgit v1.2.3