Add RAS data support for 'callout_self' and 'callout_unit'
With this change, 'callout_self' and 'callout_unit' actions will add a
callout with location code into the PEL.
Change-Id: I975f2059a71f7b529a40fae03273cc3c387c4cef
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
diff --git a/analyzer/ras-data/ras-data-parser.cpp b/analyzer/ras-data/ras-data-parser.cpp
index 6386b6b..78ec9d2 100644
--- a/analyzer/ras-data/ras-data-parser.cpp
+++ b/analyzer/ras-data/ras-data-parser.cpp
@@ -146,9 +146,10 @@
auto priority = a.at("priority").get<std::string>();
auto guard = a.at("guard").get<bool>();
- // TODO
- trace::inf("callout_self: priority=%s guard=%c", priority.c_str(),
- guard ? 'T' : 'F');
+ std::string path{}; // Must be empty to callout the chip.
+
+ o_list->push(std::make_shared<HardwareCalloutResolution>(
+ path, getPriority(priority), guard));
}
else if ("callout_unit" == type)
{
@@ -156,9 +157,10 @@
auto priority = a.at("priority").get<std::string>();
auto guard = a.at("guard").get<bool>();
- // TODO
- trace::inf("callout_unit: name=%s priority=%s guard=%c",
- name.c_str(), priority.c_str(), guard ? 'T' : 'F');
+ auto path = i_data.at("units").at(name).get<std::string>();
+
+ o_list->push(std::make_shared<HardwareCalloutResolution>(
+ path, getPriority(priority), guard));
}
else if ("callout_connected" == type)
{
diff --git a/config.h.in b/config.h.in
index 078fe81..4156e49 100644
--- a/config.h.in
+++ b/config.h.in
@@ -8,7 +8,12 @@
// ensuring each code path remains buildable. Note that the optimization path
// should delete the unused code later.
-constexpr const int configPhalApi = @CONFIG_PHAL_API@;
+// TODO: This has a problem because as currently designed, meson will replace
+// the field with `True`, which won't compile. Will need to investigate
+// later. Fortunately, this variable is not currently used. So we can
+// comment it out and leave it here for an example when other config
+// options are added later.
+// constexpr const int configPhalApi = @CONFIG_PHAL_API@;
// IMPORTANT:
// Avoid using #define whenever possible. See note above for reason.
diff --git a/util/pdbg.cpp b/util/pdbg.cpp
index 0ce56d6..2e370c1 100644
--- a/util/pdbg.cpp
+++ b/util/pdbg.cpp
@@ -1,11 +1,12 @@
#include <assert.h>
+#include <config.h>
#include <hei_main.hpp>
#include <util/pdbg.hpp>
#include <util/trace.hpp>
#ifdef CONFIG_PHAL_API
-#include <attribute_info.H>
+#include <attributes_info.H>
#endif
namespace util