aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStephen J. Kiernan <stevek@FreeBSD.org>2016-08-10 18:23:23 +0000
committerStephen J. Kiernan <stevek@FreeBSD.org>2016-08-10 18:23:23 +0000
commitbf38f89f99de8c6becfd040e511373a0835766d0 (patch)
tree8410703d4297b0b42413bb097f989c66dfcdc326 /sys
parent14009f5e90d7f8abde1ddfbf3267884e4a9a37ea (diff)
downloadsrc-bf38f89f99de8c6becfd040e511373a0835766d0.tar.gz
src-bf38f89f99de8c6becfd040e511373a0835766d0.zip
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
Notes
Notes: svn path=/head/; revision=303936
Diffstat (limited to 'sys')
-rw-r--r--sys/boot/i386/libi386/smbios.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/boot/i386/libi386/smbios.c b/sys/boot/i386/libi386/smbios.c
index 7a7ce4ba4f56..4a8f3bc4ef08 100644
--- a/sys/boot/i386/libi386/smbios.c
+++ b/sys/boot/i386/libi386/smbios.c
@@ -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) */