dimm-spd-reader: fix PMIC type detection from SPD

Add support for identifying PMIC unknown state as 0xFF.

Update PMIC SPD detection flow to read SPD registers 0x200, 0x204, and 0x208. Check bit7 to determine whether the PMIC is installed, and use SPD bit[3:0] as the PMIC type.

Also update the IPMI error handling path to return completion code 0x07 for command 0x6c when PMIC detection fails or the PMIC type is unknown.
This commit is contained in:
Your Name
2026-04-27 10:01:06 +08:00
parent 182a0516ac
commit 0cc0c96893
6 changed files with 697 additions and 68 deletions
@@ -20,7 +20,8 @@ enum class DataType {
CURRENT,
POWER,
VOLTAGE,
STATUS
STATUS,
ERROR
};
enum class TempSensor {
@@ -37,7 +38,8 @@ enum class ReqId {
MAX_TEMP = 3,
VOLTAGE = 4,
CURRENT = 5,
STATUS_REG = 6
STATUS_REG = 6,
ERROR_CODE = 7
};
enum class RailChannel {
@@ -60,6 +62,10 @@ enum class StatusReg {
REG_0B = 0x0B
};
enum class ErrCode {
errCode_REG_32 = 0x32
};
typedef struct {
int8_t int_part;
uint8_t frac_part;