git: bc7f6508363c - main - smbios: Search for v3 (64-bit) entry point first on BIOS boot
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 07 Mar 2025 16:44:36 UTC
The branch main has been updated by olce:
URL: https://cgit.FreeBSD.org/src/commit/?id=bc7f6508363c5cf4544044e00bbaf71de8f0168d
commit bc7f6508363c5cf4544044e00bbaf71de8f0168d
Author: Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2025-02-28 16:54:42 +0000
Commit: Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-03-07 16:42:45 +0000
smbios: Search for v3 (64-bit) entry point first on BIOS boot
When booted from BIOS (i.e., not EFI), also search for a 64-bit version
of the SMBIOS Entry Point.
This allows us to detect and report the proper SMBIOS version with
BIOSes that only provide the v3 table, as happens on Hetzner virtual
machines.
For machines that provide both, leverage the v3 table in priority
consistently with the EFI case.
PR: 284460
Reviewed by: markj, imp (both older version)
MFC after: 2 weeks
Relnotes: yes
Event: February src bug-busting session
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49179
---
sys/dev/smbios/smbios.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/sys/dev/smbios/smbios.c b/sys/dev/smbios/smbios.c
index bbfe80a6a8a6..f4a6453fd043 100644
--- a/sys/dev/smbios/smbios.c
+++ b/sys/dev/smbios/smbios.c
@@ -102,9 +102,15 @@ smbios_identify (driver_t *driver, device_t parent)
#endif
#if defined(__amd64__) || defined(__i386__)
- if (addr == 0)
- addr = bios_sigsearch(SMBIOS_START, SMBIOS_SIG, SMBIOS_LEN,
+ if (addr == 0) {
+ addr = bios_sigsearch(SMBIOS_START, SMBIOS3_SIG, SMBIOS3_LEN,
SMBIOS_STEP, SMBIOS_OFF);
+ if (addr != 0)
+ map_size = sizeof(*eps3);
+ else
+ addr = bios_sigsearch(SMBIOS_START,
+ SMBIOS_SIG, SMBIOS_LEN, SMBIOS_STEP, SMBIOS_OFF);
+ }
#endif
if (addr != 0) {