|
43 | 43 | * - DMTF Master MIF version 020507
|
44 | 44 | * "DMTF approved standard groups"
|
45 | 45 | * http://www.dmtf.org/standards/standard_dmi.php
|
| 46 | + * - IPMI 1.5 revision 1.1 |
| 47 | + * "Intelligent Platform Management Interface Specification" |
| 48 | + * http://developer.intel.com/design/servers/ipmi/spec.htm |
46 | 49 | */
|
47 | 50 |
|
48 | 51 | #include <sys/types.h>
|
@@ -2765,7 +2768,21 @@ static const char *dmi_ipmi_interface_type(u8 code)
|
2765 | 2768 | };
|
2766 | 2769 |
|
2767 | 2770 | if(code<=0x03)
|
2768 |
| - return type[code-0x01]; |
| 2771 | + return type[code]; |
| 2772 | + return out_of_spec; |
| 2773 | +} |
| 2774 | + |
| 2775 | +static const char *dmi_ipmi_register_spacing(u8 code) |
| 2776 | +{ |
| 2777 | + /* IPMI 1.5 */ |
| 2778 | + static const char *spacing[]={ |
| 2779 | + "Successive Byte Boundaries", /* 0x00 */ |
| 2780 | + "32-bit Boundaries", |
| 2781 | + "16 bit Boundaries" /* 0x02 */ |
| 2782 | + }; |
| 2783 | + |
| 2784 | + if(code<=0x02) |
| 2785 | + return spacing[code]; |
2769 | 2786 | return out_of_spec;
|
2770 | 2787 | }
|
2771 | 2788 |
|
@@ -3651,20 +3668,39 @@ static void dmi_decode(u8 *data, u16 ver)
|
3651 | 3668 | dmi_memory_channel_devices(data[0x06], data+0x07, "\t\t\t");
|
3652 | 3669 | break;
|
3653 | 3670 |
|
| 3671 | + /* |
| 3672 | + * We use the word "Version" instead of "Revision", conforming to |
| 3673 | + * IPMI 1.5 specification. This specification isn't very clear |
| 3674 | + * regarding the I2C slave address. I couldn't understand wether |
| 3675 | + * or not we are supposed to shift it by one bit to the right, so |
| 3676 | + * I leave it untouched. Beware it might be wrong. |
| 3677 | + */ |
3654 | 3678 | case 38: /* 3.3.39 IPMI Device Information */
|
3655 | 3679 | printf("\tIPMI Device Information\n");
|
3656 | 3680 | if(h->length<0x10) break;
|
3657 | 3681 | printf("\t\tInterface Type: %s\n",
|
3658 | 3682 | dmi_ipmi_interface_type(data[0x04]));
|
3659 |
| - printf("\t\tSpecification Revision: %u.%u\n", |
| 3683 | + printf("\t\tSpecification Version: %u.%u\n", |
3660 | 3684 | data[0x05]>>4, data[0x05]&0x0F);
|
3661 |
| - printf("\t\tI2C Slave Address: %u\n", |
| 3685 | + printf("\t\tI2C Slave Address: 0x%02x\n", |
3662 | 3686 | data[0x06]);
|
3663 |
| - if(data[0x07]==0xFF) |
| 3687 | + if(data[0x07]!=0xFF) |
3664 | 3688 | printf("\t\tNV Storage Device Address: %u\n",
|
3665 | 3689 | data[0x07]);
|
3666 |
| - printf("\t\tBase Address: 0x%08X (%s)\n", |
3667 |
| - DWORD(data+0x08), DWORD(data+0x08)&1?"I/O":"memory-mapped"); |
| 3690 | + else |
| 3691 | + printf("\t\tNV Storage Device: Not Present\n"); |
| 3692 | + if(h->length<0x12) |
| 3693 | + { |
| 3694 | + printf("\t\tBase Address: 0x%08X%08X (%s)\n", |
| 3695 | + QWORD(data+0x08).h, QWORD(data+0x08).l, |
| 3696 | + QWORD(data+0x08).l&1?"I/O":"Memory-mapped"); |
| 3697 | + break; |
| 3698 | + } |
| 3699 | + printf("\t\tBase Address: 0x%08X%08X (%s)\n", |
| 3700 | + QWORD(data+0x08).h, (QWORD(data+0x08).l&~1)|((data[0x10]>>5)&1), |
| 3701 | + QWORD(data+0x08).l&1?"I/O":"Memory-mapped"); |
| 3702 | + printf("\t\tRegister Spacing: %s\n", |
| 3703 | + dmi_ipmi_register_spacing(data[0x10]>>6)); |
3668 | 3704 | break;
|
3669 | 3705 |
|
3670 | 3706 | case 39: /* 3.3.40 System Power Supply */
|
|
0 commit comments