From 4d58d1be66caf41ae72acb93655e062c3b24da2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 23 Mar 2025 20:06:39 +0800 Subject: [PATCH] Smbios (OpenBSD): add comments for UEFI systems [ci skip] --- src/util/smbiosHelper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/smbiosHelper.c b/src/util/smbiosHelper.c index 593ed960d..0c54f110d 100644 --- a/src/util/smbiosHelper.c +++ b/src/util/smbiosHelper.c @@ -335,6 +335,9 @@ const FFSmbiosHeaderTable* ffGetSmbiosHeaderTable() // Works on legacy BIOS only // See: https://wiki.osdev.org/System_Management_BIOS#UEFI_systems + // On BSD systems, we can get EFI system resource table (ESRT) via EFIIOC_GET_TABLE + // However, to acquire SMBIOS entry point, we need EFI configuration table (provided by EFI system table) + // which is not available via EFIIOC_GET_TABLE. FF_AUTO_FREE uint8_t* smBiosBase = malloc(0x10000); if (pread(fd, smBiosBase, 0x10000, 0xF0000) != 0x10000) { FF_DEBUG("Failed to read SMBIOS memory region: %s", strerror(errno));