From e79b561f2a3a390a5e940c3a8762b870de46e7d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 16 Feb 2025 23:25:16 +0800 Subject: [PATCH] Smbios: add comments about 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 be122d3e5..fd5d29484 100644 --- a/src/util/smbiosHelper.c +++ b/src/util/smbiosHelper.c @@ -236,6 +236,9 @@ const FFSmbiosHeaderTable* ffGetSmbiosHeaderTable() FF_AUTO_CLOSE_FD int fd = open("/dev/misc/mem", O_RDONLY); if (fd < 0) return NULL; + + // Works on legacy BIOS only + // See: https://wiki.osdev.org/System_Management_BIOS#UEFI_systems FF_AUTO_FREE uint8_t* smBiosBase = malloc(0x10000); if (pread(fd, smBiosBase, 0x10000, 0xF0000) != 0x10000) return NULL;