diff options
author | Jerry Hoemann <jerry.hoemann@hpe.com> | 2022-09-15 15:33:38 +0200 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2022-09-15 15:34:21 +0200 |
commit | ac24b672dee81cdbfb35b69b38459a1352dcbe8a (patch) | |
tree | 15381f6ee51fbf13b492bcc5e7bbaf5cf5551a4f | |
parent | c3357b532941a8df387618e692e522cc7a43b3e8 (diff) | |
download | dmidecode-git-ac24b672dee81cdbfb35b69b38459a1352dcbe8a.tar.gz |
dmioem: Decode HPE OEM Record 230
Decode HPE OEM Record 230: Power Supply Information
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
-rw-r--r-- | dmioem.c | 53 |
1 files changed, 53 insertions, 0 deletions
@@ -390,6 +390,31 @@ static void dmi_hp_224_chipid(u16 code) pr_attr("Chip Identifier", "%s", str); } +static void dmi_hp_230_method_bus_seg_addr(u8 code, u8 bus_seg, u8 addr) +{ + const char *str = "Reserved"; + static const char * const method[] = { + "Not Available", /* 0x00 */ + "IPMI I2C", + "iLO", + "Chassis Manager", /* 0x03 */ + }; + if (code < ARRAY_SIZE(method)) + str = method[code]; + pr_attr("Access Method", "%s", str); + if (code == 0 || code >= ARRAY_SIZE(method)) + return; + if (bus_seg != 0xFF) + { + if (code == 2) + pr_attr("I2C Segment Number", "%d", bus_seg); + else + pr_attr("I2C Bus Number", "%d", bus_seg); + } + if (addr != 0xFF) + pr_attr("I2C Address", "0x%02x", addr >> 1); +} + static void dmi_hp_238_loc(const char *fname, unsigned int code) { const char *str = "Reserved"; @@ -720,6 +745,34 @@ static int dmi_decode_hp(const struct dmi_header *h) dmi_hp_224_chipid(WORD(data + 0x0a)); break; + case 230: + /* + * Vendor Specific: Power Supply Information OEM SMBIOS Record + * + * This record is used to communicate additional Power Supply Information + * beyond the Industry Standard System Power Supply (Type 39) Record. + * + * Offset| Name | Width | Description + * ----------------------------------------- + * 0x00 | Type | BYTE | 0xE6, Power Supply Information Indicator + * 0x01 | Length | BYTE | Length of structure + * 0x02 | Handle | WORD | Unique handle + * 0x04 | Assoc Handle| WORD | Associated Handle (Type 39) + * 0x06 | Manufacturer| STRING| Actual third party manufacturer + * 0x07 | Revision | STRING| Power Supply Revision Level + * 0x08 | FRU Access | BYTE | Power Supply FRU Access Method + * 0x09 | I2C Bus Num | BYTE | I2C Bus #. Value based upon context + * 0x0A | I2C Address | BYTE | I2C Address + */ + pr_handle_name("%s Power Supply Information", company); + if (h->length < 0x0B) break; + if (!(opt.flags & FLAG_QUIET)) + pr_attr("Associated Handle", "0x%04X", WORD(data + 0x4)); + pr_attr("Manufacturer", "%s", dmi_string(h, data[0x06])); + pr_attr("Revision", "%s", dmi_string(h, data[0x07])); + dmi_hp_230_method_bus_seg_addr(data[0x08], data[0x09], data[0x0A]); + break; + case 233: /* * Vendor Specific: HPE ProLiant NIC MAC Information |