From eeac51ebaaad82bb4ac65a029c81c221e32b33ea Mon Sep 17 00:00:00 2001 From: mansijos Date: Wed, 26 May 2021 17:40:04 +0530 Subject: [PATCH] Add BMC Time update log to the registry Add message in registry to log an event that indicates BMC time is set via NTP, Host or Manually. During early stage of system boot if any critical events occur, they are getting logged with 1970 timestamp till the time BMC time update happens. This is expected behavior, but to call it out explicitly it is good to log when BMC time is updated. Tested: Built and validator passes. Confirmed that the event is getting logged correctly in Redfish. Signed-off-by: mansijos --- .../registries/openbmc_message_registry.hpp | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/redfish-core/include/registries/openbmc_message_registry.hpp b/redfish-core/include/registries/openbmc_message_registry.hpp index 1e493ca..967713f 100644 --- a/redfish-core/include/registries/openbmc_message_registry.hpp +++ b/redfish-core/include/registries/openbmc_message_registry.hpp @@ -29,7 +29,7 @@ const Header header = { "0.2.0", "OpenBMC", }; -constexpr std::array registry = { +constexpr std::array registry = { MessageEntry{ "ADDDCCorrectable", { @@ -286,6 +286,39 @@ constexpr std::array registry = { {}, "None.", }}, + MessageEntry{"BMCTimeUpdatedViaHost", + { + "Indicates that BMC time has been set via Host.", + "BMC time has been set via Host. " + "Date Time is set to %1 from %2.", + "OK", + "OK", + 2, + {"string", "string"}, + "None.", + }}, + MessageEntry{"BMCTimeUpdatedManually", + { + "Indicates that BMC time has been set Manually.", + "BMC time has been set Manually. " + "Date Time is set to %1 from %2.", + "OK", + "OK", + 2, + {"string", "string"}, + "None.", + }}, + MessageEntry{"BMCTimeUpdatedViaNTP", + { + "Indicates that BMC time has been set via NTP.", + "BMC time has been set via NTP. " + "Date Time is set to %1 from %2.", + "OK", + "OK", + 2, + {"string", "string"}, + "None.", + }}, MessageEntry{"ChassisIntrusionDetected", { "Indicates that a physical security event " -- 2.17.1