summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarco <marco@openbsd.org>2010-08-02 16:57:53 +0000
committermarco <marco@openbsd.org>2010-08-02 16:57:53 +0000
commitca76aa236b09629c76ad2b555547dc7bedfc99c7 (patch)
tree658923727171726512761d65b46d73c21c43e671
parentsync (diff)
downloadwireguard-openbsd-ca76aa236b09629c76ad2b555547dc7bedfc99c7.tar.xz
wireguard-openbsd-ca76aa236b09629c76ad2b555547dc7bedfc99c7.zip
Add System Enclosure or Chassis structure.
ok deraadt
-rw-r--r--sys/arch/amd64/include/smbiosvar.h29
-rw-r--r--sys/arch/i386/include/smbiosvar.h29
2 files changed, 56 insertions, 2 deletions
diff --git a/sys/arch/amd64/include/smbiosvar.h b/sys/arch/amd64/include/smbiosvar.h
index 9dddb6196c2..0a7ed71fb7f 100644
--- a/sys/arch/amd64/include/smbiosvar.h
+++ b/sys/arch/amd64/include/smbiosvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smbiosvar.h,v 1.7 2007/11/15 17:14:00 marco Exp $ */
+/* $OpenBSD: smbiosvar.h,v 1.8 2010/08/02 16:57:53 marco Exp $ */
/*
* Copyright (c) 2006 Gordon Willem Klok <gklok@cogeco.ca>
* Copyright (c) 2005 Jordan Hargrave
@@ -177,6 +177,33 @@ struct smbios_board {
} __packed;
/*
+ * SMBIOS Structure Type 3 "System Wnclosure or Chassis"
+ * DMTF Specification DSP0134
+ */
+struct smbios_enclosure {
+ /* SMBIOS spec 2.0+ */
+ u_int8_t vendor; /* string */
+ u_int8_t type;
+ u_int8_t version; /* string */
+ u_int8_t serial; /* string */
+ u_int8_t asset_tag; /* string */
+ /* SMBIOS spec 2.1+ */
+ u_int8_t boot_state;
+ u_int8_t psu_state;
+ u_int8_t thermal_state;
+ u_int8_t security_status;
+ /* SMBIOS spec 2.3+ */
+ u_int16_t oem_defined;
+ u_int8_t height;
+ u_int8_t no_power_cords;
+ u_int8_t no_contained_element;
+ u_int8_t reclen_contained_element;
+ u_int8_t contained_elements;
+ /* SMBIOS spec 2.7+ */
+ u_int8_t sku; /* string */
+} __packed;
+
+/*
* SMBIOS Structure Type 4 "processor Information"
* DMTF Specification DSP0134 v2.5 Section 3.3.5 p.g. 24
*/
diff --git a/sys/arch/i386/include/smbiosvar.h b/sys/arch/i386/include/smbiosvar.h
index 9dddb6196c2..0a7ed71fb7f 100644
--- a/sys/arch/i386/include/smbiosvar.h
+++ b/sys/arch/i386/include/smbiosvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smbiosvar.h,v 1.7 2007/11/15 17:14:00 marco Exp $ */
+/* $OpenBSD: smbiosvar.h,v 1.8 2010/08/02 16:57:53 marco Exp $ */
/*
* Copyright (c) 2006 Gordon Willem Klok <gklok@cogeco.ca>
* Copyright (c) 2005 Jordan Hargrave
@@ -177,6 +177,33 @@ struct smbios_board {
} __packed;
/*
+ * SMBIOS Structure Type 3 "System Wnclosure or Chassis"
+ * DMTF Specification DSP0134
+ */
+struct smbios_enclosure {
+ /* SMBIOS spec 2.0+ */
+ u_int8_t vendor; /* string */
+ u_int8_t type;
+ u_int8_t version; /* string */
+ u_int8_t serial; /* string */
+ u_int8_t asset_tag; /* string */
+ /* SMBIOS spec 2.1+ */
+ u_int8_t boot_state;
+ u_int8_t psu_state;
+ u_int8_t thermal_state;
+ u_int8_t security_status;
+ /* SMBIOS spec 2.3+ */
+ u_int16_t oem_defined;
+ u_int8_t height;
+ u_int8_t no_power_cords;
+ u_int8_t no_contained_element;
+ u_int8_t reclen_contained_element;
+ u_int8_t contained_elements;
+ /* SMBIOS spec 2.7+ */
+ u_int8_t sku; /* string */
+} __packed;
+
+/*
* SMBIOS Structure Type 4 "processor Information"
* DMTF Specification DSP0134 v2.5 Section 3.3.5 p.g. 24
*/