summaryrefslogtreecommitdiff
path: root/mok.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2025-02-20 14:44:10 -0500
committerPeter Jones <pjones@redhat.com>2025-02-24 15:58:16 -0500
commit9269e9b0aa15ae9832f7eba6c5eeef0c5e1f4edb (patch)
treeb279f2af0682fc90877858f86404ddb2533a1855 /mok.c
parentc41b1f066b9f279b70d933095f277eddbd7c6433 (diff)
downloadefi-boot-shim-9269e9b0aa15ae9832f7eba6c5eeef0c5e1f4edb.tar.gz
efi-boot-shim-9269e9b0aa15ae9832f7eba6c5eeef0c5e1f4edb.zip
Add DXE Services information to HSI
This adds three more entries to our HSI data: has-dxe-services-table: technically only tells us if UEFI's LocateProtocol will give us a DXE services table, but practically also tells us if the machine is implementing DXE in any way. has-get-memory-space-descriptor: tells us if DXE->GetMemorySpaceDescriptor is populated has-set-memory-space-descriptor: tells us if DXE->SetMemorySpaceDescriptor is populated Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'mok.c')
-rw-r--r--mok.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mok.c b/mok.c
index 97d4a0eb..cb70e7e2 100644
--- a/mok.c
+++ b/mok.c
@@ -42,6 +42,9 @@ format_hsi_status(UINT8 *buf, size_t sz,
const char stackx[] = "\nstack-is-executable: ";
const char row[] = "\nro-sections-are-writable: ";
const char hasmap[] = "\nhas-memory-attribute-protocol: ";
+ const char hasdxeservices[] = "\nhas-dxe-services-table: ";
+ const char hasdsgmsd[] = "\nhas-get-memory-space-descriptor: ";
+ const char hasdssmsa[] = "\nhas-set-memory-space-attributes: ";
const char finale[] = "\n";
char *pos;
@@ -51,6 +54,8 @@ format_hsi_status(UINT8 *buf, size_t sz,
*/
UINTN ret = sizeof(heapx) + sizeof(stackx) +
sizeof(row) + sizeof(hasmap) +
+ sizeof(hasdxeservices) + sizeof(hasdsgmsd) +
+ sizeof(hasdssmsa) +
sizeof(finale);
if (buf == 0 || sz < ret) {
@@ -67,6 +72,12 @@ format_hsi_status(UINT8 *buf, size_t sz,
pos = stpcpy(pos, (hsi_status & SHIM_HSI_STATUS_ROW) ? "1" : "0");
pos = stpcpy(pos, hasmap);
pos = stpcpy(pos, (hsi_status & SHIM_HSI_STATUS_HASMAP) ? "1" : "0");
+ pos = stpcpy(pos, hasdxeservices);
+ pos = stpcpy(pos, (hsi_status & SHIM_HSI_STATUS_HASDST) ? "1" : "0");
+ pos = stpcpy(pos, hasdsgmsd);
+ pos = stpcpy(pos, (hsi_status & SHIM_HSI_STATUS_HASDSTGMSD) ? "1" : "0");
+ pos = stpcpy(pos, hasdssmsa);
+ pos = stpcpy(pos, (hsi_status & SHIM_HSI_STATUS_HASDSTSMSA) ? "1" : "0");
stpcpy(pos, finale);
return ret;