Set the trigger type based on the error
This uses a new trigger type DBus parameter for the
GenerateStoredLog() method to set the trigger for the crashdump.
Tested:
Injected an ERR2 error and confirmed that the trigger type was
correctly set.
Change-Id: Id770ae5977cfc026a713e3649890b6db28bee5dd
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>
diff --git a/src/host_error_monitor.cpp b/src/host_error_monitor.cpp
index 27acf5e..d8535ed 100644
--- a/src/host_error_monitor.cpp
+++ b/src/host_error_monitor.cpp
@@ -328,7 +328,8 @@
"xyz.openbmc_project.State.Chassis.Transition.PowerCycle"});
}
-static void startCrashdumpAndRecovery(bool recoverSystem)
+static void startCrashdumpAndRecovery(bool recoverSystem,
+ const std::string& triggerType)
{
std::cout << "Starting crashdump\n";
static std::shared_ptr<sdbusplus::bus::match::match> crashdumpCompleteMatch;
@@ -376,7 +377,7 @@
}
},
"com.intel.crashdump", "/com/intel/crashdump",
- "com.intel.crashdump.Stored", "GenerateStoredLog");
+ "com.intel.crashdump.Stored", "GenerateStoredLog", triggerType);
}
static void incrementCPUErrorCount(int cpuNum)
@@ -663,7 +664,7 @@
std::cerr << "Unable to read reset on CATERR value\n";
return;
}
- startCrashdumpAndRecovery(*reset);
+ startCrashdumpAndRecovery(*reset, "IERR");
},
"xyz.openbmc_project.Settings",
"/xyz/openbmc_project/control/processor_error_config",
@@ -1182,7 +1183,7 @@
std::cerr << "Unable to read reset on ERR2 value\n";
return;
}
- startCrashdumpAndRecovery(*reset);
+ startCrashdumpAndRecovery(*reset, "ERR2 Timeout");
},
"xyz.openbmc_project.Settings",
"/xyz/openbmc_project/control/processor_error_config",
@@ -1251,7 +1252,7 @@
std::cerr << "Unable to read reset on SMI value\n";
return;
}
- startCrashdumpAndRecovery(*reset);
+ startCrashdumpAndRecovery(*reset, "SMI Timeout");
},
"xyz.openbmc_project.Settings",
"/xyz/openbmc_project/control/bmc_reset_disables",