Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144374401
D49287.id152023.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D49287.id152023.diff
View Options
diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c
--- a/stand/libsa/smbios.c
+++ b/stand/libsa/smbios.c
@@ -180,16 +180,10 @@
smbios_sigsearch(const caddr_t addr, const uint32_t len)
{
caddr_t cp;
+ caddr_t v2_p = NULL;
/* Search on 16-byte boundaries. */
for (cp = addr; cp < addr + len; cp += SMBIOS_STEP) {
- /* v2.1, 32-bit Entry point */
- if (strncmp(cp, SMBIOS_SIG, sizeof(SMBIOS_SIG) - 1) == 0 &&
- smbios_checksum(cp, SMBIOS_GET8(cp, 0x05)) == 0 &&
- strncmp(cp + 0x10, SMBIOS_DMI_SIG, 5) == 0 &&
- smbios_checksum(cp + 0x10, 0x0f) == 0)
- return (cp);
-
#ifdef SMBIOS_64BIT_EP
/* v3.0, 64-bit Entry point */
if (strncmp(cp, SMBIOS3_SIG, sizeof(SMBIOS3_SIG) - 1) == 0 &&
@@ -204,8 +198,24 @@
return (cp);
}
#endif
+
+ /* v2.1, 32-bit Entry point */
+ if (strncmp(cp, SMBIOS_SIG, sizeof(SMBIOS_SIG) - 1) == 0 &&
+ smbios_checksum(cp, SMBIOS_GET8(cp, 0x05)) == 0 &&
+ strncmp(cp + 0x10, SMBIOS_DMI_SIG, 5) == 0 &&
+ smbios_checksum(cp + 0x10, 0x0f) == 0) {
+ /*
+ * Note that we saw this entry point, but don't return
+ * it right now on SMBIOS_64BIT_EP as we favor the 64-bit
+ * one if present.
+ */
+ v2_p = cp;
+#ifndef SMBIOS_64BIT_EP
+ break;
+#endif
+ }
}
- return (NULL);
+ return (v2_p);
}
static const char*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 3:06 AM (10 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28529087
Default Alt Text
D49287.id152023.diff (1 KB)
Attached To
Mode
D49287: libsa: smbios: Favor the v3 (64-bit) entry point on non-EFI boot
Attached
Detach File
Event Timeline
Log In to Comment