summaryrefslogtreecommitdiffstats
path: root/sensorhandler.C
diff options
context:
space:
mode:
authorChris Austen <austenc@us.ibm.com>2015-11-07 14:27:12 -0600
committerChris Austen <austenc@us.ibm.com>2015-11-07 14:27:12 -0600
commitd7cf0e44f3a8b4af3803875fc2bf49250348f003 (patch)
treed438beb2e893515919fe7509f1c4a3df059f8b8b /sensorhandler.C
parente8ea3befc0f6120cbe9de2cf4d9dec1c95daf2b5 (diff)
downloadphosphor-host-ipmid-d7cf0e44f3a8b4af3803875fc2bf49250348f003.tar.gz
phosphor-host-ipmid-d7cf0e44f3a8b4af3803875fc2bf49250348f003.zip
Fix bugs from test runs
POST and FW Boot progres where not getting set on DBUS Memory and CPU faults now show up on DBUS OS Boot Status was never sent
Diffstat (limited to 'sensorhandler.C')
-rw-r--r--sensorhandler.C25
1 files changed, 14 insertions, 11 deletions
diff --git a/sensorhandler.C b/sensorhandler.C
index 9344abd..cd57dd4 100644
--- a/sensorhandler.C
+++ b/sensorhandler.C
@@ -12,22 +12,24 @@ void register_netfn_sen_functions() __attribute__((constructor));
struct sensorTypemap_t {
uint8_t number;
+ uint8_t typecode;
char dbusname[32];
} ;
sensorTypemap_t g_SensorTypeMap[] = {
- {0x01, "Temp"},
- {0x0C, "DIMM"},
- {0x0C, "MEMORY_BUFFER"},
- {0x07, "PROC"},
- {0x07, "CORE"},
- {0x07, "CPU"},
- {0x0F, "BootProgress"},
- {0xC3, "OccStatus"},
- {0xC3, "BootCount"},
- {0xFF, ""}
+ {0x01, 0x6F, "Temp"},
+ {0x0C, 0x6F, "DIMM"},
+ {0x0C, 0x6F, "MEMORY_BUFFER"},
+ {0x07, 0x6F, "PROC"},
+ {0x07, 0x6F, "CORE"},
+ {0x07, 0x6F, "CPU"},
+ {0x0F, 0x6F, "BootProgress"},
+ {0xe9, 0x09, "OccStatus"}, // E9 is an internal mapping to handle sensor type code os 0x09
+ {0xC3, 0x6F, "BootCount"},
+ {0x1F, 0x6F, "OperatingSystemStatus"},
+ {0xFF, 0x00, ""},
};
@@ -50,6 +52,7 @@ uint8_t dbus_to_sensor_type(char *p) {
s++;
}
+
if (s->number == 0xFF)
printf("Failed to find Sensor Type %s\n", p);
@@ -84,7 +87,7 @@ uint8_t find_sensor(uint8_t sensor_number) {
// This is where sensors that do not exist in dbus but do
// exist in the host code stop. This should indicate it
// is not a supported sensor
- if (a.bus[0] == 0) { return 0;}
+ if (a.interface[0] == 0) { return 0;}
if (strstr(a.interface, "InventoryItem")) {
// InventoryItems are real frus. So need to get the
OpenPOWER on IntegriCloud