summaryrefslogtreecommitdiff
path: root/prov-mode-mgr
AgeCommit message (Collapse)AuthorFilesLines
2019-10-28prov-mode-mgr: Log events for restriction modeRichard Marian Thomaiyar2-0/+32
Support added to log events for restriction mode change (system interface), which can be viewed using Redfish event log entries. This log will indicate the status of the system interface command execution allowed state after BIOS POST. Tested: Tested the same with up-stream message entry review https://gerrit.openbmc-project.xyz/#/c/openbmc/bmcweb/+/26601/ 1. Redfish validator - passed for this new addition 2. Log will be as below { "@data.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/184", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:03:04+00:00", "EntryType": "Event", "Id": "184", "Message": "System interface in unprovisioned state.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.SystemInterfaceUnprovisioned", "Name": "System Event Log Entry", "Severity": "Critical" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/198", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:03:18+00:00", "EntryType": "Event", "Id": "198", "Message": "System interface in whitelist provisioned state.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.SystemInterfaceWhitelistProvisioned", "Name": "System Event Log Entry", "Severity": "Warning" }, { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/204", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "1970-01-01T00:03:24+00:00", "EntryType": "Event", "Id": "204", "Message": "System interface in disabled provisioned state.", "MessageArgs": [], "MessageId": "OpenBMC.0.1.SystemInterfaceDisabledProvisioned", "Name": "System Event Log Entry", "Severity": "OK" } Change-Id: Ief9547d37bff07704caebf76e87fe8dba05e2db6 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2019-10-07prov-mode: Remove throwing error from prov mode.Richard Marian Thomaiyar1-7/+5
Provision mode manager, exposing Restriction Mode interface will bail, if there is any problem in reading u-boot environment variable. This was causing issues during Power on activity, as it will block the whole IPMI loading itself. Hence instead of bailing out, code is modified to consider the secure safest value ProvisionedHostDisabled mode, if unable to get u-boot param value. Tested: 1. Verified ipmi loaded file, and whitelist filter works as expected 2. Verified that ipmi still loads with ProvisionedHostDisbaled when u-boot environment is not available 3. verified that it didn't disturb the old behaviour, by doing read-only section update, and doing one full flash update and made sure both works as expected. Change-Id: Ic2e896e1f2de8e876f3d82e935f1f04e7d0419dc Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2019-07-02prov-mode-mgr: Daemon to manage RestrictionModeRichard Marian Thomaiyar7-0/+558
This daemon is used to manage the RestrictionMode property under U-Boot environment variable using u-boot-env-mgr. This property determines the filtering mechanism which will be applied in ipmid for system interface. Tested: 1. Used busctl to verify that provision u-boot envirnoment is created when started for the first time, or updated from old image 2. Used busctl to query RestrictionMode property and it returns property as per the D-Bus interfaces. 3. Verified ipmid still works, and able to catch the signal and work as expected (Under review, and tested updated in detail in that). Change-Id: I16f86ebed8a65c84e12d952068404ecfff4f54ce Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>