KCS
KCS全称是Keyboard Controller Style,关于这个名称不用过多的追究,只需要知道它是系统(BIOS和OS)和BMC通信的一种基本方式即可。本文将介绍BIOS下的KCS接口,包括接口使用方式和数据。内容参考自《ipmi-second-gen-interface-spec-v2-rev1-1.pdf》和https://github.com/microsoft/mu_feature_ipmi.git代码。
KCS数据
BIOS和BMC的交互通过Request和Response的方式,所以对应的数据也有两种,首先是Request:
参数说明如下:
- NetFn/Cmd:IPMI命令有不同的分组,通过NetFn/Cmd命令字的方式来索引,在IPMI命令介绍会进一步说明。
- LUN:Logical Unit Number,占据8个比特中的最低两个,对于通过KCS向BMC发送的数据,LUN的值都是00b。
- Data:IPMI命令的实际请求数据。
然后是Response:
其它参数跟Request类似,只是多了一个Complete Code,说明如下:
- Completion Code:IPMI命令的返回状态,具体的取值如下:
//
// Generic Completion Codes definitions
//
#define IPMI_COMP_CODE_NORMAL 0x00
#define IPMI_COMP_CODE_NODE_BUSY 0xC0
#define IPMI_COMP_CODE_INVALID_COMMAND 0xC1
#define IPMI_COMP_CODE_INVALID_FOR_GIVEN_LUN 0xC2
#define IPMI_COMP_CODE_TIMEOUT 0xC3
#define IPMI_COMP_CODE_OUT_OF_SPACE 0xC4
#define IPMI_COMP_CODE_RESERVATION_CANCELED_OR_INVALID 0xC5
#define IPMI_COMP_CODE_REQUEST_DATA_TRUNCATED 0xC6
#define IPMI_COMP_CODE_INVALID_REQUEST_DATA_LENGTH 0xC7
#define IPMI_COMP_CODE_REQUEST_EXCEED_LIMIT 0xC8
#define IPMI_COMP_CODE_OUT_OF_RANGE 0xC9
#define IPMI_COMP_CODE_CANNOT_RETURN 0xCA
#define IPMI_COMP_CODE_NOT_PRESENT 0xCB
#define IPMI_COMP_CODE_INVALID_DATA_FIELD 0xCC
#define IPMI_COMP_CODE_COMMAND_ILLEGAL 0xCD
#define IPMI_COMP_CODE_CMD_RESP_NOT_PROVIDED 0xCE
#define IPMI_COMP_CODE_FAIL_DUP_REQUEST 0xCF
#define IPMI_COMP_CODE_SDR_REP_IN_UPDATE_MODE 0xD0
#define IPMI_COMP_CODE_DEV_IN_FW_UPDATE_MODE 0xD1
#define IPMI_COMP_CODE_BMC_INIT_IN_PROGRESS 0xD2
#define IPMI_COMP_CODE_DEST_UNAVAILABLE 0xD3
#define IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE 0xD4
#define IPMI_COMP_CODE_UNSUPPORTED_IN_PRESENT_STATE 0xD5
#define IPMI_COMP_CODE_SUBFUNCTION_DISABLED 0xD6
#define IPMI_COMP_CODE_UNSPECIFIED 0xFF
- Data:IPMI命令的实际响应数据。
需要注意,无论是Request还是Response,其数据部分都可以是空的。
另外,还有一种稍微特殊一点的KSC数据,用来上报事件信息:
其实就是一种IPMI命令数据而已。
KSC通信
KSC接口定义了一组IO寄存器,通过它们就可以完成与BMC的交互,这组寄存器的基地址基本上已经固定:
gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiIoBaseAddress|0xCA2|UINT16|0xF000000A
为了使用该地址,首先需要打开它的映射,代码如下所示:
/**
Initializing hardware for the IPMI transport.
@retval EFI_SUCCESS Hardware was successfully initialized.
@retval Other An error was returned from PlatformIpmiIoRangeSet.
**/
EFI_STATUS
InitializeIpmiTransportHardware (
VOID
)
{
EFI_STATUS Status;
//
// Enable OEM specific southbridge SIO KCS I/O address range 0xCA0 to 0xCAF at here
// if the the I/O address range has not been enabled.
//
Status = PlatformIpmiIoRangeSet (PcdGet16 (PcdIpmiIoBaseAddress));
DEBUG ((DEBUG_INFO, "IPMI: PlatformIpmiIoRangeSet - %r!\n", Status));
return Status;
}
对于PlatformIpmiIoRangeSet()
函数的实现,可以暂时不过,因为依赖于不同的硬件平台,对于x86平台,通常是LPC设备一些操作。
当完成PcdIpmiIoBaseAddress
基地址之后,就可以进行IO操作了,对应的寄存器如下:
可以看到就4个寄存器(如果考虑共用的部分,其实就2个寄存器):
- Status:只读寄存器,包含了操作过程中的Flag。
- Command:只写寄存器,用于写入各类操作,这些操作称为“Write Control Codes”。
- Data_Out:只读寄存器,用来读取数据。
- Data_In:只写寄存器,用来写入数据或者“Read Control Codes”。
这里的“Control Codes”如下:
前面的4个是“Write Control Codes”,只能写入Status寄存器;最后一个是“Read Control Codes”,写入Data寄存器,前面提到的KSC数据也是写入到Data寄存器的。
Status寄存器的比特说明如下:
其中的S0和S1根据组合得到如下的值:
得到四种状态。
Status寄存器的代码表示:
typedef union {
UINT8 RawData;
struct {
UINT8 Obf : 1;
UINT8 Ibf : 1;
UINT8 SmAtn : 1;
UINT8 CD : 1;
UINT8 Oem1 : 1;
UINT8 Oem2 : 1;
UINT8 State : 2;
} Status;
} KCS_STATUS;
根据上述的寄存器操作,得到BIOS向BMC写数据的流程:
对应的代码实现可以在IpmiFeaturePkg\GenericIpmi\Common\GenericIpmi.c找到,下面是代码的大致说明:
- 等待IBF=0:
do {
MicroSecondDelay (IPMI_DELAY_UNIT);
KcsStatus.RawData = IoRead8 (KcsIoBase + 1);
if ((KcsStatus.RawData == 0xFF) || (TimeOut >= IpmiTimeoutPeriod)) {
if ((Status = KcsErrorExit (IpmiTimeoutPeriod)) != EFI_SUCCESS) {
return Status;
}
}
TimeOut++;
} while (KcsStatus.Status.Ibf);
- 写入
KCS_WRITE_START
,并等待IBF=0:
KcsData = KCS_WRITE_START;
IoWrite8 ((KcsIoBase + 1), KcsData);
if ((Status = KcsCheckStatus (IpmiTimeoutPeriod, KcsWriteState, &Idle)) != EFI_SUCCESS) {
return Status;
}
- 开始写入数据,等待数据写入完成之后,最后写入
KCS_WRITE_END
:
for (i = 0; i < DataSize; i++) {
if (i == (DataSize - 1)) {
if ((Status = KcsCheckStatus (IpmiTimeoutPeriod, KcsWriteState, &Idle)) != EFI_SUCCESS) {
return Status;
}
KcsData = KCS_WRITE_END;
IoWrite8 ((KcsIoBase + 1), KcsData);
}
Status = KcsCheckStatus (IpmiTimeoutPeriod, KcsWriteState, &Idle);
if (EFI_ERROR (Status)) {
return Status;
}
IoWrite8 (KcsIoBase, Data[i]);
}
- 开始接收数据:
while (TRUE) {
if ((Status = KcsCheckStatus (IpmiTimeoutPeriod, KcsReadState, &Idle)) != EFI_SUCCESS) {
return Status;
}
if (Idle) {
*DataSize = Count;
break;
}
//
// Need to check Data Size -1 to account for array access
//
if (Count >= *DataSize) {
return EFI_DEVICE_ERROR;
}
Data[Count] = IoRead8 (KcsIoBase);
Count++;
KcsData = KCS_READ;
IoWrite8 (KcsIoBase, KcsData);
}
- 结束数据接收,并将数据返回。
以上只是简单的介绍,还有一些诸如KcsCheckStatus()
的函数没有说明,具体可以直接看代码。
IPMI命令介绍
IPMI命令会通过NetFn/Cmd的方式写入到KSC接口中,以完成不同的操作,这里将列出IPMI规范定义的所以基础操作。在EDK代码中有几个头文件已经定义了部分IPMI命令,具体对应的头文件是:
#include <IndustryStandard/IpmiNetFnChassis.h>
#include <IndustryStandard/IpmiNetFnBridge.h>
#include <IndustryStandard/IpmiNetFnSensorEvent.h>
#include <IndustryStandard/IpmiNetFnApp.h>
#include <IndustryStandard/IpmiNetFnFirmware.h>
#include <IndustryStandard/IpmiNetFnStorage.h>
#include <IndustryStandard/IpmiNetFnTransport.h>
#include <IndustryStandard/IpmiNetFnGroupExtension.h>
#include <IndustryStandard/IpmiFruInformationStorage.h>
需要注意:
-
NetFn都是偶数的。
-
最后一列的O/M表示的是BMC是否需要实现该命令。
-
BIOS下的头文件中并没有包含所有IPMI规范中定义的命令,所以下面的表中不少命令没有对应的宏。
-
除了在IPMI规范中定义的命令,还可以有自定义的命令,这当然是有好处的,因为扩展了BIOS和BMC通信的内容,但是也存在不同的BIOS和BMC厂商对同一个命令字有不同的实现,导致了维护的困难。
NetFn 0x00 - IPMI_NETFN_CHASSIS
对应头文件edk2\MdePkg\Include\IndustryStandard\IpmiNetFnChassis.h:
Cmd | 说明 | O/M |
---|---|---|
0x00 - IPMI_CHASSIS_GET_CAPABILITIES | Get Chassis Capabilities | 必需 |
0x01 - IPMI_CHASSIS_GET_STATUS | Get Chassis Status | 必需 |
0x02 - IPMI_CHASSIS_CONTROL | Chassis Control | 必需 |
0x03 - IPMI_CHASSIS_RESET | Chassis Reset | 可选 |
0x04 - IPMI_CHASSIS_IDENTIFY | Chassis Identify | 可选 |
0x05 - IPMI_CHASSIS_SET_CAPABILITIES | Set Chassis Capabilities | 可选 |
0x06 - IPMI_CHASSIS_SET_POWER_RESTORE_POLICY | Set Power Restore Policy | 可选 |
0x07 - IPMI_CHASSIS_GET_SYSTEM_RESTART_CAUSE | Get System Restart Cause | 可选 |
0x08 - IPMI_CHASSIS_SET_SYSTEM_BOOT_OPTIONS | Set System Boot Options | 可选 |
0x09 - IPMI_CHASSIS_GET_SYSTEM_BOOT_OPTIONS | Get System Boot Options | 可选 |
0x0A - IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES | Set Front Panel Enables | 可选 |
0x0B - IPMI_CHASSIS_SET_POWER_CYCLE_INTERVALS | Set Power Cycle Interval | 可选 |
0x0F - IPMI_CHASSIS_GET_POH_COUNTER | Get POH Counter | 可选 |
NetFn 0x02 - IPMI_NETFN_BRIDGE
对应头文件edk2\MdePkg\Include\IndustryStandard\IpmiNetFnBridge.h:
Cmd |
---|
0x00 - IPMI_BRIDGE_GET_STATE |
0x01 - IPMI_BRIDGE_SET_STATE |
0x02 - IPMI_BRIDGE_GET_ICMB_ADDRESS |
0x03 - IPMI_BRIDGE_SET_ICMB_ADDRESS |
0x04 - IPMI_BRIDGE_SET_PROXY_ADDRESS |
0x05 - IPMI_BRIDGE_GET_BRIDGE_STATISTICS |
0x06 - IPMI_BRIDGE_GET_ICMB_CAPABILITIES |
0x08 - IPMI_BRIDGE_CLEAR_STATISTICS |
0x09 - IPMI_BRIDGE_GET_PROXY_ADDRESS |
0x0A - IPMI_BRIDGE_GET_ICMB_CONNECTOR_INFO |
0x0B - IPMI_BRIDGE_GET_ICMB_CONNECTION_ID |
0x0C - IPMI_BRIDGE_SEND_ICMB_CONNECTION_ID |
0x10 - IPMI_BRIDGE_PREPARE_FOR_DISCOVERY |
0x11 - IPMI_BRIDGE_GET_ADDRESSES |
0x12 - IPMI_BRIDGE_SET_DISCOVERED |
0x13 - IPMI_BRIDGE_GET_CHASSIS_DEVICEID |
0x14 - IPMI_BRIDGE_SET_CHASSIS_DEVICEID |
0x20 - IPMI_BRIDGE_REQUEST |
0x21 - IPMI_BRIDGE_MESSAGE |
0x30 - IPMI_BRIDGE_GET_EVENT_COUNT |
0x31 - IPMI_BRIDGE_SET_EVENT_DESTINATION |
0x32 - IPMI_BRIDGE_SET_EVENT_RECEPTION_STATE |
0x33 - IPMI_BRIDGE_SEND_ICMB_EVENT_MESSAGE |
但是它们并没有在IPMI规范中,而是在ICMB规范中。
NetFn 0x04 - IPMI_NETFN_SENSOR_EVENT
对应头文件edk2\MdePkg\Include\IndustryStandard\IpmiNetFnSensorEvent.h,但是其中只有一个,其它存在空白的是没有在代码中出现的:
Cmd | 说明 | O/M |
---|---|---|
0x00 | Set Event Receiver | 必需 |
0x01 | Get Event Receiver | 必需 |
0x02 - IPMI_SENSOR_PLATFORM_EVENT_MESSAGE | Platform Event (aka Event Message) | 必需 |
0x10 | Get PEF Capabilities | 必需 |
0x11 | Arm PEF Postpone Timer | 必需 |
0x12 | Set PEF Configuration Parameters | 必需 |
0x13 | Get PEF Configuration Parameters | 必需 |
0x14 | Set Last Processed Event ID | 必需 |
0x15 | Get Last Processed Event ID | 必需 |
0x16 | Alert Immediate | 可选 |
0x17 | PET Acknowledge | 可选 |
0x20 | Get Device SDR Info | 可选 |
0x21 | Get Deivce SDR | 可选 |
0x22 | Reserve Device SDR Repository | 可选 |
0x23 | Get Sensor Reading Factors | 可选 |
0x24 | Set Sensor Hysteresis | 可选 |
0x25 | Get Sensor Hysteresis | 可选 |
0x26 | Set Sensor Threshold | 可选 |
0x27 | Get Sensor Threshold | 可选 |
0x28 | Set Sensor Event Enable | 可选 |
0x29 | Get Sensor Event Enable | 可选 |
0x2A | Re-arm Sensor Events | 可选 |
0x2B | Get Sensor Event Status | 可选 |
0x2D | Get Sensor Reading | 必需 |
0x2E | Set Sensor Type | 可选 |
0x2F | Get Sensor Type | 可选 |
0x30 | Set Sensor Reading And Event Status | 可选 |
NetFn 0x06 - IPMI_NETFN_APP
对应头文件edk2\MdePkg\Include\IndustryStandard\IpmiNetFnApp.h,部分存在空白的是没有在代码中出现的:
Cmd | 说明 | O/M |
---|---|---|
0x01 - IPMI_APP_GET_DEVICE_ID | Get Device ID | 必需 |
0x02 - IPMI_APP_COLD_RESET | Cold Rest | 可选 |
0x03 - IPMI_APP_WARM_RESET | Warm Rest | 可选 |
0x04 - IPMI_APP_GET_SELFTEST_RESULTS | Get Selft Test Results | 必需 |
0x05 - IPMI_APP_MANUFACTURING_TEST_ON | Manufacturing Test On | 可选 |
0x06 - IPMI_APP_SET_ACPI_POWERSTATE | Set ACPI Power State | 可选 |
0x07 - IPMI_APP_GET_ACPI_POWERSTATE | Get ACPI Power State | 可选 |
0x08 - IPMI_APP_GET_DEVICE_GUID | Get Device GUID | 可选 |
0x09 | Get NetFun Support | 可选 |
0x0A | Get Command Support | 可选 |
0x0B | Get Command Sub-function Support | 可选 |
0x0C | Get Configurable Commands | 可选 |
0x0D | Get Configurable Command Sub-functions | 可选 |
0x22 - IPMI_APP_RESET_WATCHDOG_TIMER | Reset Watchdog Timer | 必需 |
0x24 - IPMI_APP_SET_WATCHDOG_TIMER | Set Watchdog Timer | 必需 |
0x25 - IPMI_APP_GET_WATCHDOG_TIMER | Get Watchdog Timer | 必需 |
0x2E - IPMI_APP_SET_BMC_GLOBAL_ENABLES | Set BMC Global Enables | 必需 |
0x2F - IPMI_APP_GET_BMC_GLOBAL_ENABLES | Get BMC Global Enables | 必需 |
0x30 - IPMI_APP_CLEAR_MESSAGE_FLAGS | Clear Message Flags | 必需 |
0x31 - IPMI_APP_GET_MESSAGE_FLAGS | Get Message Flags | 必需 |
0x32 - IPMI_APP_ENABLE_MESSAGE_CHANNEL_RECEIVE | Enable Message Channel Receive | 可选 |
0x33 - IPMI_APP_GET_MESSAGE | Get Message | 必需 |
0x34 - IPMI_APP_SEND_MESSAGE | Send Message | 必需 |
0x35 - IPMI_APP_READ_EVENT_MSG_BUFFER | Read Event Message Buffer | 可选 |
0x36 - IPMI_APP_GET_BT_INTERFACE_CAPABILITY | Get BT Interface Capabilities | 必需 |
0x37 - IPMI_APP_GET_SYSTEM_GUID | Get System GUID | 可选 |
0x38 - IPMI_APP_GET_CHANNEL_AUTHENTICATION_CAPABILITIES | Get Channel Authentication Capabilities | 可选 |
0x39 - IPMI_APP_GET_SESSION_CHALLENGE | Get Session Challenge | 可选 |
0x3A - IPMI_APP_ACTIVATE_SESSION | Activate Session | 可选 |
0x3B - IPMI_APP_SET_SESSION_PRIVELEGE_LEVEL | Set Session Privilege Level | 可选 |
0x3C - IPMI_APP_CLOSE_SESSION | Close Session | 可选 |
0x3D - IPMI_APP_GET_SESSION_INFO | Get Session Info | 可选 |
0x3F - IPMI_APP_GET_AUTHCODE | Get AuthCode | 可选 |
0x40 - IPMI_APP_SET_CHANNEL_ACCESS | Set Channel Access | 可选 |
0x41 - IPMI_APP_GET_CHANNEL_ACCESS | Get Channel Access | 可选 |
0x42 - IPMI_APP_GET_CHANNEL_INFO | Get Channel Info | 可选 |
0x43 - IPMI_APP_SET_USER_ACCESS | Set User Access | 可选 |
0x44 - IPMI_APP_GET_USER_ACCESS | Get User Access | 可选 |
0x45 - IPMI_APP_SET_USER_NAME | Set User Name | 可选 |
0x46 - IPMI_APP_GET_USER_NAME | Get User Name | 可选 |
0x47 - IPMI_APP_SET_USER_PASSWORD | Set User Password | 可选 |
0x48 - IPMI_APP_ACTIVATE_PAYLOAD | Activate Payload | 可选 |
0x49 - IPMI_APP_DEACTIVATE_PAYLOAD | Deactivate Payload | 可选 |
0x4A - IPMI_APP_GET_PAYLOAD_ACTIVATION_STATUS | Get Payload Activation Status | 可选 |
0x4B - IPMI_APP_GET_PAYLOAD_INSTANCE_INFO | Get Payload Instance Info | 可选 |
0x4C - IPMI_APP_SET_USER_PAYLOAD_ACCESS | Set User Payload Access Command | 可选 |
0x4D - IPMI_APP_GET_USER_PAYLOAD_ACCESS | Get User Payload Access Command | 可选 |
0x4E - IPMI_APP_GET_CHANNEL_PAYLOAD_SUPPORT | Get Channel Payload Support Command | 可选 |
0x4F - IPMI_APP_GET_CHANNEL_PAYLOAD_VERSION | Get Channel Payload Version Command | 可选 |
0x50 - IPMI_APP_GET_CHANNEL_OEM_PAYLOAD_INFO | Get Channel OEM Payload Info Command | 可选 |
0x52 - IPMI_APP_MASTER_WRITE_READ | Master Write-Read | 必需 |
0x54 - IPMI_APP_GET_CHANNEL_CIPHER_SUITES | Get Channel Cipher Suites | 可选 |
0x55 - IPMI_APP_SUSPEND_RESUME_PAYLOAD_ENCRYPTION | Suspend/Resume Payload Encryption Command | 可选 |
0x56 - IPMI_APP_SET_CHANNEL_SECURITY_KEYS | Set Channel Security Keys | 可选 |
0x57 - IPMI_APP_GET_SYSTEM_INTERFACE_CAPABILITIES | Get System Interface Capabilities | 可选 |
0x58 | Set System Info Parameters | 可选 |
0x59 | Get System Info Parameters | 可选 |
0x60 | Set Command Enables | 可选 |
0x61 | Get Command Enables | 可选 |
0x62 | Set Command Sub-function Enables | 可选 |
0x63 | Get Command Sub-function Enables | 可选 |
0x64 | Get OEM NetFn IANA Support | 可选 |
IPMI_APP_GET_DEVICE_ID还有一个广播版本Broadcast “Get Deivce ID”,它的Cmd也是0x01。
NetFn 0x08 - IPMI_NETFN_FIRMWARE
对应头文件edk2\MdePkg\Include\IndustryStandard\IpmiNetFnFirmware.h,但是以下的命令并没有在IPMI规范中找到:
Cmd |
---|
0x23 - IPMI_GET_BMC_EXECUTION_CONTEXT |
NetFn 0x0A - IPMI_NETFN_STORAGE
对应头文件edk2\MdePkg\Include\IndustryStandard\IpmiNetFnStorage.h:
Cmd | 说明 | O/M |
---|---|---|
0x10 - IPMI_STORAGE_GET_FRU_INVENTORY_AREAINFO | Get FRU Inventory Area Info | 必需 |
0x11 - IPMI_STORAGE_READ_FRU_DATA | Read FRU Data | 必需 |
0x12 - IPMI_STORAGE_WRITE_FRU_DATA | Write FRU Data | 必需 |
0x20 - IPMI_STORAGE_GET_SDR_REPOSITORY_INFO | Get SDR Repository Info | 必需 |
0x21 - IPMI_STORAGE_GET_SDR_REPOSITORY_ALLOCATION_INFO | Get SDR Pepository Allocation Info | 可选 |
0x22 - IPMI_STORAGE_RESERVE_SDR_REPOSITORY | Reserve SDR Repository | 必需 |
0x23 - IPMI_STORAGE_GET_SDR | Get SDR | 必需 |
0x24 - IPMI_STORAGE_ADD_SDR | Add SDR | 必需 |
0x25 - IPMI_STORAGE_PARTIAL_ADD_SDR | Partial Add SDR | 必需 |
0x26 - IPMI_STORAGE_DELETE_SDR | Delete SDR | 可选 |
0x27 - IPMI_STORAGE_CLEAR_SDR | Clear SDR Repository | 必需 |
0x28 - IPMI_STORAGE_GET_SDR_REPOSITORY_TIME | Get SDR Repository Time | 可选 |
0x29 - IPMI_STORAGE_SET_SDR_REPOSITORY_TIME | Set SDR Repository Time | 可选 |
0x2A - IPMI_STORAGE_ENTER_SDR_UPDATE_MODE | Enter SDR Pepository Update Mode | 可选 |
0x2B - IPMI_STORAGE_EXIT_SDR_UPDATE_MODE | Exit SDR Repository Update Mode | 可选 |
0x2C - IPMI_STORAGE_RUN_INIT_AGENT | Run Initialization Agent | 可选 |
0x40 - IPMI_STORAGE_GET_SEL_INFO | Get SEL Info | 必需 |
0x41 - IPMI_STORAGE_GET_SEL_ALLOCATION_INFO | Get SEL Allocation Info | 可选 |
0x42 - IPMI_STORAGE_RESERVE_SEL | Reserve SEL | 可选 |
0x43 - IPMI_STORAGE_GET_SEL_ENTRY | Get SEL Entry | 必需 |
0x44 - IPMI_STORAGE_ADD_SEL_ENTRY | Add SEL Entry | 必需 |
0x45 - IPMI_STORAGE_PARTIAL_ADD_SEL_ENTRY | Partial Add SEL Entry | 必需 |
0x46 - IPMI_STORAGE_DELETE_SEL_ENTRY | Delete SEL Entry | 可选 |
0x47 - IPMI_STORAGE_CLEAR_SEL | Clear SEL | 必需 |
0x48 - IPMI_STORAGE_GET_SEL_TIME | Get SEL Time | 必需 |
0x49 - IPMI_STORAGE_SET_SEL_TIME | Set SEL Time | 必需 |
0x5A - IPMI_STORAGE_GET_AUXILLARY_LOG_STATUS | Get Auxiliary Log Status | 可选 |
0x5B - IPMI_STORAGE_SET_AUXILLARY_LOG_STATUS | Set Auxiliary Log Status | 可选 |
0x5C - IPMI_STORAGE_GET_SEL_TIME_UTC_OFFSET | Get SEL Timer UTC Offset | 可选 |
0x5D - IPMI_STORAGE_SET_SEL_TIME_UTC_OFFSET | Set SEL Timer UTC Offset | 可选 |
NetFn 0x0C - IPMI_NETFN_TRANSPORT
对应头文件edk2\MdePkg\Include\IndustryStandard\IpmiNetFnTransport.h,部分存在空白的是没有在代码中出现的:
Cmd | 说明 | O/M |
---|---|---|
0x01 - IPMI_TRANSPORT_SET_LAN_CONFIG_PARAMETERS | Set LAN Configuration Parameters | 必需 |
0x02 - IPMI_TRANSPORT_GET_LAN_CONFIG_PARAMETERS | Get LAN Configuration Parameters | 必需 |
0x03 - IPMI_TRANSPORT_SUSPEND_BMC_ARPS | Suspend BMC ARPs | 可选 |
0x04 - IPMI_TRANSPORT_GET_PACKET_STATISTICS | Get IP/UDP/RMCP Statistics | 可选 |
0x10 - IPMI_TRANSPORT_SET_SERIAL_CONFIGURATION | Set Serial/Modem Configuration | 必需 |
0x11 - IPMI_TRANSPORT_GET_SERIAL_CONFIGURATION | Get Serial/Modem Configuration | 必需 |
0x12 - IPMI_TRANSPORT_SET_SERIAL_MUX | Set Serial/Modem Mux | 可选 |
0x13 - IPMI_TRANSPORT_GET_TAP_RESPONSE_CODE | Get TAP Response Codes | 可选 |
0x14 - IPMI_TRANSPORT_SET_PPP_UDP_PROXY_TXDATA | Set PPP UDP Proxy Transmit Data | 可选 |
0x15 - IPMI_TRANSPORT_GET_PPP_UDP_PROXY_TXDATA | Get PPP UDP Proxy Transmit Data | 可选 |
0x16 - IPMI_TRANSPORT_SEND_PPP_UDP_PROXY_PACKET | Send PPP UDP Proxy Packet | 可选 |
0x17 - IPMI_TRANSPORT_GET_PPP_UDP_PROXY_RX | Get PPP UDP Proxy Receive Data | 可选 |
0x18 - IPMI_TRANSPORT_SERIAL_CONNECTION_ACTIVE | Serial/Modem Connection Active | 必需 |
0x19 - IPMI_TRANSPORT_CALLBACK | Callback | 可选 |
0x1A - IPMI_TRANSPORT_SET_USER_CALLBACK_OPTIONS | Set User Callback Options | 可选 |
0x1B - IPMI_TRANSPORT_GET_USER_CALLBACK_OPTIONS | Get User Callback Options | 可选 |
0x1C | Set Serial Routing Mux | 可选 |
0x20 - IPMI_TRANSPORT_SOL_ACTIVATING | SOL Activating | 可选 |
0x21 - IPMI_TRANSPORT_SET_SOL_CONFIG_PARAM | Set SOL Configuration Parameters | 可选 |
0x22 - IPMI_TRANSPORT_GET_SOL_CONFIG_PARAM | Get SOL Configuration Parameters | 可选 |
0x30 | Forwarded Command | 可选 |
0x31 | Set Forwarded Commands | 可选 |
0x32 | Get Forwarded Commands | 可选 |
0x33 | Enable Forwarded Commands | 可选 |
NetFn 0x2C - IPMI_NETFN_GROUP_EXT
对应头文件edk2\MdePkg\Include\IndustryStandard\IpmiNetFnGroupExtension.h,但是里面没有具体的内容,属于扩展用的,这其实也导致了额外的问题,因为不同的BIOS供应商提供的命令可能会有不同,导致维护困难。