libsa: smbios: Rename 64-bit entry point's guards

Rename HAS_SMBV3 to SMBIOS_64BIT_EP, as it will soon be externally
defined in some cases, and 'isv3' to 'is_64bit_ep'.  These are more
accurate names for what they actually control/indicate.

No functional change.

Reviewed by:    imp, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49281

(cherry picked from commit 2aa0067548)
This commit is contained in:
Olivier Certner 2025-03-03 17:52:20 +01:00
parent 4af7f393ec
commit 0a2c8f6691
No known key found for this signature in database
GPG key ID: 8CA13040971E2627

View file

@ -31,7 +31,7 @@
/* Only enable 64-bit entry point if it makes sense */
#if __SIZEOF_POINTER__ > 4
#define HAS_SMBV3 1
#define SMBIOS_64BIT_EP 1
#endif
/*
@ -144,7 +144,7 @@ SMBIOS_GET64(const caddr_t base, int off)
struct smbios_attr {
int probed;
caddr_t addr;
caddr_t addr;
size_t length;
size_t count;
int major;
@ -160,8 +160,8 @@ struct smbios_attr {
};
static struct smbios_attr smbios;
#ifdef HAS_SMBV3
static int isv3;
#ifdef SMBIOS_64BIT_EP
static int is_64bit_ep;
#endif
static uint8_t
@ -189,11 +189,11 @@ smbios_sigsearch(const caddr_t addr, const uint32_t len)
smbios_checksum(cp + 0x10, 0x0f) == 0)
return (cp);
#ifdef HAS_SMBV3
#ifdef SMBIOS_64BIT_EP
/* v3.0, 64-bit Entry point */
if (strncmp(cp, SMBIOS3_SIG, sizeof(SMBIOS3_SIG) - 1) == 0 &&
smbios_checksum(cp, SMBIOS_GET8(cp, 0x06)) == 0) {
isv3 = 1;
is_64bit_ep = 1;
return (cp);
}
#endif
@ -561,8 +561,8 @@ smbios_probe(const caddr_t addr)
if (saddr == NULL)
return;
#ifdef HAS_SMBV3
if (isv3) {
#ifdef SMBIOS_64BIT_EP
if (is_64bit_ep) {
/* Structure Table Length */
smbios.length = SMBIOS_GET32(saddr, 0x0c);
/* Structure Table Address */