Skip to content

Commit

Permalink
sbat.c: add user facing message when SBAT self check fails
Browse files Browse the repository at this point in the history
This also increases the time until shutdown to 8 seconds.

Signed-off-by: Thore Sommer <[email protected]>
  • Loading branch information
THS-on committed Jul 23, 2024
1 parent 0287c6b commit c2a22f9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion shim.c
Original file line number Diff line number Diff line change
Expand Up @@ -1966,10 +1966,18 @@ efi_main (EFI_HANDLE passed_image_handle, EFI_SYSTEM_TABLE *passed_systab)
die:
console_print(L"Something has gone seriously wrong: %s: %r\n",
msgs[msg], efi_status);

/*
* Provide additional information when the SBAT self check fails
*/
if ( msg == SBAT_SELF_CHECK ) {
console_print(L"\nThe current shim has likely been revoked. "
"Please update to a newer shim version.\n");
}
#if defined(ENABLE_SHIM_DEVEL)
devel_egress(COLD_RESET);
#else
usleep(5000000);
usleep(8000000);
RT->ResetSystem(EfiResetShutdown, EFI_SECURITY_VIOLATION,
0, NULL);
#endif
Expand Down

0 comments on commit c2a22f9

Please sign in to comment.