diff options
| author | Amlal <amlal@zka.com> | 2024-07-17 17:21:57 +0200 |
|---|---|---|
| committer | Amlal <amlal@zka.com> | 2024-07-17 17:21:57 +0200 |
| commit | 08ee53082f5c4d0f730336a821c154515c76f4de (patch) | |
| tree | 01b8d5593929acae9651651a7ef59f12f58c1066 /Boot/Sources | |
| parent | 7b8f6b0644e16614ebb07983ff2e8809581f8350 (diff) | |
[MHR-36] Rendering QR code when user is using AMD64 release of newosldr.
Signed-off-by: Amlal <amlal@zka.com>
Diffstat (limited to 'Boot/Sources')
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootMain.cxx | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/Boot/Sources/HEL/AMD64/BootMain.cxx b/Boot/Sources/HEL/AMD64/BootMain.cxx index 13c887ff..51f8e8cf 100644 --- a/Boot/Sources/HEL/AMD64/BootMain.cxx +++ b/Boot/Sources/HEL/AMD64/BootMain.cxx @@ -58,7 +58,7 @@ STATIC Void InitVideoFB() noexcept for (SizeT i = 0; i < kGop->Mode->MaxMode; ++i) { EfiGraphicsOutputProtocolModeInformation* infoPtr = nullptr; - UInt32 sz = 0U; + UInt32 sz = 0U; kGop->QueryMode(kGop, i, &sz, &infoPtr); @@ -69,7 +69,6 @@ STATIC Void InitVideoFB() noexcept break; } } - } /// @brief check the BootDevice if suitable. @@ -98,14 +97,6 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, .Write(BVersionString::The()) .Write("\r"); -#ifndef __DEBUG__ - writer.Write(L"\rnewosldr: AMD64 is only supported in debug mode.\r"); - - EFI::Stop(); - - CANT_REACH(); -#endif - UInt32* MapKey = new UInt32(); UInt32* SizePtr = new UInt32(); EfiMemoryDescriptor* Descriptor = nullptr; @@ -158,20 +149,13 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, kHandoverHeader = handoverHdrPtr; - // Start drawing the 'zka' icon. - - CGInit(); - - CGDrawInRegion(cCGClearClr, handoverHdrPtr->f_GOP.f_Height, - handoverHdrPtr->f_GOP.f_Width, 0, 0); - - CGFini(); - - CGDrawBitMapInRegion(NewBoot, NEWBOOT_HEIGHT, NEWBOOT_WIDTH, - (handoverHdrPtr->f_GOP.f_Width - NEWBOOT_WIDTH) / 2, - (handoverHdrPtr->f_GOP.f_Height - NEWBOOT_HEIGHT) / 2); + // check if we are in AMD64 +#if defined(__NEWOS_AMD64__) + writer.Write(L"\rnewosldr: AMD64 support is not official.\r"); + EFI::ThrowError(L"Beta-Software", L"Beta Software."); +#endif - CGFini(); + // get memory map. BS->GetMemoryMap(SizePtr, Descriptor, MapKey, SzDesc, RevDesc); |
