#include #include #include #include #include #include namespace watchdog { namespace dump { /** * @brief Log an event handled by the dump handler * * @param additional - Additional PEL data * @param timeout - timeout interval in seconds */ void event(std::map& additional, const uint32_t timeout) { std::string eventName = "org.open_power.Host.Boot.Error.WatchdogTimedOut"; // CreatePELWithFFDCFiles requires a vector of FFDCTuple. auto emptyFfdc = std::vector{}; // Create PEL with additional data. auto pelId = createPel(eventName, additional, emptyFfdc); // Collect Hostboot dump if auto reboot is enabled DumpParameters dumpParameters; dumpParameters.logId = pelId; dumpParameters.unitId = 0; // Not used for Hostboot dump dumpParameters.timeout = timeout; dumpParameters.dumpType = DumpType::Hostboot; // will not return until dump is complete or timeout requestDump(dumpParameters); } void eventWatchdogTimeout(const uint32_t timeout) { // Additional data to be added to PEL object // Currently we don't have anything to add // Keeping this for now in case if we have to add // any data corresponding to watchdog timeout std::map additionalData; event(additionalData, timeout); } } // namespace dump } // namespace watchdog