]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
secure-boot: print just before cold-resetting to help diagnose hangs
authorRaito Bezarius <masterancpp@gmail.com>
Fri, 29 Sep 2023 01:51:54 +0000 (03:51 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 30 Oct 2023 13:20:48 +0000 (13:20 +0000)
When testing the secureboot enroll feature, it can be hard to distinguish without
using the QMP API of QEMU whether we are in a hang situation of the UEFI firmware.

Making it clear that we reached the `ResetSystem` can be helpful towards that need.

src/boot/efi/secure-boot.c

index f6776af917825b274142a40f268a6d2537419564..370064fa08983db94c239a64279ade6ef6981e98 100644 (file)
@@ -117,6 +117,10 @@ EFI_STATUS secure_boot_enroll_at(EFI_FILE *root_dir, const char16_t *path, bool
                 }
         }
 
+        if (!is_safe)
+                printf("\n");
+
+        printf("Custom Secure Boot keys successfully enrolled, rebooting the system now!");
         /* The system should be in secure boot mode now and we could continue a regular boot. But at least
          * TPM PCR7 measurements should change on next boot. Reboot now so that any OS we load does not end
          * up relying on the old PCR state. */