mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
mc: Fix manufacturer ID masking
A potential future problem has been identified in the manufacturer ID processing code for `mc info` command. Only 16 of 24 bits were used. This is fixed now. Also added support for ID 0x0FFFFF, the 'reserved' value as per IPMI specification. It is now reported as 'Unspecified' unlike other non-listed IDs that are still reported as 'Unknown'. ID 0xFFFFFE is used for debugging purposes in hope that IANA won't reach that number of entities any soon. If it will though, then IANA's assignment will take precedence. Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
This commit is contained in:
parent
6ee52071dd
commit
329ebdff84
@ -260,6 +260,8 @@ struct ipmi_rs {
|
|||||||
|
|
||||||
typedef enum IPMI_OEM {
|
typedef enum IPMI_OEM {
|
||||||
IPMI_OEM_UNKNOWN = 0,
|
IPMI_OEM_UNKNOWN = 0,
|
||||||
|
IPMI_OEM_DEBUG = 0xFFFFFE, /* Hoping IANA won't hit this soon */
|
||||||
|
IPMI_OEM_RESERVED = 0x0FFFFF, /* As per IPMI 2.0 specification */
|
||||||
/* 2 for [IBM] */
|
/* 2 for [IBM] */
|
||||||
IPMI_OEM_IBM_2 = 2,
|
IPMI_OEM_IBM_2 = 2,
|
||||||
IPMI_OEM_HP = 11,
|
IPMI_OEM_HP = 11,
|
||||||
|
@ -92,8 +92,8 @@ struct ipm_devid_rsp {
|
|||||||
#define IPM_DEV_IPMI_VERSION_MINOR(x) \
|
#define IPM_DEV_IPMI_VERSION_MINOR(x) \
|
||||||
((x & IPM_DEV_IPMI_VER_MINOR_MASK) >> IPM_DEV_IPMI_VER_MINOR_SHIFT)
|
((x & IPM_DEV_IPMI_VER_MINOR_MASK) >> IPM_DEV_IPMI_VER_MINOR_SHIFT)
|
||||||
|
|
||||||
#define IPM_DEV_MANUFACTURER_ID_MASK 0x0FFFFF
|
#define IPM_DEV_MANUFACTURER_ID_RESERVED 0x0FFFFF
|
||||||
#define IPM_DEV_MANUFACTURER_ID(x) (ipmi24toh(x) & IPM_DEV_MANUFACTURER_ID_MASK)
|
#define IPM_DEV_MANUFACTURER_ID(x) ipmi24toh(x)
|
||||||
|
|
||||||
#define IPM_DEV_ADTL_SUPPORT_BITS (8)
|
#define IPM_DEV_ADTL_SUPPORT_BITS (8)
|
||||||
|
|
||||||
|
@ -38,17 +38,27 @@
|
|||||||
|
|
||||||
const struct valstr ipmi_oem_info[] = {
|
const struct valstr ipmi_oem_info[] = {
|
||||||
|
|
||||||
{ IPMI_OEM_UNKNOWN, "Unknown" },
|
/* These are at the top so they are found first */
|
||||||
|
{ IPMI_OEM_UNKNOWN, "Unknown" },
|
||||||
|
{ IPMI_OEM_RESERVED, "Unspecified" },
|
||||||
|
|
||||||
/* The included file is auto-generated from offical IANA PEN list */
|
/* The included file is auto-generated from offical IANA PEN list */
|
||||||
#include "ipmi_pen_list.inc.c"
|
#include "ipmi_pen_list.inc.c"
|
||||||
|
|
||||||
{ 0xffff , NULL },
|
/*
|
||||||
|
* This debug ID is at the bottom so that if IANA assigns it to
|
||||||
|
* any entity, that IANA's value is found first and reported.
|
||||||
|
*/
|
||||||
|
{ IPMI_OEM_DEBUG, "A Debug Assisting Company, Ltd." },
|
||||||
|
{ -1 , NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct oemvalstr ipmi_oem_product_info[] = {
|
const struct oemvalstr ipmi_oem_product_info[] = {
|
||||||
/* Keep OEM grouped together */
|
/* Keep OEM grouped together */
|
||||||
|
|
||||||
|
/* For ipmitool debugging */
|
||||||
|
{ IPMI_OEM_DEBUG, 0x1234, "Great Debuggable BMC" },
|
||||||
|
|
||||||
/* Intel stuff, thanks to Tim Bell */
|
/* Intel stuff, thanks to Tim Bell */
|
||||||
{ IPMI_OEM_INTEL, 0x000C, "TSRLT2" },
|
{ IPMI_OEM_INTEL, 0x000C, "TSRLT2" },
|
||||||
{ IPMI_OEM_INTEL, 0x001B, "TIGPR2U" },
|
{ IPMI_OEM_INTEL, 0x001B, "TIGPR2U" },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user