Skip to content

Commit

Permalink
Smbios: add comments about UEFI systems [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Feb 16, 2025
1 parent 9018fda commit e79b561
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/util/smbiosHelper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e79b561

Please sign in to comment.