summaryrefslogtreecommitdiff
path: root/lib/ipmi_strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ipmi_strings.c')
-rw-r--r--lib/ipmi_strings.c1117
1 files changed, 1054 insertions, 63 deletions
diff --git a/lib/ipmi_strings.c b/lib/ipmi_strings.c
index 94b2abd..26b359f 100644
--- a/lib/ipmi_strings.c
+++ b/lib/ipmi_strings.c
@@ -30,77 +30,58 @@
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*/
+#include <ctype.h>
+#include <limits.h>
#include <stddef.h>
+
#include <ipmitool/ipmi_strings.h>
#include <ipmitool/ipmi_constants.h>
#include <ipmitool/ipmi_sensor.h>
#include <ipmitool/ipmi_sel.h> /* for IPMI_OEM */
+#include <ipmitool/log.h>
+
+/*
+ * These are put at the head so they are found first because they
+ * may overlap with IANA specified numbers found in the registry.
+ */
+static const struct valstr ipmi_oem_info_head[] = {
+ { IPMI_OEM_UNKNOWN, "Unknown" }, /* IPMI Unknown */
+ { IPMI_OEM_RESERVED, "Unspecified" }, /* IPMI Reserved */
+ { UINT32_MAX , NULL },
+};
-const struct valstr ipmi_oem_info[] = {
-
- { IPMI_OEM_UNKNOWN, "Unknown" },
- { IPMI_OEM_HP, "Hewlett-Packard" },
- { IPMI_OEM_SUN, "Sun Microsystems" },
- { IPMI_OEM_INTEL, "Intel Corporation" },
- { IPMI_OEM_LMC, "LMC" },
- { IPMI_OEM_RADISYS, "RadiSys Corporation" },
- { IPMI_OEM_TYAN, "Tyan Computer Corporation" },
- { IPMI_OEM_NEWISYS, "Newisys" },
- { IPMI_OEM_SUPERMICRO, "Supermicro" },
- { IPMI_OEM_GOOGLE, "Google" },
- { IPMI_OEM_KONTRON, "Kontron" },
- { IPMI_OEM_NOKIA, "Nokia" },
- { IPMI_OEM_PICMG, "PICMG" },
- { IPMI_OEM_PEPPERCON, "Peppercon AG" },
- { IPMI_OEM_DELL, "DELL Inc" },
- { IPMI_OEM_NEC, "NEC" },
- { IPMI_OEM_MAGNUM, "Magnum Technologies" },
- { IPMI_OEM_FUJITSU_SIEMENS, "Fujitsu Siemens" },
- { IPMI_OEM_TATUNG, "Tatung" },
- { IPMI_OEM_AMI, "AMI" },
- { IPMI_OEM_RARITAN, "Raritan" },
- { IPMI_OEM_AVOCENT, "Avocent" },
- { IPMI_OEM_OSA, "OSA" },
- { IPMI_OEM_TOSHIBA, "Toshiba" },
- { IPMI_OEM_HITACHI_116, "Hitachi" },
- { IPMI_OEM_HITACHI_399, "Hitachi" },
- { IPMI_OEM_NOKIA_SOLUTIONS_AND_NETWORKS, "Nokia Solutions and Networks" },
- { IPMI_OEM_BULL, "Bull Company" },
- { IPMI_OEM_PPS, "Pigeon Point Systems" },
- { IPMI_OEM_BROADCOM, "Broadcom Corporation" },
- { IPMI_OEM_ERICSSON, "Ericsson AB"},
- { IPMI_OEM_QUANTA, "Quanta" },
- { IPMI_OEM_VITA, "VITA" },
- { IPMI_OEM_ADVANTECH, "Advantech" },
- /************************************************************************
- * Add ID String for IANA Enterprise Number of IBM & ADLINK
- * https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
- * 2
- * IBM
- * Kristine Adamson
- * adamson&us.ibm.com
- * 4769
- * IBM Corporation
- * Victor Sample
- * vsample&us.ibm.com
- * 20301
- * IBM eServer X
- * Lynn Fore
- * sls&us.ibm.com
- * 24339
- * ADLINK TECHNOLOGY INC.
- * Ryan Hsu
- * ryan.hsu&adlinktech.com
- ************************************************************************/
- { IPMI_OEM_IBM_2, "IBM" },
- { IPMI_OEM_IBM_4769, "IBM Corporation" },
- { IPMI_OEM_IBM_20301, "IBM eServer X" },
- { IPMI_OEM_ADLINK_24339, "ADLINK Technology Inc." },
- { 0xffff , NULL },
+/*
+ * These are our own technical values. We don't want them to take precedence
+ * over IANA's defined values, so they go at the very end of the array.
+ */
+static const struct valstr ipmi_oem_info_tail[] = {
+ { IPMI_OEM_DEBUG, "A Debug Assisting Company, Ltd." },
+ { UINT32_MAX , NULL },
};
+/*
+ * This is used when ipmi_oem_info couldn't be allocated.
+ * ipmitool would report all OEMs as unknown, but would be functional otherwise.
+ */
+static const struct valstr ipmi_oem_info_dummy[] = {
+ { UINT32_MAX , NULL },
+};
+
+/* This will point to an array filled from IANA's enterprise numbers registry */
+const struct valstr *ipmi_oem_info;
+
+/* Single-linked list of OEM valstrs */
+typedef struct oem_valstr_list_s {
+ struct valstr valstr;
+ struct oem_valstr_list_s *next;
+} oem_valstr_list_t;
+
const struct oemvalstr ipmi_oem_product_info[] = {
/* Keep OEM grouped together */
+
+ /* For ipmitool debugging */
+ { IPMI_OEM_DEBUG, 0x1234, "Great Debuggable BMC" },
+
/* Intel stuff, thanks to Tim Bell */
{ IPMI_OEM_INTEL, 0x000C, "TSRLT2" },
{ IPMI_OEM_INTEL, 0x001B, "TIGPR2U" },
@@ -114,6 +95,7 @@ const struct oemvalstr ipmi_oem_product_info[] = {
{ IPMI_OEM_INTEL, 0x0808, "MPCBL0001" },
{ IPMI_OEM_INTEL, 0x0811, "TIGW1U" },
{ IPMI_OEM_INTEL, 0x4311, "NSI2U" },
+
/* Kontron */
{ IPMI_OEM_KONTRON,4000, "AM4000 AdvancedMC" },
{ IPMI_OEM_KONTRON,4001, "AM4001 AdvancedMC" },
@@ -141,10 +123,13 @@ const struct oemvalstr ipmi_oem_product_info[] = {
{ IPMI_OEM_KONTRON,5007, "AT8050" },
{ IPMI_OEM_KONTRON,5301, "AT8400" },
{ IPMI_OEM_KONTRON,5303, "AT8901" },
+
/* Broadcom */
{ IPMI_OEM_BROADCOM, 5725, "BCM5725" },
+
/* Ericsson */
{ IPMI_OEM_ERICSSON, 0x0054, "Phantom" },
+
/* Advantech */
/* ATCA Blades */
{ IPMI_OEM_ADVANTECH, 0x3393, "MIC-3393" },
@@ -227,6 +212,7 @@ const struct oemvalstr ipmi_oem_product_info[] = {
{ IPMI_OEM_ADVANTECH, 0x9212, "ESP-9212" },
{ IPMI_OEM_ADVANTECH, 0x6000, "CGS-6000" },
{ IPMI_OEM_ADVANTECH, 0x6010, "CGS-6010" },
+
/* ADLINK Technology Inc. */
/* AdvancedTCA Processor Blades */
{ IPMI_OEM_ADLINK_24339, 0x3100, "aTCA-3100" },
@@ -283,6 +269,668 @@ const struct oemvalstr ipmi_oem_product_info[] = {
{ IPMI_OEM_ADLINK_24339, 0x0410, "MXN-0410" },
{ IPMI_OEM_ADLINK_24339, 0x2600, "MCN-2600" },
{ IPMI_OEM_ADLINK_24339, 0x1500, "MCN-1500" },
+ /* Supermicro */
+ { IPMI_OEM_SUPERMICRO, 0x0001, "X8DT3/i/-LN4" },
+ { IPMI_OEM_SUPERMICRO, 0x0002, "C2SLM-OC012" },
+ { IPMI_OEM_SUPERMICRO, 0x0003, "X8DTW-3/i/-LN4" },
+ { IPMI_OEM_SUPERMICRO, 0x0006, "X8DTL-3/i" },
+ { IPMI_OEM_SUPERMICRO, 0x0007, "X8DTT-IBX" },
+ { IPMI_OEM_SUPERMICRO, 0x0008, "X8DTT-B-SG" },
+ { IPMI_OEM_SUPERMICRO, 0x0009, "X8STi-3/-LN4" },
+ { IPMI_OEM_SUPERMICRO, 0x000A, "B8DT3" },
+ { IPMI_OEM_SUPERMICRO, 0x0100, "X8DAH+" },
+ { IPMI_OEM_SUPERMICRO, 0x0101, "B8DTL" },
+ { IPMI_OEM_SUPERMICRO, 0x0400, "X8DTH-6/i" },
+ { IPMI_OEM_SUPERMICRO, 0x0401, "X8DTH-RC014" },
+ { IPMI_OEM_SUPERMICRO, 0x0403, "X8DA6/i-X" },
+ { IPMI_OEM_SUPERMICRO, 0x0404, "X8DT6/E" },
+ { IPMI_OEM_SUPERMICRO, 0x0409, "H8QI6/E(+)(-F)" },
+ { IPMI_OEM_SUPERMICRO, 0x040B, "X8DTW-6+/i+" },
+ { IPMI_OEM_SUPERMICRO, 0x040D, "X8SII/X8SI6" },
+ { IPMI_OEM_SUPERMICRO, 0x0410, "X8DTL-6/L" },
+ { IPMI_OEM_SUPERMICRO, 0x0600, "X8DTU" },
+ { IPMI_OEM_SUPERMICRO, 0x0601, "X8DAL-3/i" },
+ { IPMI_OEM_SUPERMICRO, 0x0602, "X7SLA" },
+ { IPMI_OEM_SUPERMICRO, 0x0603, "C2SEM-Q" },
+ { IPMI_OEM_SUPERMICRO, 0x0604, "winbond IPMI (Aten)" },
+ { IPMI_OEM_SUPERMICRO, 0x0605, "X8SIL" },
+ { IPMI_OEM_SUPERMICRO, 0x0606, "X8DTG-4" },
+ { IPMI_OEM_SUPERMICRO, 0x0607, "C2G41" },
+ { IPMI_OEM_SUPERMICRO, 0x0608, "X8DTG-DF" },
+ { IPMI_OEM_SUPERMICRO, 0x0609, "X8DTS" },
+ { IPMI_OEM_SUPERMICRO, 0x060A, "X7SPA" },
+ { IPMI_OEM_SUPERMICRO, 0x060B, "X8SIA" },
+ { IPMI_OEM_SUPERMICRO, 0x060C, "X8DTU+" },
+ { IPMI_OEM_SUPERMICRO, 0x060C, "X8DTU-LN4F+" },
+ { IPMI_OEM_SUPERMICRO, 0x060D, "X8DTU-6TF+" },
+ { IPMI_OEM_SUPERMICRO, 0x060E, "X8SIT" },
+ { IPMI_OEM_SUPERMICRO, 0x060F, "X8DTN+-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0610, "X8QB6/E" },
+ { IPMI_OEM_SUPERMICRO, 0x0611, "AOC-STGN-I2S" },
+ { IPMI_OEM_SUPERMICRO, 0x0612, "B8DTT" },
+ { IPMI_OEM_SUPERMICRO, 0x0613, "X8DTT-C-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0x0614, "X8DTU-F-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0x061A, "X8SIU" },
+ { IPMI_OEM_SUPERMICRO, 0x061B, "X8DTT-HA" },
+ { IPMI_OEM_SUPERMICRO, 0x061C, "B8DT6-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0x061D, "C7SIA" },
+ { IPMI_OEM_SUPERMICRO, 0x061E, "B8DTT-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0x061E, "X9SCL" },
+ { IPMI_OEM_SUPERMICRO, 0x061F, "B8DTP" },
+ { IPMI_OEM_SUPERMICRO, 0x0620, "B8DTG" },
+ { IPMI_OEM_SUPERMICRO, 0x0621, "X8OBN" },
+ { IPMI_OEM_SUPERMICRO, 0x0622, "C7P67" },
+ { IPMI_OEM_SUPERMICRO, 0x0623, "C7Q67" },
+ { IPMI_OEM_SUPERMICRO, 0x0624, "X9SCM" },
+ { IPMI_OEM_SUPERMICRO, 0x0625, "B9DRi" },
+ { IPMI_OEM_SUPERMICRO, 0x0626, "X9DR3-LN4F+" },
+ { IPMI_OEM_SUPERMICRO, 0x0627, "X7SPT-DF-D525" },
+ { IPMI_OEM_SUPERMICRO, 0x0628, "X9DR3/i-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0629, "X9SRT-F" },
+ { IPMI_OEM_SUPERMICRO, 0x062A, "X9SRA" },
+ { IPMI_OEM_SUPERMICRO, 0x062B, "X9SRi" },
+ { IPMI_OEM_SUPERMICRO, 0x062C, "X9DAi" },
+ { IPMI_OEM_SUPERMICRO, 0x062D, "X8SIL-SIOM-FI005" },
+ { IPMI_OEM_SUPERMICRO, 0x062E, "X8STE-DS018" },
+ { IPMI_OEM_SUPERMICRO, 0x062F, "X9DRT-HF" },
+ { IPMI_OEM_SUPERMICRO, 0x0630, "X9DRW-3TF+" },
+ { IPMI_OEM_SUPERMICRO, 0x0631, "X9SCA/X9SCI" },
+ { IPMI_OEM_SUPERMICRO, 0x0632, "X8DTG-QF+" },
+ { IPMI_OEM_SUPERMICRO, 0x0633, "X9SCV-Q" },
+ { IPMI_OEM_SUPERMICRO, 0x0634, "X9SCD" },
+ { IPMI_OEM_SUPERMICRO, 0x0635, "X9DAL-6/i" },
+ { IPMI_OEM_SUPERMICRO, 0x0636, "X9DRW-3F" },
+ { IPMI_OEM_SUPERMICRO, 0x0637, "X9DBU-3F" },
+ { IPMI_OEM_SUPERMICRO, 0x0638, "X8QB6-LF" },
+ { IPMI_OEM_SUPERMICRO, 0x0640, "X9SCL/SCM-II" },
+ { IPMI_OEM_SUPERMICRO, 0x0641, "X9SCV-LN4F+" },
+ { IPMI_OEM_SUPERMICRO, 0x0642, "C7Q67-H" },
+ { IPMI_OEM_SUPERMICRO, 0x0644, "X9SAE" },
+ { IPMI_OEM_SUPERMICRO, 0x0645, "C7H61" },
+ { IPMI_OEM_SUPERMICRO, 0x0646, "X9SCFF" },
+ { IPMI_OEM_SUPERMICRO, 0x0647, "X9SCAA" },
+ { IPMI_OEM_SUPERMICRO, 0x0647, "X9SCE-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0648, "C7B75" },
+ { IPMI_OEM_SUPERMICRO, 0x0650, "X9SPV-M4" },
+ { IPMI_OEM_SUPERMICRO, 0x0651, "X9SBAA" },
+ { IPMI_OEM_SUPERMICRO, 0x0652, "AOC-CGP-i2" },
+ { IPMI_OEM_SUPERMICRO, 0x0653, "C7Z87" },
+ { IPMI_OEM_SUPERMICRO, 0x0654, "C7Q87" },
+ { IPMI_OEM_SUPERMICRO, 0x0655, "AOC-XEH-IN2" },
+ { IPMI_OEM_SUPERMICRO, 0x0656, "AOC-SGP-i2" },
+ { IPMI_OEM_SUPERMICRO, 0x0657, "C7Z87-OCE" },
+ { IPMI_OEM_SUPERMICRO, 0x0658, "AOC-STG-B4S" },
+ { IPMI_OEM_SUPERMICRO, 0x0659, "AOC-STGN-I1S" },
+ { IPMI_OEM_SUPERMICRO, 0x0660, "X9DRD-3/iF" },
+ { IPMI_OEM_SUPERMICRO, 0x0661, "B1SA4-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0661, "X9SRG" },
+ { IPMI_OEM_SUPERMICRO, 0x0662, "X9DRG-QF+" },
+ { IPMI_OEM_SUPERMICRO, 0x0663, "X9SRW" },
+ { IPMI_OEM_SUPERMICRO, 0x0664, "X9DRH-7F" },
+ { IPMI_OEM_SUPERMICRO, 0x0665, "X9DRG-QF" },
+ { IPMI_OEM_SUPERMICRO, 0x0666, "X9DRT-D-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0x0667, "X9DRL-3/iF" },
+ { IPMI_OEM_SUPERMICRO, 0x0668, "X9SRD" },
+ { IPMI_OEM_SUPERMICRO, 0x0669, "X9DRX+-F" },
+ { IPMI_OEM_SUPERMICRO, 0x066A, "B9DRT" },
+ { IPMI_OEM_SUPERMICRO, 0x066B, "X9SRL-F" },
+ { IPMI_OEM_SUPERMICRO, 0x066C, "B9DRG" },
+ { IPMI_OEM_SUPERMICRO, 0x066D, "X9DR6+-F-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0x066E, "X9DR6-LN4F+-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0x066F, "X9DRW-LN4F+-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0x0690, "2208" },
+ { IPMI_OEM_SUPERMICRO, 0x0691, "2308" },
+ { IPMI_OEM_SUPERMICRO, 0x0700, "X9DRT-HF-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0x0701, "X9DRT-HIBQF-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0x0702, "X9DRD-7LN4F" },
+ { IPMI_OEM_SUPERMICRO, 0x0703, "X9DBL-6F" },
+ { IPMI_OEM_SUPERMICRO, 0x0704, "X9DR7/E-TF+" },
+ { IPMI_OEM_SUPERMICRO, 0x0705, "X9DR7/E-LN4F" },
+ { IPMI_OEM_SUPERMICRO, 0x0706, "X9DRT-HF+" },
+ { IPMI_OEM_SUPERMICRO, 0x0707, "X9QR7-TF+" },
+ { IPMI_OEM_SUPERMICRO, 0x0708, "X9DRT-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0709, "X9DA7/E" },
+ { IPMI_OEM_SUPERMICRO, 0x070A, "X9DRF-F" },
+ { IPMI_OEM_SUPERMICRO, 0x070B, "X9SRL-CF" },
+ { IPMI_OEM_SUPERMICRO, 0x070C, "X9SRD-CD" },
+ { IPMI_OEM_SUPERMICRO, 0x070D, "B9DR7" },
+ { IPMI_OEM_SUPERMICRO, 0x070E, "X9DAX-7" },
+ { IPMI_OEM_SUPERMICRO, 0x070F, "X9QR7-TF" },
+ { IPMI_OEM_SUPERMICRO, 0x0710, "X9SRE" },
+ { IPMI_OEM_SUPERMICRO, 0x0711, "X9DRG-HTF+" },
+ { IPMI_OEM_SUPERMICRO, 0x0712, "B9DRG-X" },
+ { IPMI_OEM_SUPERMICRO, 0x0713, "X9DRFF-7" },
+ { IPMI_OEM_SUPERMICRO, 0x0714, "X9SRH-7F" },
+ { IPMI_OEM_SUPERMICRO, 0x0715, "X9DRW-7TPF" },
+ { IPMI_OEM_SUPERMICRO, 0x0716, "X9DBU-3F-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0x0717, "X9DRFF-7+/i+" },
+ { IPMI_OEM_SUPERMICRO, 0x0718, "X9DRFF-7G+" },
+ { IPMI_OEM_SUPERMICRO, 0x0719, "B9DRP" },
+ { IPMI_OEM_SUPERMICRO, 0x0720, "X9DRW-7TPF+" },
+ { IPMI_OEM_SUPERMICRO, 0x0721, "X9DBS-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0722, "X9DB3-TPF" },
+ { IPMI_OEM_SUPERMICRO, 0x0723, "X9DRL-7F/EF" },
+ { IPMI_OEM_SUPERMICRO, 0x0724, "X9DRH-if-NV" },
+ { IPMI_OEM_SUPERMICRO, 0x0725, "X9DRG+HF+II" },
+ { IPMI_OEM_SUPERMICRO, 0x0726, "X10QBi" },
+ { IPMI_OEM_SUPERMICRO, 0x0727, "X9DRW-CF31/CTF31" },
+ { IPMI_OEM_SUPERMICRO, 0x0728, "X10DRI/T" },
+ { IPMI_OEM_SUPERMICRO, 0x0729, "B9DRG-E" },
+ { IPMI_OEM_SUPERMICRO, 0x0730, "X9DAX-HFT" },
+ { IPMI_OEM_SUPERMICRO, 0x0731, "X9DRT-P" },
+ { IPMI_OEM_SUPERMICRO, 0x0732, "X9DRG-OF" },
+ { IPMI_OEM_SUPERMICRO, 0x0733, "X9DB3-CPU-AI026" },
+ { IPMI_OEM_SUPERMICRO, 0x0734, "AOC-STG-I2T" },
+ { IPMI_OEM_SUPERMICRO, 0x0743, "X9SPU" },
+ { IPMI_OEM_SUPERMICRO, 0x0801, "X10SLL" },
+ { IPMI_OEM_SUPERMICRO, 0x0802, "X10SLA" },
+ { IPMI_OEM_SUPERMICRO, 0x0803, "X10SLH" },
+ { IPMI_OEM_SUPERMICRO, 0x0804, "X10SL7-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0805, "X10SAE" },
+ { IPMI_OEM_SUPERMICRO, 0x0806, "X10SLM-LN4F" },
+ { IPMI_OEM_SUPERMICRO, 0x0807, "X10SLE" },
+ { IPMI_OEM_SUPERMICRO, 0x0808, "LSI3008" },
+ { IPMI_OEM_SUPERMICRO, 0x0809, "LSI3108" },
+ { IPMI_OEM_SUPERMICRO, 0x0810, "X10SLD" },
+ { IPMI_OEM_SUPERMICRO, 0x0811, "X10SLM-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0812, "X10SLL+-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0813, "X10SEAA-LN4F" },
+ { IPMI_OEM_SUPERMICRO, 0x0814, "X10SLX-TF" },
+ { IPMI_OEM_SUPERMICRO, 0x0815, "X10SLV" },
+ { IPMI_OEM_SUPERMICRO, 0x0816, "X10SBA" },
+ { IPMI_OEM_SUPERMICRO, 0x0817, "X10SLE-DF" },
+ { IPMI_OEM_SUPERMICRO, 0x0818, "X10SAT" },
+ { IPMI_OEM_SUPERMICRO, 0x0819, "X10SLV-Q" },
+ { IPMI_OEM_SUPERMICRO, 0x0820, "A1SAM" },
+ { IPMI_OEM_SUPERMICRO, 0x0820, "X9SKV" },
+ { IPMI_OEM_SUPERMICRO, 0x0821, "X10DRW-i(T)" },
+ { IPMI_OEM_SUPERMICRO, 0x0822, "X10DRFF(-C)" },
+ { IPMI_OEM_SUPERMICRO, 0x0823, "AOC-CTG-I1S" },
+ { IPMI_OEM_SUPERMICRO, 0x0824, "X10DRT-P" },
+ { IPMI_OEM_SUPERMICRO, 0x0825, "X10SRE-DS018" },
+ { IPMI_OEM_SUPERMICRO, 0x0826, "X10SRE-EXP-SI030" },
+ { IPMI_OEM_SUPERMICRO, 0x0827, "X9QRH-TF" },
+ { IPMI_OEM_SUPERMICRO, 0x0828, "A1SA2-2750F" },
+ { IPMI_OEM_SUPERMICRO, 0x0829, "C7Z97-OCE" },
+ { IPMI_OEM_SUPERMICRO, 0x0830, "X10DRFR" },
+ { IPMI_OEM_SUPERMICRO, 0x0831, "X10DRL-i" },
+ { IPMI_OEM_SUPERMICRO, 0x0832, "X10SRL" },
+ { IPMI_OEM_SUPERMICRO, 0x0833, "X10SRW-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0834, "X10SRI" },
+ { IPMI_OEM_SUPERMICRO, 0x0835, "X10DRC/i-LN4+/T4+" },
+ { IPMI_OEM_SUPERMICRO, 0x0836, "X10DAi" },
+ { IPMI_OEM_SUPERMICRO, 0x0837, "X10DRT-D-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0x0838, "X10SRH-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0839, "AOC-SLG3-2E4" },
+ { IPMI_OEM_SUPERMICRO, 0x083A, "X10DBT-T" },
+ { IPMI_OEM_SUPERMICRO, 0x083B, "X10DDW-iT" },
+ { IPMI_OEM_SUPERMICRO, 0x083C, "A1SA7-2750F" },
+ { IPMI_OEM_SUPERMICRO, 0x083D, "LSI 2116" },
+ { IPMI_OEM_SUPERMICRO, 0x083E, "B10DRi" },
+ { IPMI_OEM_SUPERMICRO, 0x083F, "B9QR7" },
+ { IPMI_OEM_SUPERMICRO, 0x0840, "B9DRG-3M" },
+ { IPMI_OEM_SUPERMICRO, 0x0841, "X9DRD-iT+" },
+ { IPMI_OEM_SUPERMICRO, 0x0842, "X10SLH-N6-ST031" },
+ { IPMI_OEM_SUPERMICRO, 0x0843, "X10DRG-H(T)" },
+ { IPMI_OEM_SUPERMICRO, 0x0844, "X10DRU-i+" },
+ { IPMI_OEM_SUPERMICRO, 0x0845, "X10DDW-iN" },
+ { IPMI_OEM_SUPERMICRO, 0x0846, "B1DRi" },
+ { IPMI_OEM_SUPERMICRO, 0x0847, "AOC-UR-i4XT" },
+ { IPMI_OEM_SUPERMICRO, 0x0848, "AOC-2UR68-i4G" },
+ { IPMI_OEM_SUPERMICRO, 0x0849, "AOC-UR-i4G" },
+ { IPMI_OEM_SUPERMICRO, 0x084A, "AOC-S40G-i2Q" },
+ { IPMI_OEM_SUPERMICRO, 0x084B, "X10SRG" },
+ { IPMI_OEM_SUPERMICRO, 0x084C, "C7Z97" },
+ { IPMI_OEM_SUPERMICRO, 0x084C, "C7Z97-MF" },
+ { IPMI_OEM_SUPERMICRO, 0x084D, "AOC-STGN-i1SF" },
+ { IPMI_OEM_SUPERMICRO, 0x084F, "AOC-STGN-i2SF" },
+ { IPMI_OEM_SUPERMICRO, 0x0850, "AOC-PG-i4M" },
+ { IPMI_OEM_SUPERMICRO, 0x0851, "PMC PM8076" },
+ { IPMI_OEM_SUPERMICRO, 0x0852, "X10DRG-Q" },
+ { IPMI_OEM_SUPERMICRO, 0x0853, "X10QBL" },
+ { IPMI_OEM_SUPERMICRO, 0x0854, "X10DRU-X" },
+ { IPMI_OEM_SUPERMICRO, 0x0855, "H9SKV-420" },
+ { IPMI_OEM_SUPERMICRO, 0x0856, "C7X99" },
+ { IPMI_OEM_SUPERMICRO, 0x0857, "X10SRA" },
+ { IPMI_OEM_SUPERMICRO, 0x0858, "X10DRT-H" },
+ { IPMI_OEM_SUPERMICRO, 0x0859, "X10DRH-C" },
+ { IPMI_OEM_SUPERMICRO, 0x085A, "A1SRM-LN7F" },
+ { IPMI_OEM_SUPERMICRO, 0x085A, "A1SRM-LN7F" },
+ { IPMI_OEM_SUPERMICRO, 0x085B, "X10DRT-HA/HB-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0x085C, "X10DRU-XLL" },
+ { IPMI_OEM_SUPERMICRO, 0x085D, "AOC-UR-i2XT" },
+ { IPMI_OEM_SUPERMICRO, 0x085E, "AOC-2UR6-i4XT" },
+ { IPMI_OEM_SUPERMICRO, 0x085F, "AOC-2UR68-i2XT" },
+ { IPMI_OEM_SUPERMICRO, 0x0860, "X10DRL-C/CT" },
+ { IPMI_OEM_SUPERMICRO, 0x0861, "B10DRT" },
+ { IPMI_OEM_SUPERMICRO, 0x0862, "B1SL1-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0863, "RSC-W2-66" },
+ { IPMI_OEM_SUPERMICRO, 0x0864, "X10DRW-E/NT" },
+ { IPMI_OEM_SUPERMICRO, 0x0865, "X10DRD-i/LTP" },
+ { IPMI_OEM_SUPERMICRO, 0x0866, "AOC-SLG3-2E4R" },
+ { IPMI_OEM_SUPERMICRO, 0x0867, "AOC-SLG3-4E4R" },
+ { IPMI_OEM_SUPERMICRO, 0x0868, "AOC-SLG3-2E4" },
+ { IPMI_OEM_SUPERMICRO, 0x0869, "AOC-URN2-i4XT" },
+ { IPMI_OEM_SUPERMICRO, 0x086A, "AOC-URN2-i2XT" },
+ { IPMI_OEM_SUPERMICRO, 0x086B, "X10DRS" },
+ { IPMI_OEM_SUPERMICRO, 0x086C, "X10DAL-i" },
+ { IPMI_OEM_SUPERMICRO, 0x086D, "X10SDV-TLN4F" },
+ { IPMI_OEM_SUPERMICRO, 0x086E, "X10DDW-iN" },
+ { IPMI_OEM_SUPERMICRO, 0x086F, "X10DRT-L" },
+ { IPMI_OEM_SUPERMICRO, 0x0870, "AOC-URN2-ii2SX" },
+ { IPMI_OEM_SUPERMICRO, 0x0871, "AOC-2UR68-i2XS" },
+ { IPMI_OEM_SUPERMICRO, 0x0872, "X10QRH+" },
+ { IPMI_OEM_SUPERMICRO, 0x0873, "AOC-2URN4-i4XT" },
+ { IPMI_OEM_SUPERMICRO, 0x0874, "AOC-2UR8N4-i2XT" },
+ { IPMI_OEM_SUPERMICRO, 0x0875, "AOC-2UR66-i4G" },
+ { IPMI_OEM_SUPERMICRO, 0x0876, "A2SCL-IN001" },
+ { IPMI_OEM_SUPERMICRO, 0x0877, "X10DRT-HB-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0x0878, "RSC-S2-88" },
+ { IPMI_OEM_SUPERMICRO, 0x0879, "X10DRD-I/L/NT" },
+ { IPMI_OEM_SUPERMICRO, 0x087A, "B1SD2-TF" },
+ { IPMI_OEM_SUPERMICRO, 0x087B, "AOC-XEH-i2M" },
+ { IPMI_OEM_SUPERMICRO, 0x087C, "AOC-XEH-i4M" },
+ { IPMI_OEM_SUPERMICRO, 0x087D, "X10SRD-F" },
+ { IPMI_OEM_SUPERMICRO, 0x087E, "AOC-STG-i4S" },
+ { IPMI_OEM_SUPERMICRO, 0x087F, "X10DRFF-iG" },
+ { IPMI_OEM_SUPERMICRO, 0x0880, "X10DRT-XA-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0x0881, "X10DRT-XB-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0x0882, "X10DRX" },
+ { IPMI_OEM_SUPERMICRO, 0x0883, "K1SPI" },
+ { IPMI_OEM_SUPERMICRO, 0x0884, "X11SSH-F/-LN4F" },
+ { IPMI_OEM_SUPERMICRO, 0x0885, "X11SSL-CF/-NF" },
+ { IPMI_OEM_SUPERMICRO, 0x0886, "X11SSA(-F)/X11SSi-LN4(F)" },
+ { IPMI_OEM_SUPERMICRO, 0x0887, "AOC-S8076L-L16e" },
+ { IPMI_OEM_SUPERMICRO, 0x0888, "X11SSZ" },
+ { IPMI_OEM_SUPERMICRO, 0x0889, "B10DRG" },
+ { IPMI_OEM_SUPERMICRO, 0x088A, "AOC-URN6-i2XT" },
+ { IPMI_OEM_SUPERMICRO, 0x088B, "C7Z170-SQ" },
+ { IPMI_OEM_SUPERMICRO, 0x088C, "AOM-S3108-H8S-SB" },
+ { IPMI_OEM_SUPERMICRO, 0x088D, "AOC-S100G-i2C" },
+ { IPMI_OEM_SUPERMICRO, 0x088E, "AOC-PIO-i2G" },
+ { IPMI_OEM_SUPERMICRO, 0x088F, "AOM-PIO-i2XT" },
+ { IPMI_OEM_SUPERMICRO, 0x0890, "X11SSQ" },
+ { IPMI_OEM_SUPERMICRO, 0x0891, "X11SBA" },
+ { IPMI_OEM_SUPERMICRO, 0x0892, "X10DRG-O+-CPU" },
+ { IPMI_OEM_SUPERMICRO, 0x0893, "X10DGQ" },
+ { IPMI_OEM_SUPERMICRO, 0x0894, "X11SSV-Q" },
+ { IPMI_OEM_SUPERMICRO, 0x0895, "X11SAE" },
+ { IPMI_OEM_SUPERMICRO, 0x0896, "X11SSL/M-F" },
+ { IPMI_OEM_SUPERMICRO, 0x0897, "B1SD1-TF" },
+ { IPMI_OEM_SUPERMICRO, 0x0898, "X11SSE" },
+ { IPMI_OEM_SUPERMICRO, 0x0899, "X10DRH" },
+ { IPMI_OEM_SUPERMICRO, 0x089A, "X11SLL" },
+ { IPMI_OEM_SUPERMICRO, 0x089B, "X11SSW-F" },
+ { IPMI_OEM_SUPERMICRO, 0x089C, "X11SSH-CTF" },
+ { IPMI_OEM_SUPERMICRO, 0x089D, "X10DSC+" },
+ { IPMI_OEM_SUPERMICRO, 0x089E, "AOC-URN2-i4GXS" },
+ { IPMI_OEM_SUPERMICRO, 0x089F, "X11SAE-M" },
+ { IPMI_OEM_SUPERMICRO, 0x0901, "X11SSM" },
+ { IPMI_OEM_SUPERMICRO, 0x0902, "C7Z170-OCE" },
+ { IPMI_OEM_SUPERMICRO, 0x0903, "AOC-CTGS-i2T" },
+ { IPMI_OEM_SUPERMICRO, 0x0904, "AOC-2UR6N4-i4XT" },
+ { IPMI_OEM_SUPERMICRO, 0x0905, "K1SPI-KA-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0x0906, "K1SPi-KB-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0x0907, "X11SAT(-F)" },
+ { IPMI_OEM_SUPERMICRO, 0x0908, "B2SS2" },
+ { IPMI_OEM_SUPERMICRO, 0x0909, "X11SSD-F" },
+ { IPMI_OEM_SUPERMICRO, 0x090A, "AOC-SLG3-4E4" },
+ { IPMI_OEM_SUPERMICRO, 0x090B, "AOC-MTG-i4S" },
+ { IPMI_OEM_SUPERMICRO, 0x090C, "AOC-MTG-I2s" },
+ { IPMI_OEM_SUPERMICRO, 0x090D, "X11SRE-DS018" },
+ { IPMI_OEM_SUPERMICRO, 0x090E, "K1SPE(-T)" },
+ { IPMI_OEM_SUPERMICRO, 0x090F, "A2SDi" },
+ { IPMI_OEM_SUPERMICRO, 0x0910, "A2SDi-H" },
+ { IPMI_OEM_SUPERMICRO, 0x0911, "X10DRT-PS" },
+ { IPMI_OEM_SUPERMICRO, 0x0912, "AOC-MG-i2" },
+ { IPMI_OEM_SUPERMICRO, 0x0913, "AOC-MG-i4" },
+ { IPMI_OEM_SUPERMICRO, 0x0914, "AOC-STGS-i1T" },
+ { IPMI_OEM_SUPERMICRO, 0x0915, "AOC-STGS-i2T" },
+ { IPMI_OEM_SUPERMICRO, 0x0916, "X10DSC-TP4S" },
+ { IPMI_OEM_SUPERMICRO, 0x0917, "X11DPi-N(T)" },
+ { IPMI_OEM_SUPERMICRO, 0x0918, "AOC-UR-i4GXS" },
+ { IPMI_OEM_SUPERMICRO, 0x0919, "X10SDD-F" },
+ { IPMI_OEM_SUPERMICRO, 0x091A, "AOC-2UR6-i4xT+" },
+ { IPMI_OEM_SUPERMICRO, 0x091B, "AOC-UR-i4XT+" },
+ { IPMI_OEM_SUPERMICRO, 0x091C, "X11DPU" },
+ { IPMI_OEM_SUPERMICRO, 0x091D, "X11SSW-LN4F" },
+ { IPMI_OEM_SUPERMICRO, 0x091E, "X10SD7-AC107" },
+ { IPMI_OEM_SUPERMICRO, 0x091F, "AOC-MTG-i4T" },
+ { IPMI_OEM_SUPERMICRO, 0x0920, "AOC-MTG-i2T" },
+ { IPMI_OEM_SUPERMICRO, 0x0921, "X10SDV-7TP8F" },
+ { IPMI_OEM_SUPERMICRO, 0x0922, "X10SRW-LN4F" },
+ { IPMI_OEM_SUPERMICRO, 0x0923, "AOM-X10OBI-PCH" },
+ { IPMI_OEM_SUPERMICRO, 0x0924, "X10SRM-(T)F" },
+ { IPMI_OEM_SUPERMICRO, 0x0925, "AOC-MHIBF-2QG" },
+ { IPMI_OEM_SUPERMICRO, 0x0926, "AOC-MHIBF-1QG" },
+ { IPMI_OEM_SUPERMICRO, 0x0927, "X11DPT-PS" },
+ { IPMI_OEM_SUPERMICRO, 0x0928, "AOC-S25G-b2S" },
+ { IPMI_OEM_SUPERMICRO, 0x0929, "AOC-2UR66-i4XTF" },
+ { IPMI_OEM_SUPERMICRO, 0x092A, "AOC-M25G-b2S" },
+ { IPMI_OEM_SUPERMICRO, 0x092B, "X10DSN-TS" },
+ { IPMI_OEM_SUPERMICRO, 0x092C, "AOC-S8069L-16xR" },
+ { IPMI_OEM_SUPERMICRO, 0x092D, "X10SDE-DF" },
+ { IPMI_OEM_SUPERMICRO, 0x092E, "AOC-2UR68-B2TS" },
+ { IPMI_OEM_SUPERMICRO, 0x092F, "AOC-S40G-i1Q" },
+ { IPMI_OEM_SUPERMICRO, 0x0930, "X11SSQ-L" },
+ { IPMI_OEM_SUPERMICRO, 0x0931, "B2SS1-CF" },
+ { IPMI_OEM_SUPERMICRO, 0x0932, "X10DRL-LN4" },
+ { IPMI_OEM_SUPERMICRO, 0x0933, "P8DTU" },
+ { IPMI_OEM_SUPERMICRO, 0x0934, "AOC-MHFI-i1C" },
+ { IPMI_OEM_SUPERMICRO, 0x0935, "AOC-STG-i4T" },
+ { IPMI_OEM_SUPERMICRO, 0x0936, "AOC-UR-i4XTF" },
+ { IPMI_OEM_SUPERMICRO, 0x0937, "X11DPT" },
+ { IPMI_OEM_SUPERMICRO, 0x0938, "X11DPT" },
+ { IPMI_OEM_SUPERMICRO, 0x0939, "X11SSV-M4" },
+ { IPMI_OEM_SUPERMICRO, 0x093A, "X11SSV-M4F" },
+ { IPMI_OEM_SUPERMICRO, 0x093B, "AOC-STGF-i2S" },
+ { IPMI_OEM_SUPERMICRO, 0x093C, "A2SAV" },
+ { IPMI_OEM_SUPERMICRO, 0x093D, "AOC-S3216L-L16iT" },
+ { IPMI_OEM_SUPERMICRO, 0x093E, "X10DRT-B+" },
+ { IPMI_OEM_SUPERMICRO, 0x093F, "C7Z270-CG-L" },
+ { IPMI_OEM_SUPERMICRO, 0x0940, "C7Z270-CG" },
+ { IPMI_OEM_SUPERMICRO, 0x0941, "X11SPi-TF" },
+ { IPMI_OEM_SUPERMICRO, 0x0942, "K1SPE" },
+ { IPMI_OEM_SUPERMICRO, 0x0943, "C7Z270-PG" },
+ { IPMI_OEM_SUPERMICRO, 0x0944, "C7H270-CG-ML" },
+ { IPMI_OEM_SUPERMICRO, 0x0945, "C7Q270-CB-ML" },
+ { IPMI_OEM_SUPERMICRO, 0x0946, "X10SDV" },
+ { IPMI_OEM_SUPERMICRO, 0x0947, "A2SAN" },
+ { IPMI_OEM_SUPERMICRO, 0x0948, "AOC-C25G-m2S" },
+ { IPMI_OEM_SUPERMICRO, 0x0949, "AOC-MH25G-m2S2T" },
+ { IPMI_OEM_SUPERMICRO, 0x094A, "AOC-2UR68-m2TS" },
+ { IPMI_OEM_SUPERMICRO, 0x094B, "AOC-S100G-m2C" },
+ { IPMI_OEM_SUPERMICRO, 0x094C, "AOC-S25G-m2S" },
+ { IPMI_OEM_SUPERMICRO, 0x094D, "AOC-MHIBF" },
+ { IPMI_OEM_SUPERMICRO, 0x094E, "AOC-MH25G-b2S2G" },
+ { IPMI_OEM_SUPERMICRO, 0x094F, "P8DNU" },
+ { IPMI_OEM_SUPERMICRO, 0x0950, "X10DRW-SE" },
+ { IPMI_OEM_SUPERMICRO, 0x0951, "B2SS1(2)-MTF" },
+ { IPMI_OEM_SUPERMICRO, 0x0952, "X11SPX-TF" },
+ { IPMI_OEM_SUPERMICRO, 0x0953, "X11SPW-(c)TF" },
+ { IPMI_OEM_SUPERMICRO, 0x0954, "AOC-C25G-m1S" },
+ { IPMI_OEM_SUPERMICRO, 0x0955, "X11SSW" },
+ { IPMI_OEM_SUPERMICRO, 0x0956, "AOC-MHIBF-m1Q2G" },
+ { IPMI_OEM_SUPERMICRO, 0x0957, "AOC-MHIBF-m2Q2G" },
+ { IPMI_OEM_SUPERMICRO, 0x0958, "X11SSH" },
+ { IPMI_OEM_SUPERMICRO, 0x0959, "R10SR2" },
+ { IPMI_OEM_SUPERMICRO, 0x095A, "X10DGO" },
+ { IPMI_OEM_SUPERMICRO, 0x095B, "X11DPU-XLL" },
+ { IPMI_OEM_SUPERMICRO, 0x095C, "X11DPU-X" },
+ { IPMI_OEM_SUPERMICRO, 0x095D, "X11SPM-T(P)F" },
+ { IPMI_OEM_SUPERMICRO, 0x095E, "X11SPH-NCTPF" },
+ { IPMI_OEM_SUPERMICRO, 0x095F, "X11SAA" },
+ { IPMI_OEM_SUPERMICRO, 0x0960, "X11SAN" },
+ { IPMI_OEM_SUPERMICRO, 0x0961, "P9DSC" },
+ { IPMI_OEM_SUPERMICRO, 0x0962, "X11DPT-B+" },
+ { IPMI_OEM_SUPERMICRO, 0x0963, "H11DSU-i" },
+ { IPMI_OEM_SUPERMICRO, 0x0964, "H11DSi-NT" },
+ { IPMI_OEM_SUPERMICRO, 0x0965, "C7B250-CB-ML" },
+ { IPMI_OEM_SUPERMICRO, 0x0966, "B11DPT" },
+ { IPMI_OEM_SUPERMICRO, 0x0967, "X11DDW" },
+ { IPMI_OEM_SUPERMICRO, 0x0968, "X11DPL-i" },
+ { IPMI_OEM_SUPERMICRO, 0x0969, "A2SDi-HLN4F" },
+ { IPMI_OEM_SUPERMICRO, 0x096A, "C7C232-CB-ML" },
+ { IPMI_OEM_SUPERMICRO, 0x096B, "X11DPT-P-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0x096C, "X11DPU-Z+" },
+ { IPMI_OEM_SUPERMICRO, 0x096D, "X11DPG-Qt" },
+ { IPMI_OEM_SUPERMICRO, 0x096E, "X11SPL-F" },
+ { IPMI_OEM_SUPERMICRO, 0x096F, "AOC-IBH-X4ED" },
+ { IPMI_OEM_SUPERMICRO, 0x0970, "C7Z270-CG-M" },
+ { IPMI_OEM_SUPERMICRO, 0x0971, "X11SRE-EXP-SI030" },
+ { IPMI_OEM_SUPERMICRO, 0x0972, "SAS3216" },
+ { IPMI_OEM_SUPERMICRO, 0x0973, "SAS3508" },
+ { IPMI_OEM_SUPERMICRO, 0x0974, "SAS3516" },
+ { IPMI_OEM_SUPERMICRO, 0x0975, "SAS3316" },
+ { IPMI_OEM_SUPERMICRO, 0x0976, "SAS3324" },
+ { IPMI_OEM_SUPERMICRO, 0x0977, "X11DPFR-SN" },
+ { IPMI_OEM_SUPERMICRO, 0x0978, "AOC-S25G-i2S" },
+ { IPMI_OEM_SUPERMICRO, 0x0979, "BMB-IBD-E3616" },
+ { IPMI_OEM_SUPERMICRO, 0x097A, "X11DAI-N" },
+ { IPMI_OEM_SUPERMICRO, 0x097B, "C7X299" },
+ { IPMI_OEM_SUPERMICRO, 0x097C, "AOC-IBH_X4ES" },
+ { IPMI_OEM_SUPERMICRO, 0x097D, "C7B250-CB-i" },
+ { IPMI_OEM_SUPERMICRO, 0x097E, "X11SPG-F" },
+ { IPMI_OEM_SUPERMICRO, 0x097F, "X11QPH+" },
+ { IPMI_OEM_SUPERMICRO, 0x0980, "X11OPi" },
+ { IPMI_OEM_SUPERMICRO, 0x0981, "X11DPH-i" },
+ { IPMI_OEM_SUPERMICRO, 0x0982, "A2SDV-TLN5F" },
+ { IPMI_OEM_SUPERMICRO, 0x0983, "AOC-M25G-m4S" },
+ { IPMI_OEM_SUPERMICRO, 0x0984, "X11SRM-(V)F" },
+ { IPMI_OEM_SUPERMICRO, 0x0985, "P9DSU-C" },
+ { IPMI_OEM_SUPERMICRO, 0x0986, "X11SDV" },
+ { IPMI_OEM_SUPERMICRO, 0x0987, "X11SDV-TLN2F" },
+ { IPMI_OEM_SUPERMICRO, 0x0988, "X11DGQ" },
+ { IPMI_OEM_SUPERMICRO, 0x0989, "B10DRE" },
+ { IPMI_OEM_SUPERMICRO, 0x098A, "H11DST-B" },
+ { IPMI_OEM_SUPERMICRO, 0x098B, "X11SSN" },
+ { IPMI_OEM_SUPERMICRO, 0x098C, "X11DPX-T" },
+ { IPMI_OEM_SUPERMICRO, 0x098D, "A2SAP-H/E/L" },
+ { IPMI_OEM_SUPERMICRO, 0x098E, "X11SRA-R/F" },
+ { IPMI_OEM_SUPERMICRO, 0x098F, "B11QPi" },
+ { IPMI_OEM_SUPERMICRO, 0x0991, "C7Z370-CG-L" },
+ { IPMI_OEM_SUPERMICRO, 0x0992, "B11SPi-CPU-TF" },
+ { IPMI_OEM_SUPERMICRO, 0x0993, "AOC-URN4-i2TS" },
+ { IPMI_OEM_SUPERMICRO, 0x0994, "AOC-B25G-M2S" },
+ { IPMI_OEM_SUPERMICRO, 0x0995, "X11DPG-SN" },
+ { IPMI_OEM_SUPERMICRO, 0x0996, "AOC-MTG-b2T" },
+ { IPMI_OEM_SUPERMICRO, 0x0997, "B11DPE" },
+ { IPMI_OEM_SUPERMICRO, 0x0998, "C7Z370-CG-iW" },
+ { IPMI_OEM_SUPERMICRO, 0x0999, "AOC-MHIBE-m1CG" },
+ { IPMI_OEM_SUPERMICRO, 0x099A, "X11DPS-R" },
+ { IPMI_OEM_SUPERMICRO, 0x099B, "AOC-OPH-WFR" },
+ { IPMI_OEM_SUPERMICRO, 0x099C, "SAS 3616" },
+ { IPMI_OEM_SUPERMICRO, 0x099C, "SAS 3616" },
+ { IPMI_OEM_SUPERMICRO, 0x099D, "X11DSC+" },
+ { IPMI_OEM_SUPERMICRO, 0x099E, "C7Z390-PGW" },
+ { IPMI_OEM_SUPERMICRO, 0x099F, "C7Z390-CG-IW" },
+ { IPMI_OEM_SUPERMICRO, 0x1111, "H8DCR-3" },
+ { IPMI_OEM_SUPERMICRO, 0x1211, "H8DC8" },
+ { IPMI_OEM_SUPERMICRO, 0x1311, "H8QM8-2" },
+ { IPMI_OEM_SUPERMICRO, 0x1411, "H8DA8-2" },
+ { IPMI_OEM_SUPERMICRO, 0x1511, "H8DMR-82" },
+ { IPMI_OEM_SUPERMICRO, 0x1611, "H8DM8-2" },
+ { IPMI_OEM_SUPERMICRO, 0x1711, "H8SMI-2" },
+ { IPMI_OEM_SUPERMICRO, 0x1811, "H8SSL-I2" },
+ { IPMI_OEM_SUPERMICRO, 0x1911, "H8DMU" },
+ { IPMI_OEM_SUPERMICRO, 0x1A01, "C7B360-CB-M" },
+ { IPMI_OEM_SUPERMICRO, 0x1A02, "C7C242-CB-M" },
+ { IPMI_OEM_SUPERMICRO, 0x1A03, "H11SSL-i/c/nc" },
+ { IPMI_OEM_SUPERMICRO, 0x1A04, "B10KNM" },
+ { IPMI_OEM_SUPERMICRO, 0x1A05, "AOM-M25G-i2S" },
+ { IPMI_OEM_SUPERMICRO, 0x1A06, "X11DPG-OT-CPU" },
+ { IPMI_OEM_SUPERMICRO, 0x1A07, "B11SPE-CPU-TF/25G" },
+ { IPMI_OEM_SUPERMICRO, 0x1A08, "AOC-STG-b2T" },
+ { IPMI_OEM_SUPERMICRO, 0x1A09, "AOC-URN4-b2XT" },
+ { IPMI_OEM_SUPERMICRO, 0x1A1A, "A2SD1-3750F/3955F" },
+ { IPMI_OEM_SUPERMICRO, 0x1A1B, "X11SCE-F" },
+ { IPMI_OEM_SUPERMICRO, 0x1A1C, "X11DSF" },
+ { IPMI_OEM_SUPERMICRO, 0x1A1D, "X11SCA-F/W" },
+ { IPMI_OEM_SUPERMICRO, 0x1A1E, "X11DAC" },
+ { IPMI_OEM_SUPERMICRO, 0x1A1F, "X11SCL-F" },
+ { IPMI_OEM_SUPERMICRO, 0x1B01, "X11DSN-TS" },
+ { IPMI_OEM_SUPERMICRO, 0x1B02, "X11DGO-T" },
+ { IPMI_OEM_SUPERMICRO, 0x1B03, "AOC-2UR688-i4XTF" },
+ { IPMI_OEM_SUPERMICRO, 0x1B04, "X11DPT-LC019" },
+ { IPMI_OEM_SUPERMICRO, 0x1B05, "X11SCQ" },
+ { IPMI_OEM_SUPERMICRO, 0x1B06, "X11SCQ-L" },
+ { IPMI_OEM_SUPERMICRO, 0x1B07, "X11SCW-F" },
+ { IPMI_OEM_SUPERMICRO, 0x1B08, "C9X299-PG300" },
+ { IPMI_OEM_SUPERMICRO, 0x1B09, "X11SCZ-F" },
+ { IPMI_OEM_SUPERMICRO, 0x1B0A, "B10DRT-IBF2" },
+ { IPMI_OEM_SUPERMICRO, 0x1B0B, "AOC-STG-b2T" },
+ { IPMI_OEM_SUPERMICRO, 0x1B0C, "AOC-B25G-6X4D" },
+ { IPMI_OEM_SUPERMICRO, 0x1B0D, "X11SCV-Q/L" },
+ { IPMI_OEM_SUPERMICRO, 0x1B0E, "X11SCL-IF" },
+ { IPMI_OEM_SUPERMICRO, 0x1B0F, "X11SCM" },
+ { IPMI_OEM_SUPERMICRO, 0x1B10, "A2SDV-LN8F/LN10PF" },
+ { IPMI_OEM_SUPERMICRO, 0x1B11, "X11SCH-LN4F" },
+ { IPMI_OEM_SUPERMICRO, 0x1B12, "AOC-SGP-i4" },
+ { IPMI_OEM_SUPERMICRO, 0x1B13, "AOC-4UR66-i4XTF" },
+ { IPMI_OEM_SUPERMICRO, 0x1B14, "C9X299-PG300F" },
+ { IPMI_OEM_SUPERMICRO, 0x1B15, "X11SCL-LN4F" },
+ { IPMI_OEM_SUPERMICRO, 0x1B16, "AOM-PICO-3L" },
+ { IPMI_OEM_SUPERMICRO, 0x1B17, "X11DPFF-SN" },
+ { IPMI_OEM_SUPERMICRO, 0x1B18, "C7B360-CB-ML" },
+ { IPMI_OEM_SUPERMICRO, 0x1B19, "H11SSW-NT/iN" },
+ { IPMI_OEM_SUPERMICRO, 0x1B1A, "C9Z390-CG(W)" },
+ { IPMI_OEM_SUPERMICRO, 0x1B1B, "AOC-CTG-i2S" },
+ { IPMI_OEM_SUPERMICRO, 0x1B1C, "X11SDD" },
+ { IPMI_OEM_SUPERMICRO, 0x1B1D, "X11DPT-L" },
+ { IPMI_OEM_SUPERMICRO, 0x1B1E, "AOC-URN4-B2ts" },
+ { IPMI_OEM_SUPERMICRO, 0x1B1F, "X11DPG-HGX2" },
+ { IPMI_OEM_SUPERMICRO, 0x1B20, "AOC-SLG2-2TM2" },
+ { IPMI_OEM_SUPERMICRO, 0x1B21, "AOC-SLG2-4TM2" },
+ { IPMI_OEM_SUPERMICRO, 0x1B22, "AOC-SMG2-2TM2" },
+ { IPMI_OEM_SUPERMICRO, 0x1B23, "RSC-UM2R-8+-NI22" },
+ { IPMI_OEM_SUPERMICRO, 0x1B24, "BPN-6S3008S6" },
+ { IPMI_OEM_SUPERMICRO, 0x1B25, "X11DPU-ZE+" },
+ { IPMI_OEM_SUPERMICRO, 0x1B26, "AOC-2UR68-b2TS" },
+ { IPMI_OEM_SUPERMICRO, 0x1B27, "AOC-S100G-b1C" },
+ { IPMI_OEM_SUPERMICRO, 0x1B28, "X11SPA-TF" },
+ { IPMI_OEM_SUPERMICRO, 0x1B29, "B2SC1" },
+ { IPMI_OEM_SUPERMICRO, 0x1B2A, "AOC-2MG-i8" },
+ { IPMI_OEM_SUPERMICRO, 0x1B2B, "H12SSW-iN" },
+ { IPMI_OEM_SUPERMICRO, 0x1B2C, "H12SSW-NT" },
+ { IPMI_OEM_SUPERMICRO, 0x1B2D, "M11SDV" },
+ { IPMI_OEM_SUPERMICRO, 0x1B2E, "AOC-MG-b2" },
+ { IPMI_OEM_SUPERMICRO, 0x1B2F, "AOM-SMF-TP4F" },
+ { IPMI_OEM_SUPERMICRO, 0x1B31, "AOC-M25G-m2S" },
+ { IPMI_OEM_SUPERMICRO, 0x1B32, "B11SRE-CPU" },
+ { IPMI_OEM_SUPERMICRO, 0x1B33, "B11SRE" },
+ { IPMI_OEM_SUPERMICRO, 0x1B34, "X11SPA-T" },
+ { IPMI_OEM_SUPERMICRO, 0x1B35, "X11SDW" },
+ { IPMI_OEM_SUPERMICRO, 0x1B36, "X11SCD-F" },
+ { IPMI_OEM_SUPERMICRO, 0x1B37, "X11DPU-V" },
+ { IPMI_OEM_SUPERMICRO, 0x1B38, "X11DPT-BV" },
+ { IPMI_OEM_SUPERMICRO, 0x1B39, "B11SCG-ZTF" },
+ { IPMI_OEM_SUPERMICRO, 0x1B3A, "H12DST-B" },
+ { IPMI_OEM_SUPERMICRO, 0x1B3B, "X11SDS-8C" },
+ { IPMI_OEM_SUPERMICRO, 0x1B3C, "AOM-SDW-B16X2" },
+ { IPMI_OEM_SUPERMICRO, 0x1B3D, "B11SCG-CTF" },
+ { IPMI_OEM_SUPERMICRO, 0x1B3E, "AOC-S100G-b2C" },
+ { IPMI_OEM_SUPERMICRO, 0x1B3F, "X11SPD-F" },
+ { IPMI_OEM_SUPERMICRO, 0x1B41, "X11SRL-F" },
+ { IPMI_OEM_SUPERMICRO, 0x2011, "H8SMU" },
+ { IPMI_OEM_SUPERMICRO, 0x2111, "M8QME" },
+ { IPMI_OEM_SUPERMICRO, 0x2211, "H8DMT" },
+ { IPMI_OEM_SUPERMICRO, 0x2311, "BHDME" },
+ { IPMI_OEM_SUPERMICRO, 0x2411, "H8DMT-IBX" },
+ { IPMI_OEM_SUPERMICRO, 0x2511, "H8DME-2-LS006" },
+ { IPMI_OEM_SUPERMICRO, 0x8080, "X7DB8" },
+ { IPMI_OEM_SUPERMICRO, 0x8180, "X7DA8" },
+ { IPMI_OEM_SUPERMICRO, 0x8280, "PDSMI-LN4" },
+ { IPMI_OEM_SUPERMICRO, 0x8380, "X7DBP-X" },
+ { IPMI_OEM_SUPERMICRO, 0x8480, "X7DBR-8+" },
+ { IPMI_OEM_SUPERMICRO, 0x8580, "PDSML" },
+ { IPMI_OEM_SUPERMICRO, 0x8680, "X7DVL" },
+ { IPMI_OEM_SUPERMICRO, 0x8780, "PDSBA" },
+ { IPMI_OEM_SUPERMICRO, 0x8880, "X7DBX" },
+ { IPMI_OEM_SUPERMICRO, 0x8980, "X7DBP-8" },
+ { IPMI_OEM_SUPERMICRO, 0x9080, "X7DB8-X" },
+ { IPMI_OEM_SUPERMICRO, 0x9180, "PDSME+" },
+ { IPMI_OEM_SUPERMICRO, 0x9280, "X7DBR-3" },
+ { IPMI_OEM_SUPERMICRO, 0x9380, "PDSLM" },
+ { IPMI_OEM_SUPERMICRO, 0x9480, "X7DAL-E" },
+ { IPMI_OEM_SUPERMICRO, 0x9580, "X6QT8" },
+ { IPMI_OEM_SUPERMICRO, 0x9680, "X7DBN" },
+ { IPMI_OEM_SUPERMICRO, 0x9780, "X7DBU" },
+ { IPMI_OEM_SUPERMICRO, 0x9880, "PDSMU+" },
+ { IPMI_OEM_SUPERMICRO, 0x9980, "X7DBT" },
+ { IPMI_OEM_SUPERMICRO, 0xA011, "H8DM3-2" },
+ { IPMI_OEM_SUPERMICRO, 0xA080, "X7DVL-3" },
+ { IPMI_OEM_SUPERMICRO, 0xA111, "H8DA3-2" },
+ { IPMI_OEM_SUPERMICRO, 0xA211, "H8QM3-2" },
+ { IPMI_OEM_SUPERMICRO, 0xA280, "X7DW3+" },
+ { IPMI_OEM_SUPERMICRO, 0xA311, "H8QM3-EX" },
+ { IPMI_OEM_SUPERMICRO, 0xA380, "X7QC3" },
+ { IPMI_OEM_SUPERMICRO, 0xA480, "X7DCL-3" },
+ { IPMI_OEM_SUPERMICRO, 0xA511, "H8DI3+" },
+ { IPMI_OEM_SUPERMICRO, 0xA580, "AOC-USAS-L8I" },
+ { IPMI_OEM_SUPERMICRO, 0xA611, "BHQIE" },
+ { IPMI_OEM_SUPERMICRO, 0xA680, "X7DCA-3/i" },
+ { IPMI_OEM_SUPERMICRO, 0xA711, "H8SGL" },
+ { IPMI_OEM_SUPERMICRO, 0xA780, "B7DC3" },
+ { IPMI_OEM_SUPERMICRO, 0xA811, "H8DGU" },
+ { IPMI_OEM_SUPERMICRO, 0xA811, "H8DGU" },
+ { IPMI_OEM_SUPERMICRO, 0xA880, "X8DA3/i" },
+ { IPMI_OEM_SUPERMICRO, 0xA911, "H8DGG-QF" },
+ { IPMI_OEM_SUPERMICRO, 0xA980, "X7SB3" },
+ { IPMI_OEM_SUPERMICRO, 0xAA11, "H8DGT" },
+ { IPMI_OEM_SUPERMICRO, 0xAA80, "X7DWT-C-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0xAA80, "X7SBL-LN1/LN2" },
+ { IPMI_OEM_SUPERMICRO, 0xAB11, "H8QG6" },
+ { IPMI_OEM_SUPERMICRO, 0xAB80, "C2SBM-Q" },
+ { IPMI_OEM_SUPERMICRO, 0xAC11, "H8DGU-LN4" },
+ { IPMI_OEM_SUPERMICRO, 0xAC80, "X7DWU" },
+ { IPMI_OEM_SUPERMICRO, 0xAD11, "BHQME" },
+ { IPMI_OEM_SUPERMICRO, 0xAD11, "H8DGT-HIBQF-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0xAE11, "H8QGI-F-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0xAE80, "PDSMP-JN001" },
+ { IPMI_OEM_SUPERMICRO, 0xAF11, "H8DGU-LN4F+-AI034" },
+ { IPMI_OEM_SUPERMICRO, 0xAF80, "AOC-UTG-I2" },
+ { IPMI_OEM_SUPERMICRO, 0xB080, "B7DBE" },
+ { IPMI_OEM_SUPERMICRO, 0xB180, "X7DBI+" },
+ { IPMI_OEM_SUPERMICRO, 0xB280, "X7DVL-L" },
+ { IPMI_OEM_SUPERMICRO, 0xB380, "X7DWN" },
+ { IPMI_OEM_SUPERMICRO, 0xB480, "AOC-UG-i4" },
+ { IPMI_OEM_SUPERMICRO, 0xB580, "PDSBM-LN2" },
+ { IPMI_OEM_SUPERMICRO, 0xB680, "X7DGT-ATOKAP" },
+ { IPMI_OEM_SUPERMICRO, 0xB780, "C2SBA" },
+ { IPMI_OEM_SUPERMICRO, 0xB780, "X7DWT-CD-SG007" },
+ { IPMI_OEM_SUPERMICRO, 0xB880, "C2SEA" },
+ { IPMI_OEM_SUPERMICRO, 0xB980, "Winbond IPMI (AMI)" },
+ { IPMI_OEM_SUPERMICRO, 0xBA11, "H8SCM-F" },
+ { IPMI_OEM_SUPERMICRO, 0xBA80, "C2SBX" },
+ { IPMI_OEM_SUPERMICRO, 0xBA80, "X7SLM-L" },
+ { IPMI_OEM_SUPERMICRO, 0xBB11, "BHDGT" },
+ { IPMI_OEM_SUPERMICRO, 0xBB80, "B7DCE" },
+ { IPMI_OEM_SUPERMICRO, 0xBC11, "BHQG6/E" },
+ { IPMI_OEM_SUPERMICRO, 0xBC11, "H8DG6/i-F" },
+ { IPMI_OEM_SUPERMICRO, 0xBC80, "X7DWT/-INF" },
+ { IPMI_OEM_SUPERMICRO, 0xBD11, "H8DCT-IBQF" },
+ { IPMI_OEM_SUPERMICRO, 0xBD11, "H8DGT-C" },
+ { IPMI_OEM_SUPERMICRO, 0xBD80, "C2SBM" },
+ { IPMI_OEM_SUPERMICRO, 0xBE11, "H8DCT" },
+ { IPMI_OEM_SUPERMICRO, 0xBE80, "C2SBC" },
+ { IPMI_OEM_SUPERMICRO, 0xBE80, "C2SBC" },
+ { IPMI_OEM_SUPERMICRO, 0xBF11, "H8DME-EX-LS006" },
+ { IPMI_OEM_SUPERMICRO, 0xBF80, "C2SBi" },
+ { IPMI_OEM_SUPERMICRO, 0xC080, "AOC-USAS-H4i" },
+ { IPMI_OEM_SUPERMICRO, 0xC180, "AOC-USAS-H8i" },
+ { IPMI_OEM_SUPERMICRO, 0xC280, "B7DW3" },
+ { IPMI_OEM_SUPERMICRO, 0xC380, "AOC-USASLP-H8iR" },
+ { IPMI_OEM_SUPERMICRO, 0xCA11, "H8QGL" },
+ { IPMI_OEM_SUPERMICRO, 0xCB11, "H8DGT-CM" },
+ { IPMI_OEM_SUPERMICRO, 0xCD11, "H8DCL-6F" },
+ { IPMI_OEM_SUPERMICRO, 0xCE11, "H8DCT-HLN4F" },
+ { IPMI_OEM_SUPERMICRO, 0xCF11, "H8SML-7/i(F)" },
+ { IPMI_OEM_SUPERMICRO, 0xD011, "H8QG7" },
+ { IPMI_OEM_SUPERMICRO, 0xD080, "X7DWP" },
+ { IPMI_OEM_SUPERMICRO, 0xD111, "H8SME-F" },
+ { IPMI_OEM_SUPERMICRO, 0xD180, "X7SBi" },
+ { IPMI_OEM_SUPERMICRO, 0xD280, "X7SB4/E" },
+ { IPMI_OEM_SUPERMICRO, 0xD380, "X7SBA" },
+ { IPMI_OEM_SUPERMICRO, 0xD480, "X7SBi-LN4" },
+ { IPMI_OEM_SUPERMICRO, 0xD580, "X7SBF" },
+ { IPMI_OEM_SUPERMICRO, 0xD680, "X7DCA-3/i" },
+ { IPMI_OEM_SUPERMICRO, 0xDA80, "C2SBM-Q" },
+ { IPMI_OEM_SUPERMICRO, 0xDB80, "X7DCU" },
+ { IPMI_OEM_SUPERMICRO, 0xDC80, "X7DCA-L" },
+ { IPMI_OEM_SUPERMICRO, 0xDD80, "X7SBX" },
+ { IPMI_OEM_SUPERMICRO, 0xDE80, "X7DCT-10G" },
+ { IPMI_OEM_SUPERMICRO, 0xDF80, "X7DWE" },
+ { IPMI_OEM_SUPERMICRO, 0xF080, "X7SBT" },
+ { IPMI_OEM_SUPERMICRO, 0xF180, "X7SBU" },
+ { IPMI_OEM_SUPERMICRO, 0xF280, "X8DTN+" },
+ { IPMI_OEM_SUPERMICRO, 0xF380, "X8SAX" },
+ { IPMI_OEM_SUPERMICRO, 0xF480, "X7DCX" },
+ { IPMI_OEM_SUPERMICRO, 0xF580, "X8ST3" },
+ /* YADRO */
+ { IPMI_OEM_YADRO, 0x0001, "VESNIN BMC" },
+ { IPMI_OEM_YADRO, 0x000A, "TATLIN.UNIFIED Storage Controller BMC" },
+ { IPMI_OEM_YADRO, 0x0014, "VEGMAN Series BMC" },
+ { IPMI_OEM_YADRO, 0x0015, "TATLIN.ARCHIVE/xS BMC" },
{ 0xffffff , 0xffff , NULL },
};
@@ -385,8 +1033,8 @@ const struct valstr ipmi_privlvl_vals[] = {
{ IPMI_SESSION_PRIV_OPERATOR, "OPERATOR" },
{ IPMI_SESSION_PRIV_ADMIN, "ADMINISTRATOR" },
{ IPMI_SESSION_PRIV_OEM, "OEM" },
- { 0xF, "NO ACCESS" },
- { 0xFF, NULL },
+ { IPMI_SESSION_PRIV_NOACCESS, "NO ACCESS" },
+ { UINT8_MAX, NULL },
};
@@ -617,6 +1265,25 @@ const struct valstr ipmi_chassis_power_control_vals[] = {
{ 0x00, NULL },
};
+/*
+ * See Table 28-11, Get System Restart Cause Command
+ */
+const struct valstr ipmi_chassis_restart_cause_vals[] = {
+ { 0x0, "unknown" },
+ { 0x1, "chassis power control command" },
+ { 0x2, "reset via pushbutton" },
+ { 0x3, "power-up via pushbutton" },
+ { 0x4, "watchdog expired" },
+ { 0x5, "OEM" },
+ { 0x6, "power-up due to always-restore power policy" },
+ { 0x7, "power-up due to restore-previous power policy" },
+ { 0x8, "reset via PEF" },
+ { 0x9, "power-cycle via PEF" },
+ { 0xa, "soft reset" },
+ { 0xb, "power-up via RTC wakeup" },
+ { 0xFF, NULL },
+};
+
const struct valstr ipmi_auth_algorithms[] = {
{ IPMI_AUTH_RAKP_NONE, "none" },
{ IPMI_AUTH_RAKP_HMAC_SHA1, "hmac_sha1" },
@@ -787,3 +1454,327 @@ const struct oemvalstr picmg_busres_shmc_status_vals[] = {
{ 0xffffff, 0x00, NULL }
};
+
+
+/**
+ * A helper function to count repetitions of the same byte
+ * at the beginning of a string.
+ */
+static
+size_t count_bytes(const char *s, unsigned char c)
+{
+ size_t count;
+
+ for (count = 0; s && s[0] == c; ++s, ++count);
+
+ return count;
+}
+
+/**
+ * Parse the IANA PEN registry file.
+ *
+ * See https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
+ * The expected entry format is:
+ *
+ * Decimal
+ * | Organization
+ * | | Contact
+ * | | | Email
+ * | | | |
+ * 0
+ * Reserved
+ * Internet Assigned Numbers Authority
+ * iana&iana.org
+ *
+ * That is, IANA PEN at position 0, enterprise name at position 2.
+ */
+#define IANA_NAME_OFFSET 2
+#define IANA_PEN_REGISTRY "enterprise-numbers"
+static
+int oem_info_list_load(oem_valstr_list_t **list)
+{
+ FILE *in = NULL;
+ char *home;
+ oem_valstr_list_t *oemlist = *list;
+ int count = 0;
+
+ /*
+ * First try to open user's local registry if HOME is set
+ */
+ if ((home = getenv("HOME"))) {
+ char path[PATH_MAX + 1] = { 0 };
+ snprintf(path, PATH_MAX, "%s%s",
+ home,
+ PATH_SEPARATOR IANAUSERDIR PATH_SEPARATOR IANA_PEN_REGISTRY);
+ in = fopen(path, "r");
+ }
+
+ if (!in) {
+ /*
+ * Now open the system default file
+ */
+ in = fopen(IANADIR PATH_SEPARATOR IANA_PEN_REGISTRY, "r");
+ if (!in) {
+ lperror(LOG_ERR, "IANA PEN registry open failed");
+ return -1;
+ }
+ }
+
+ /*
+ * Read the registry file line by line, fill in the linked list,
+ * and count the entries. No sorting is done, entries will come in
+ * reverse registry order.
+ */
+ while (!feof(in)) {
+ oem_valstr_list_t *item;
+ char *line = NULL;
+ char *endptr = NULL;
+ size_t len = 0;
+ long iana;
+
+ if (!getline(&line, &len, in)) {
+ /* Either an EOF or an empty line. Start over. */
+ continue;
+ }
+
+ /*
+ * Check if the line starts with a digit. If so, take it as IANA PEN.
+ * Any numbers not starting at position 0 are discarded.
+ */
+ iana = strtol(line, &endptr, 10);
+ if (!isdigit(line[0]) || endptr == line) {
+ free_n(&line);
+ continue;
+ }
+ free_n(&line);
+
+ /*
+ * Now as we have the enterprise number, we're expecting the
+ * organization name to immediately follow.
+ */
+ len = 0;
+ if (!getline(&line, &len, in)) {
+ /*
+ * Either an EOF or an empty line. Neither one can happen in
+ * a valid registry entry. Start over.
+ */
+ continue;
+ }
+
+ if (len < IANA_NAME_OFFSET + 1
+ || count_bytes(line, ' ') != IANA_NAME_OFFSET)
+ {
+ /*
+ * This is not a valid line, it doesn't start with
+ * a correct-sized indentation or is too short.
+ * Start over.
+ */
+ free_n(&line);
+ continue;
+ }
+
+ /* Adjust to real line length, don't count the indentation */
+ len = strnlen(line + IANA_NAME_OFFSET, len - IANA_NAME_OFFSET);
+
+ /* Don't count the trailing newline */
+ if (line[IANA_NAME_OFFSET + len - 1] == '\n') {
+ --len;
+ }
+
+ item = malloc(sizeof(oem_valstr_list_t));
+ if (!item) {
+ lperror(LOG_ERR, "IANA PEN registry entry allocation failed");
+ free_n(&line);
+ /* Just stop reading, and process what has already been read */
+ break;
+ }
+
+ /*
+ * Looks like we have a valid entry, store it in the list.
+ */
+ item->valstr.val = iana;
+ item->valstr.str = malloc(len + 1); /* Add 1 for \0 terminator */
+ if (!item->valstr.str) {
+ lperror(LOG_ERR, "IANA PEN registry string allocation failed");
+ free_n(&line);
+ free_n(&item);
+ /* Just stop reading, and process what has already been read */
+ break;
+ }
+
+ /*
+ * Most other valstr arrays are constant and all of them aren't meant
+ * for modification, so the string inside 'struct valstr' is const.
+ * Here we're loading the strings dynamically so we intentionally
+ * cast to a non-const type to be able to modify data here and
+ * keep the compiler silent about it. Restrictions still apply to
+ * other places where these strings are used.
+ */
+ snprintf((void *)item->valstr.str, len + 1,
+ "%s", line + IANA_NAME_OFFSET);
+ free_n(&line);
+ item->next = oemlist;
+ oemlist = item;
+ ++count;
+ }
+ fclose (in);
+
+ *list = oemlist;
+ return count;
+}
+
+/**
+ * Free the allocated list items and, if needed, strings.
+ */
+static
+void
+oem_info_list_free(oem_valstr_list_t **list, bool free_strings)
+{
+ while ((*list)->next) {
+ oem_valstr_list_t *item = *list;
+ *list = item->next;
+ if (free_strings) {
+ free_n(&item->valstr.str);
+ }
+ free_n(&item);
+ }
+}
+
+/**
+ * Initialize the ipmi_oem_info array from a list
+ */
+static
+bool
+oem_info_init_from_list(oem_valstr_list_t *oemlist, size_t count)
+{
+ /* Do not count terminators */
+ size_t head_entries = ARRAY_SIZE(ipmi_oem_info_head) - 1;
+ size_t tail_entries = ARRAY_SIZE(ipmi_oem_info_tail) - 1;
+ static oem_valstr_list_t *item;
+ bool rc = false;
+ int oemlist_debug = LOG_DEBUG + 4; /* Require six -v options */
+
+ /* Include static entries and the terminator */
+ count += head_entries + tail_entries + 1;
+
+ /*
+ * Allocate as much memory as needed to accomodata all the entries
+ * of the loaded linked list, plus the static head and tail, not including
+ * their terminating entries, plus the terminating entry for the new
+ * array.
+ */
+ ipmi_oem_info = malloc(count * sizeof(*ipmi_oem_info));
+
+ if (!ipmi_oem_info) {
+ /*
+ * We can't identify OEMs without an allocated ipmi_oem_info.
+ * Report an error, set the pointer to dummy and clean up.
+ */
+ lperror(LOG_ERR, "IANA PEN registry array allocation failed");
+ ipmi_oem_info = ipmi_oem_info_dummy;
+ goto out;
+ }
+
+ lprintf(oemlist_debug, " Allocating %6zu entries", count);
+
+ /* Add a terminator at the very end */
+ --count;
+ ((struct valstr *)ipmi_oem_info)[count].val = -1;
+ ((struct valstr *)ipmi_oem_info)[count].str = NULL;
+
+ /* Add tail entries from the end */
+ while (count-- < SIZE_MAX && tail_entries--) {
+ ((struct valstr *)ipmi_oem_info)[count] =
+ ipmi_oem_info_tail[tail_entries];
+
+ lprintf(oemlist_debug, " [%6zu] %8d | %s", count,
+ ipmi_oem_info[count].val, ipmi_oem_info[count].str);
+ }
+
+ /* Now add the loaded entries */
+ item = oemlist;
+ while (count < SIZE_MAX && item->next) {
+ ((struct valstr *)ipmi_oem_info)[count] =
+ item->valstr;
+
+ lprintf(oemlist_debug, " [%6zu] %8d | %s", count,
+ ipmi_oem_info[count].val, ipmi_oem_info[count].str);
+
+ item = item->next;
+ --count;
+ }
+
+ /* Now add head entries */
+ while (count < SIZE_MAX && head_entries--) {
+ ((struct valstr *)ipmi_oem_info)[count] =
+ ipmi_oem_info_head[head_entries];
+ lprintf(oemlist_debug, " [%6zu] %8d | %s", count,
+ ipmi_oem_info[count].val, ipmi_oem_info[count].str);
+ --count;
+ }
+
+ rc = true;
+
+out:
+ return rc;
+}
+
+int ipmi_oem_info_init()
+{
+ oem_valstr_list_t terminator = { { -1, NULL}, NULL }; /* Terminator */
+ oem_valstr_list_t *oemlist = &terminator;
+ bool free_strings = true;
+ size_t count;
+ int rc = -4;
+
+ lprintf(LOG_INFO, "Loading IANA PEN Registry...");
+
+ if (ipmi_oem_info) {
+ lprintf(LOG_INFO, "IANA PEN Registry is already loaded");
+ rc = 0;
+ goto out;
+ }
+
+ if (!(count = oem_info_list_load(&oemlist))) {
+ /*
+ * We can't identify OEMs without a loaded registry.
+ * Set the pointer to dummy and return.
+ */
+ ipmi_oem_info = ipmi_oem_info_dummy;
+ goto out;
+ }
+
+ /* In the array was allocated, don't free the strings at cleanup */
+ free_strings = !oem_info_init_from_list(oemlist, count);
+
+ rc = IPMI_CC_OK;
+
+out:
+ oem_info_list_free(&oemlist, free_strings);
+ return rc;
+}
+
+void ipmi_oem_info_free()
+{
+ /* Start with the dynamically allocated entries */
+ size_t i = ARRAY_SIZE(ipmi_oem_info_head) - 1;
+
+ if (ipmi_oem_info == ipmi_oem_info_dummy) {
+ return;
+ }
+
+ /*
+ * Proceed dynamically allocated entries until we hit the first
+ * entry of ipmi_oem_info_tail[], which is statically allocated.
+ */
+ while (ipmi_oem_info
+ && ipmi_oem_info[i].val < UINT32_MAX
+ && ipmi_oem_info[i].str != ipmi_oem_info_tail[0].str)
+ {
+ free_n(&((struct valstr *)ipmi_oem_info)[i].str);
+ ++i;
+ }
+
+ /* Free the array itself */
+ free_n(&ipmi_oem_info);
+}