mpreboot: collect bmc dump
When a mpreboot is started, it indicates the host firmware has
encountered a critical failure. At times, the BMC firmware could be
involved in this error. Collect a BMC dump in parallel with the mpreboot
so that the BMC team will also have some debug data in these scenarios.
This is a "best attempt" type situation so do not let the failure of
generating a BMC dump, impact the overall mpreboot flow.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Ie628953ce002b6afdc43fb7012de780c2f208826
diff --git a/service_files/op-enter-mpreboot@.service.in b/service_files/op-enter-mpreboot@.service.in
index a46caf4..a130b9c 100644
--- a/service_files/op-enter-mpreboot@.service.in
+++ b/service_files/op-enter-mpreboot@.service.in
@@ -20,6 +20,9 @@
/xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager \
PendingAttributes a{s\\(sv\\)} 1 pvm_sys_dump_active \
xyz.openbmc_project.BIOSConfig.Manager.AttributeType.Enumeration s Enabled"
+ExecStart=/bin/sh -c \
+ "busctl call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/bmc \
+ xyz.openbmc_project.Dump.Create CreateDump a{sv} 0" || true
ExecStart=/usr/bin/openpower-proc-control enterMpReboot
ExecStart=/bin/mkdir -p /run/openbmc/
ExecStart=/bin/touch /run/openbmc/mpreboot@%i