mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
Panic message if OpenRuntime is wrong.
OC version.
This commit is contained in:
parent
0bca61ad3d
commit
f70da719e5
@ -1 +1 @@
|
||||
Subproject commit c8e7ee0a48ff20c7e50898a2d03f6c7592458c36
|
||||
Subproject commit 93feac4ed96bad9bb54a817e24426241e1df1d5f
|
@ -25,6 +25,7 @@ extern "C" {
|
||||
#include <Library/OcMainLib.h> // OcMiscEarlyInit
|
||||
//#include <Protocol/OcBootstrap.h> // OC_BOOTSTRAP_PROTOCOL
|
||||
#include <Library/OcBootManagementLib/BootManagementInternal.h>
|
||||
#include <Library/OcAfterBootCompatLib/BootCompatInternal.h>
|
||||
|
||||
#include <Guid/AppleApfsInfo.h>
|
||||
|
||||
|
@ -1189,6 +1189,29 @@ void LOADER_ENTRY::StartLoader()
|
||||
if ( !EFI_ERROR(Status) ) {
|
||||
Status = gBS->StartImage(DriverHandle, 0, 0);
|
||||
DBG("Start '%ls' : Status %s\n", OpenRuntimeEfiName.wc_str(), efiStrError(Status));
|
||||
|
||||
if ( !EFI_ERROR(Status) )
|
||||
{
|
||||
OC_FIRMWARE_RUNTIME_PROTOCOL *FwRuntime;
|
||||
Status = gBS->LocateProtocol (
|
||||
&gOcFirmwareRuntimeProtocolGuid,
|
||||
NULL,
|
||||
(VOID **) &FwRuntime
|
||||
);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (FwRuntime->Revision == OC_FIRMWARE_RUNTIME_REVISION) {
|
||||
} else {
|
||||
DEBUG ((
|
||||
DEBUG_ERROR,
|
||||
"OCABC: Incompatible OpenRuntime r%u, require r%u\n",
|
||||
(UINT32) FwRuntime->Revision,
|
||||
(UINT32) OC_FIRMWARE_RUNTIME_REVISION
|
||||
));
|
||||
panic("Incompatible OpenRuntime r%llu, require r%u\n", FwRuntime->Revision, OC_FIRMWARE_RUNTIME_REVISION);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
panic("Error when loading '%ls' : Status %s.\n", OpenRuntimeEfiName.wc_str(), efiStrError(Status));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user