PEL: Updated PEL spec error action flag bit#10
- This will help to indicate which SRCs need to be collected and
regularly called home.
- Defined new entry in message registry schema action flags field
- Set this action flag in the registry for the daily clock PEL
and the voltage regulator N+1 phase fault PEL
Tested:
Sample output:
```bash
$ peltool -af
...
"Action Flags": [
"Report Externally",
"Heartbeat Call Home Event"
...
"Action Flags": [
"Report Externally",
"HMC Call Home",
"Heartbeat Call Home Event"
...
$ peltool -afx
...
00000030 55 48 00 18 01 00 20 00 60 03 00 01 00 00 00 00 |
00000040 00 00 20 20 00 00 00 00 50 53 00 50 01 01 27 00 |
...
00000030 55 48 00 18 01 00 20 00 58 03 00 01 00 00 00 00 |
00000040 00 00 28 20 00 00 00 00 50 53 00 50 01 01 30 00 |
...
```
Change-Id: Ifa181374692013dfadc0dd744f6db61baad3d42e
Signed-off-by: Harsh Agarwal <Harsh.Agarwal@ibm.com>
diff --git a/test/openpower-pels/registry_test.cpp b/test/openpower-pels/registry_test.cpp
index ce17e9b..322c25b 100644
--- a/test/openpower-pels/registry_test.cpp
+++ b/test/openpower-pels/registry_test.cpp
@@ -153,6 +153,29 @@
}
]
}
+ },
+
+ {
+ "Name": "org.open_power.PHAL.Info.ClockDailyLog",
+ "Subsystem": "cec_clocks",
+ "ComponentID": "0x3000",
+ "Severity": "non_error",
+ "ActionFlags": ["report", "call_home", "heartbeat_call_home"],
+
+ "SRC":
+ {
+ "ReasonCode": "0x300A",
+ "Words6To9": {}
+ },
+
+ "Documentation":
+ {
+ "Description": "Informational error to house clock debug info",
+ "Message": "Informational error to house clock debug info",
+ "Notes": [
+ "User data includes processor and clock register state information."
+ ]
+ }
}
]
}
@@ -261,6 +284,12 @@
entry = registry.lookup("0x2333", LookupType::reasonCode);
ASSERT_TRUE(entry);
EXPECT_EQ(entry->name, "xyz.openbmc_project.Power.OverVoltage");
+
+ entry = registry.lookup("org.open_power.PHAL.Info.ClockDailyLog",
+ LookupType::name);
+ ASSERT_TRUE(entry);
+ EXPECT_EQ(entry->name, "org.open_power.PHAL.Info.ClockDailyLog");
+ EXPECT_EQ(*(entry->actionFlags), 0x2820);
}
// Check the entry that mostly uses defaults
@@ -319,6 +348,12 @@
"termination"};
EXPECT_EQ(getActionFlags(flags), 0x9100);
+ flags.push_back("heartbeat_call_home");
+ EXPECT_EQ(getActionFlags(flags), 0x9120);
+ flags.clear();
+ flags.push_back("heartbeat_call_home");
+ EXPECT_EQ(getActionFlags(flags), 0x0020);
+
flags.clear();
flags.push_back("foo");
EXPECT_THROW(getActionFlags(flags), std::runtime_error);