From d36121d09db4e044b0d7599eae84ad7dc3240fca 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 | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/redfish-core/include/registries/openbmc_message_registry.hpp b/redfish-core/include/registries/openbmc_message_registry.hpp index bedaf6a..4837d2b 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.3.1", "OpenBMC", }; -constexpr std::array registry = { +constexpr std::array registry = { MessageEntry{ "ADDDCCorrectable", { @@ -263,6 +263,36 @@ 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", + 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", + 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", + 2, + {"string", "string"}, + "None.", + }}, MessageEntry{"ChassisIntrusionDetected", { "Indicates that a physical security event " -- 2.25.1