svn commit: r303936 - head/sys/boot/i386/libi386

Stephen J. Kiernan stevek at FreeBSD.org
Wed Aug 10 18:23:24 UTC 2016


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) */


More information about the svn-src-head mailing list