From 4f97daf67e0baaf64251b5643af5c9552c522156 Mon Sep 17 00:00:00 2001 From: "Ian M." Date: Fri, 11 Sep 2026 03:45:03 +0000 Subject: initial commit Signed-off-by: Ian M. --- core/sboot.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 core/sboot.c (limited to 'core') diff --git a/core/sboot.c b/core/sboot.c new file mode 100644 index 0000000..e0b2387 --- /dev/null +++ b/core/sboot.c @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2026, Apollo Telephone Laboratories. + * Provided under the BSD-3 clause. + */ + +#include +#include +#include +#include + +EFI_STATUS +EFIAPI +efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) +{ + UINTN NrBootEntries; + BOOT_PROTOCOL LastProtocol; + + InitializeLib(ImageHandle, SystemTable); + NrBootEntries = NELEM(ConfigBootEntries); + + /* Ensure the list is terminated */ + LastProtocol = ConfigBootEntries[NrBootEntries - 1].Protocol; + if (LastProtocol != PROTOCOL_END) { + Print(L"fatal: boot entry list not terminated\n"); + Hcf(); + } + + Print( + L"SBOOT %s - %d boot entrie(s)\n", + SBOOT_VERSION, + NELEM(ConfigBootEntries) - 1 + ); + + for (;;); +} -- cgit v1.2.3