git: f6b90dc8afc0 - stable/14 - libsa: smbios_probe(): Strictly obey specified entry point address

From: Olivier Certner <olce_at_FreeBSD.org>
Date: Tue, 08 Apr 2025 13:41:12 UTC
The branch stable/14 has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=f6b90dc8afc0666a6a7e012d38ec02eb1d5b771f

commit f6b90dc8afc0666a6a7e012d38ec02eb1d5b771f
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2025-03-05 10:34:49 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-04-08 13:38:28 +0000

    libsa: smbios_probe(): Strictly obey specified entry point address
    
    When such an address is known, do not search elsewhere, contrary to what
    we are doing on non-EFI boot (see SMBIOS_START and SMBIOS_LENGTH).
    
    Reviewed by:    markj
    MFC after:      2 weeks
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D49291
    
    (cherry picked from commit 1ee8714950b8d07ccd172f2bcbbbaa91f02ef9e7)
---
 stand/libsa/smbios.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c
index 54cfac58b19e..618c8a1052ec 100644
--- a/stand/libsa/smbios.c
+++ b/stand/libsa/smbios.c
@@ -573,8 +573,8 @@ smbios_probe(const caddr_t addr)
 	int		min_off;
 
 	/* Search signatures and validate checksums. */
-	saddr = smbios_sigsearch(addr ? addr : PTOV(SMBIOS_START),
-	    SMBIOS_LENGTH);
+	saddr = addr != NULL ? smbios_sigsearch(addr, 1) :
+	    smbios_sigsearch(PTOV(SMBIOS_START), SMBIOS_LENGTH);
 	if (saddr == NULL)
 		return;