If you need urgent consulting help click here
PECI
Overview
The Platform Environment Control Interface, abbreviated as PECI, is a thermal management standard introduced in 2006 with the Intel Core 2 Duo Microprocessors. The PECI interface allows external devices to read processor temperature, perform processor manageability functions, and manage processor interface tuning and diagnostics. The PECI bus driver APIs enable the interaction between Embedded Microcontrollers and CPUs.
API Reference
- group peci_interface
PECI Interface 3.0.
Defines
-
PECI_CC_RSP_SUCCESS
PECI read/write supported responses
-
PECI_CC_RSP_TIMEOUT
-
PECI_CC_OUT_OF_RESOURCES_TIMEOUT
-
PECI_CC_RESOURCES_LOWPWR_TIMEOUT
-
PECI_CC_ILLEGAL_REQUEST
-
PECI_PING_WR_LEN
Ping command format.
-
PECI_PING_RD_LEN
-
PECI_PING_LEN
-
PECI_GET_DIB_WR_LEN
GetDIB command format.
-
PECI_GET_DIB_RD_LEN
-
PECI_GET_DIB_CMD_LEN
-
PECI_GET_DIB_DEVINFO
-
PECI_GET_DIB_REVNUM
-
PECI_GET_DIB_DOMAIN_BIT_MASK
-
PECI_GET_DIB_MAJOR_REV_MASK
-
PECI_GET_DIB_MINOR_REV_MASK
-
PECI_GET_TEMP_WR_LEN
GetTemp command format.
-
PECI_GET_TEMP_RD_LEN
-
PECI_GET_TEMP_CMD_LEN
-
PECI_GET_TEMP_LSB
-
PECI_GET_TEMP_MSB
-
PECI_GET_TEMP_ERR_MSB
-
PECI_GET_TEMP_ERR_LSB_GENERAL
-
PECI_GET_TEMP_ERR_LSB_RES
-
PECI_GET_TEMP_ERR_LSB_TEMP_LO
-
PECI_GET_TEMP_ERR_LSB_TEMP_HI
-
PECI_RD_PKG_WR_LEN
RdPkgConfig command format.
-
PECI_RD_PKG_LEN_BYTE
-
PECI_RD_PKG_LEN_WORD
-
PECI_RD_PKG_LEN_DWORD
-
PECI_RD_PKG_CMD_LEN
-
PECI_WR_PKG_RD_LEN
WrPkgConfig command format
-
PECI_WR_PKG_LEN_BYTE
-
PECI_WR_PKG_LEN_WORD
-
PECI_WR_PKG_LEN_DWORD
-
PECI_WR_PKG_CMD_LEN
-
PECI_RD_IAMSR_WR_LEN
RdIAMSR command format
-
PECI_RD_IAMSR_LEN_BYTE
-
PECI_RD_IAMSR_LEN_WORD
-
PECI_RD_IAMSR_LEN_DWORD
-
PECI_RD_IAMSR_LEN_QWORD
-
PECI_RD_IAMSR_CMD_LEN
-
PECI_WR_IAMSR_RD_LEN
WrIAMSR command format
-
PECI_WR_IAMSR_LEN_BYTE
-
PECI_WR_IAMSR_LEN_WORD
-
PECI_WR_IAMSR_LEN_DWORD
-
PECI_WR_IAMSR_LEN_QWORD
-
PECI_WR_IAMSR_CMD_LEN
-
PECI_RD_PCICFG_WR_LEN
RdPCIConfig command format
-
PECI_RD_PCICFG_LEN_BYTE
-
PECI_RD_PCICFG_LEN_WORD
-
PECI_RD_PCICFG_LEN_DWORD
-
PECI_RD_PCICFG_CMD_LEN
-
PECI_WR_PCICFG_RD_LEN
WrPCIConfig command format
-
PECI_WR_PCICFG_LEN_BYTE
-
PECI_WR_PCICFG_LEN_WORD
-
PECI_WR_PCICFG_LEN_DWORD
-
PECI_WR_PCICFG_CMD_LEN
-
PECI_RD_PCICFGL_WR_LEN
RdPCIConfigLocal command format
-
PECI_RD_PCICFGL_RD_LEN_BYTE
-
PECI_RD_PCICFGL_RD_LEN_WORD
-
PECI_RD_PCICFGL_RD_LEN_DWORD
-
PECI_RD_PCICFGL_CMD_LEN
-
PECI_WR_PCICFGL_RD_LEN
WrPCIConfigLocal command format
-
PECI_WR_PCICFGL_WR_LEN_BYTE
-
PECI_WR_PCICFGL_WR_LEN_WORD
-
PECI_WR_PCICFGL_WR_LEN_DWORD
-
PECI_WR_PCICFGL_CMD_LEN
Enums
-
enum peci_error_code
PECI error codes.
Values:
-
enumerator PECI_GENERAL_SENSOR_ERROR = 0x8000
-
enumerator PECI_UNDERFLOW_SENSOR_ERROR = 0x8002
-
enumerator PECI_OVERFLOW_SENSOR_ERROR = 0x8003
-
enumerator PECI_GENERAL_SENSOR_ERROR = 0x8000
-
enum peci_command_code
PECI commands.
Values:
-
enumerator PECI_CMD_PING = 0x00
-
enumerator PECI_CMD_GET_TEMP0 = 0x01
-
enumerator PECI_CMD_GET_TEMP1 = 0x02
-
enumerator PECI_CMD_RD_PCI_CFG0 = 0x61
-
enumerator PECI_CMD_RD_PCI_CFG1 = 0x62
-
enumerator PECI_CMD_WR_PCI_CFG0 = 0x65
-
enumerator PECI_CMD_WR_PCI_CFG1 = 0x66
-
enumerator PECI_CMD_RD_PKG_CFG0 = 0xA1
-
enumerator PECI_CMD_RD_PKG_CFG1 = 0xA
-
enumerator PECI_CMD_WR_PKG_CFG0 = 0xA5
-
enumerator PECI_CMD_WR_PKG_CFG1 = 0xA6
-
enumerator PECI_CMD_RD_IAMSR0 = 0xB1
-
enumerator PECI_CMD_RD_IAMSR1 = 0xB2
-
enumerator PECI_CMD_WR_IAMSR0 = 0xB5
-
enumerator PECI_CMD_WR_IAMSR1 = 0xB6
-
enumerator PECI_CMD_RD_PCI_CFG_LOCAL0 = 0xE1
-
enumerator PECI_CMD_RD_PCI_CFG_LOCAL1 = 0xE2
-
enumerator PECI_CMD_WR_PCI_CFG_LOCAL0 = 0xE5
-
enumerator PECI_CMD_WR_PCI_CFG_LOCAL1 = 0xE6
-
enumerator PECI_CMD_GET_DIB = 0xF7
-
enumerator PECI_CMD_PING = 0x00
Functions
-
int peci_config(const struct device *dev, uint32_t bitrate)
Configures the PECI interface.
- Parameters
dev – Pointer to the device structure for the driver instance.
bitrate – the selected expressed in Kbps. command or when an event needs to be sent to the client application.
- Return values
0 – If successful.
Negative – errno code if failure.
-
int peci_enable(const struct device *dev)
Enable PECI interface.
- Parameters
dev – Pointer to the device structure for the driver instance.
- Return values
0 – If successful.
Negative – errno code if failure.
-
struct peci_buf
- #include <peci.h>
PECI buffer structure.
Note: Frame check sequence byte is added into rx buffer, need to allocate an additional byte for this in rx buffer.
- Param buf
is a valid pointer on a data buffer, or NULL otherwise.
- Param len
is the length of the data buffer expected to received without considering the frame check sequence byte.
-
struct peci_msg
- #include <peci.h>
PECI transaction packet format.
-
PECI_CC_RSP_SUCCESS