Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150973183
D49318.id163680.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
780 B
Referenced Files
None
Subscribers
None
D49318.id163680.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
@@ -186,14 +186,17 @@
*/
SMBIOS_GET8(cp, 0x0a) != 0 &&
smbios_checksum(cp, SMBIOS_GET8(cp, 0x06)) == 0) {
-#ifdef __ILP32__
+#if __SIZEOF_SIZE_T__ < 8
uint64_t end_addr;
end_addr = SMBIOS_GET64(cp, 0x10) + /* Start address. */
SMBIOS_GET32(cp, 0x0c); /* Maximum size. */
- /* Is the table (or part of it) located above 4G? */
- if (end_addr >= (uint64_t)1 << 32)
- /* Can't access it with 32-bit addressing. */
+ /*
+ * Is the table (or part of it) located above what we
+ * can address?
+ */
+ if ((size_t)end_addr != end_addr)
+ /* Yes, give it up. */
continue;
#endif
smbios.is_64bit_ep = 1;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 6:13 AM (10 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30942629
Default Alt Text
D49318.id163680.diff (780 B)
Attached To
Mode
D49318: libsa: smbios: Detect less-than-64-bit platforms via __SIZEOF_SIZE_T__
Attached
Detach File
Event Timeline
Log In to Comment