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_RW_PKG_CFG_RSP_PASS
¶ PECI read/write supported responses
-
PECI_RW_PKG_CFG_RSP_TIMEOUT
¶
-
PECI_RW_PKG_CFG_RSP_ILLEGAL
¶
-
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
¶
-
enumerator
PECI_UNDERFLOW_SENSOR_ERROR
¶
-
enumerator
PECI_OVERFLOW_SENSOR_ERROR
¶
-
enumerator
-
enum
peci_command_code
¶ PECI commands.
Values:
-
enumerator
PECI_CMD_PING
¶
-
enumerator
PECI_CMD_GET_TEMP0
¶
-
enumerator
PECI_CMD_GET_TEMP1
¶
-
enumerator
PECI_CMD_RD_PCI_CFG0
¶
-
enumerator
PECI_CMD_RD_PCI_CFG1
¶
-
enumerator
PECI_CMD_WR_PCI_CFG0
¶
-
enumerator
PECI_CMD_WR_PCI_CFG1
¶
-
enumerator
PECI_CMD_RD_PKG_CFG0
¶
-
enumerator
PECI_CMD_RD_PKG_CFG1
¶
-
enumerator
PECI_CMD_WR_PKG_CFG0
¶
-
enumerator
PECI_CMD_WR_PKG_CFG1
¶
-
enumerator
PECI_CMD_RD_IAMSR0
¶
-
enumerator
PECI_CMD_RD_IAMSR1
¶
-
enumerator
PECI_CMD_WR_IAMSR0
¶
-
enumerator
PECI_CMD_WR_IAMSR1
¶
-
enumerator
PECI_CMD_RD_PCI_CFG_LOCAL0
¶
-
enumerator
PECI_CMD_RD_PCI_CFG_LOCAL1
¶
-
enumerator
PECI_CMD_WR_PCI_CFG_LOCAL0
¶
-
enumerator
PECI_CMD_WR_PCI_CFG_LOCAL1
¶
-
enumerator
PECI_CMD_GET_DIB
¶
-
enumerator
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 Value
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 Value
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.
- Parameters
buf
: is a valid pointer on a data buffer, or NULL otherwise.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.
-