Date: Wed, 10 Aug 2016 18:23:23 +0000 (UTC) From: "Stephen J. Kiernan" <stevek@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303936 - head/sys/boot/i386/libi386 Message-ID: <201608101823.u7AINNgx083080@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: stevek Date: Wed Aug 10 18:23:23 2016 New Revision: 303936 URL: https://svnweb.freebsd.org/changeset/base/303936 Log: Add kernel environment variables under smbios.system for the following SMBIOS Type 1 fields: smbios.system.sku - SKU Number (SMBIOS 2.4 and above) smbios.system.family - Family (SMBIOS 2.4 and above) Add kernel environment variables under smbios.planar for the following SMBIOS Type 2 fields: smbios.planar.tag - Asset Tag smbios.planar.location - Location in Chassis Reviewed by: jhb, grembo Approved by: sjg (mentor) MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D7453 Modified: head/sys/boot/i386/libi386/smbios.c Modified: head/sys/boot/i386/libi386/smbios.c ============================================================================== --- head/sys/boot/i386/libi386/smbios.c Wed Aug 10 18:22:42 2016 (r303935) +++ head/sys/boot/i386/libi386/smbios.c Wed Aug 10 18:23:23 2016 (r303936) @@ -238,6 +238,10 @@ 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) { + smbios_setenv("smbios.system.sku", addr, 0x19); + smbios_setenv("smbios.system.family", addr, 0x1a); + } break; case 2: /* 3.3.3 Base Board (or Module) Information (Type 2) */ @@ -246,7 +250,9 @@ smbios_parse_table(const caddr_t addr) smbios_setenv("smbios.planar.version", addr, 0x06); #ifdef SMBIOS_SERIAL_NUMBERS smbios_setenv("smbios.planar.serial", addr, 0x07); + smbios_setenv("smbios.planar.tag", addr, 0x08); #endif + smbios_setenv("smbios.planar.location", addr, 0x0a); break; case 3: /* 3.3.4 System Enclosure or Chassis (Type 3) */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608101823.u7AINNgx083080>