Hi Mikhail,

Please read this new document (just merged) to turn this contribution into
a MR.

https://gitlab.freedesktop.org/gnu-grub/grub/-/blob/master/CONTRIBUTING?ref_type=heads

Let me know if you have any questions.



On Fri, Mar 27, 2026 at 7:58 AM <[email protected]> wrote:

> From: Mikhail Malyshev <[email protected]>
>
> When grub_efi_log_event_status() encounters an EFI status code that
> doesn't match any known case, it prints the unhelpful generic "unknown
> TPM error" message, making root cause analysis impossible.
>
> This was observed on Dell R630 servers booting EVE OS, where the boot
> process gets stuck at the "unknown TPM error" prompt after a hardware
> watchdog reset. The watchdog performs a hard reset without allowing the
> TPM to cleanly shut down, leaving the TPM in an unexpected state on
> the next boot that returns an EFI status code outside the handled set.
>
> Include the raw EFI status value in hex so the actual code is visible
> in the GRUB output, enabling proper diagnosis.
>
> Signed-off-by: Mikhail Malyshev <[email protected]>
> ---
>  grub-core/commands/efi/tpm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/grub-core/commands/efi/tpm.c b/grub-core/commands/efi/tpm.c
> index 1c4906403..6c1ae57a8 100644
> --- a/grub-core/commands/efi/tpm.c
> +++ b/grub-core/commands/efi/tpm.c
> @@ -149,7 +149,8 @@ grub_efi_log_event_status (grub_efi_status_t status)
>      case GRUB_EFI_NOT_FOUND:
>        return grub_error (GRUB_ERR_UNKNOWN_DEVICE, N_("TPM unavailable"));
>      default:
> -      return grub_error (grub_is_tpm_fail_fatal () ?
> GRUB_ERR_UNKNOWN_DEVICE : GRUB_ERR_NONE, N_("unknown TPM error"));
> +      return grub_error (grub_is_tpm_fail_fatal () ?
> GRUB_ERR_UNKNOWN_DEVICE : GRUB_ERR_NONE,
> +                        "unknown TPM error: 0x%lx", (unsigned long)
> status);
>      }
>  }
>
> --
> 2.43.0
>
>
> _______________________________________________
> Grub-devel mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to