loader: smbios version check is not correct

The version check for sku and family values is not correct, as this data is
valid for version 2.4+, that also includes version 3.0 and above.

Reported by:	Dan McDonald
Reviewed by:	allanjude
Approved by:	allanjude (mentor)
Differential Revision:	https://reviews.freebsd.org/D8578
This commit is contained in:
Toomas Soome 2016-11-19 16:08:40 +00:00
parent 57b28934e9
commit a3af8177e5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308843

View File

@ -238,7 +238,8 @@ smbios_parse_table(const caddr_t addr)
smbios_setenv("smbios.system.serial", addr, 0x07);
smbios_setuuid("smbios.system.uuid", addr + 0x08, smbios.ver);
#endif
if (smbios.major >= 2 && smbios.minor >= 4) {
if (smbios.major > 2 ||
(smbios.major == 2 && smbios.minor >= 4)) {
smbios_setenv("smbios.system.sku", addr, 0x19);
smbios_setenv("smbios.system.family", addr, 0x1a);
}