Add in support for detecting an output overcurrent fault
When analyzing the STATUS_WORD bits, check if the IOUT_OC_FAULT bit is
on. That bit indicates that an output overcurrent fault condition has
occurred. Call out the power supply reporting that.
Change-Id: I18c7cd981ffc1b73ab52c90d32ba34195013e65e
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/elog-errors.hpp b/elog-errors.hpp
index 7dd5897..c21bf21 100644
--- a/elog-errors.hpp
+++ b/elog-errors.hpp
@@ -241,6 +241,26 @@
{
namespace Error
{
+ struct PowerSupplyOutputOvercurrent;
+} // namespace Error
+} // namespace Fault
+} // namespace Power
+} // namespace openbmc_project
+} // namespace xyz
+} // namespace sdbusplus
+
+namespace sdbusplus
+{
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Power
+{
+namespace Fault
+{
+namespace Error
+{
struct GPUOverTemp;
} // namespace Error
} // namespace Fault
@@ -723,6 +743,54 @@
{
namespace Fault
{
+namespace _PowerSupplyOutputOvercurrent
+{
+
+struct RAW_STATUS
+{
+ static constexpr auto str = "RAW_STATUS=%s";
+ static constexpr auto str_short = "RAW_STATUS";
+ using type = std::tuple<std::decay_t<decltype(str)>,const char*>;
+ explicit constexpr RAW_STATUS(const char* a) : _entry(entry(str, a)) {};
+ type _entry;
+};
+
+} // namespace _PowerSupplyOutputOvercurrent
+
+struct PowerSupplyOutputOvercurrent
+{
+ static constexpr auto L = level::ERR;
+ using RAW_STATUS = _PowerSupplyOutputOvercurrent::RAW_STATUS;
+ using CALLOUT_INVENTORY_PATH = xyz::openbmc_project::Common::Callout::Inventory::CALLOUT_INVENTORY_PATH;
+ using metadata_types = std::tuple<RAW_STATUS, CALLOUT_INVENTORY_PATH>;
+
+};
+
+} // namespace Fault
+} // namespace Power
+} // namespace openbmc_project
+} // namespace xyz
+
+
+namespace details
+{
+
+template <>
+struct map_exception_type<sdbusplus::xyz::openbmc_project::Power::Fault::Error::PowerSupplyOutputOvercurrent>
+{
+ using type = xyz::openbmc_project::Power::Fault::PowerSupplyOutputOvercurrent;
+};
+
+}
+
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Power
+{
+namespace Fault
+{
namespace _Shutdown
{