83 lines
2.8 KiB
Diff
83 lines
2.8 KiB
Diff
|
|
From 573d74d5938907e5c7c110997b1fedac716b0a6c Mon Sep 17 00:00:00 2001
|
||
|
|
From: wangjue <jue.wang2@luxshare-ict.com>
|
||
|
|
Date: Thu, 17 Oct 2024 13:28:54 +0800
|
||
|
|
Subject: [PATCH] Add DIMM Status discrete sensors
|
||
|
|
|
||
|
|
Signed-off-by: wangjue <jue.wang2@luxshare-ict.com>
|
||
|
|
---
|
||
|
|
fault-monitor/fru-fault-monitor.cpp | 17 +++++++++++------
|
||
|
|
fault-monitor/fru-fault-monitor.hpp | 2 +-
|
||
|
|
2 files changed, 12 insertions(+), 7 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/fault-monitor/fru-fault-monitor.cpp b/fault-monitor/fru-fault-monitor.cpp
|
||
|
|
index d5d6703..8ff5294 100644
|
||
|
|
--- a/fault-monitor/fru-fault-monitor.cpp
|
||
|
|
+++ b/fault-monitor/fru-fault-monitor.cpp
|
||
|
|
@@ -360,7 +360,7 @@ void fillSensorDescription(const std::string& sensorPath, int eventOffset)
|
||
|
|
//}
|
||
|
|
}
|
||
|
|
|
||
|
|
-AlarmType parseSpecificSensorSelSeverity(sdbusplus::bus::bus& bus,
|
||
|
|
+void parseSpecificSensorSelSeverity(sdbusplus::bus::bus& bus,
|
||
|
|
const std::string& sensorPath,
|
||
|
|
const SensorType& sensorType,
|
||
|
|
const std::string& eventData,
|
||
|
|
@@ -384,7 +384,7 @@ AlarmType parseSpecificSensorSelSeverity(sdbusplus::bus::bus& bus,
|
||
|
|
}
|
||
|
|
default:
|
||
|
|
{
|
||
|
|
- return alarmStatus;
|
||
|
|
+ return;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
@@ -405,13 +405,18 @@ AlarmType parseSpecificSensorSelSeverity(sdbusplus::bus::bus& bus,
|
||
|
|
{
|
||
|
|
alarmStatus = NORMAL;
|
||
|
|
}
|
||
|
|
- return alarmStatus;
|
||
|
|
+ return;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
+ case SENSOR_TYPE_MEMORY:
|
||
|
|
+ {
|
||
|
|
+ sensorStatusRec[sensorPath].alarmStatus = alarmStatus;
|
||
|
|
+ break;
|
||
|
|
+ }
|
||
|
|
default:
|
||
|
|
- return alarmStatus;
|
||
|
|
+ return;
|
||
|
|
}
|
||
|
|
sensorStatusRec[sensorPath].eventType = SPECIFIC_SENSOR_TYPE;
|
||
|
|
sensorStatusRec[sensorPath].sensorType = sensorType;
|
||
|
|
@@ -420,9 +425,9 @@ AlarmType parseSpecificSensorSelSeverity(sdbusplus::bus::bus& bus,
|
||
|
|
{
|
||
|
|
fillSensorDescription(sensorPath, ev1Offset);
|
||
|
|
setDiscreteSensorDiscription(bus, sensorPath);
|
||
|
|
- setDiscreteSensorHealth(bus, sensorPath);
|
||
|
|
+ setDiscreteSensorHealth(bus, sensorPath);
|
||
|
|
}
|
||
|
|
- return alarmStatus;
|
||
|
|
+ return;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
diff --git a/fault-monitor/fru-fault-monitor.hpp b/fault-monitor/fru-fault-monitor.hpp
|
||
|
|
index 652fefa..e196287 100644
|
||
|
|
--- a/fault-monitor/fru-fault-monitor.hpp
|
||
|
|
+++ b/fault-monitor/fru-fault-monitor.hpp
|
||
|
|
@@ -34,7 +34,7 @@ enum SensorType
|
||
|
|
{
|
||
|
|
SENSOR_TYPE_EVENT_LOGGING_DISABLED = 0x10,
|
||
|
|
SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE = 0x22,
|
||
|
|
-
|
||
|
|
+ SENSOR_TYPE_MEMORY = 0x0C,
|
||
|
|
SENSOR_TYPE_MAX_NUMBER = 0x100 // Senor Type 为1个byte,最大为0~255,即:256个
|
||
|
|
};
|
||
|
|
|
||
|
|
--
|
||
|
|
2.34.1
|
||
|
|
|