47453d77 | 29-Nov-2021 |
George Liu <liuxiwei@inspur.com> |
Fix the String type of pendingAttributes method
When the user calls the `pendingAttributes` method, if the `attributeType` is equal to the string type, there is a chance that the previous logic will
Fix the String type of pendingAttributes method
When the user calls the `pendingAttributes` method, if the `attributeType` is equal to the string type, there is a chance that the previous logic will fail because of the `std::get<1>` exception.
Since the string type has joined `MinStringLength` and `MaxStringLength`, it is necessary to verify the maximum length and minimum length of the string.
resolved: https://github.com/openbmc/bios-settings-mgr/issues/2
Tested: If the length of the hb_lid_ids attribute value we configure is 0 to 10, which is when we set a string with a length of more than 10 bytes, an exception will be thrown.
bios/string_attrs.json: { "attribute_name" : "hb_lid_ids", "string_type" : "ASCII", "minimum_string_length" : 0, "maximum_string_length" : 10, "default_string_length" : 0, "default_string" : "", "helpText" : "Provides the host a mapping of the lid IDs to human readable names.", "displayName" : "Hostboot Lid IDs" }
busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.BIOSConfig.Manager PendingAttributes a{s\(sv\)} 1 "hb_lid_ids" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String" s "123456789023" Call failed: Invalid argument was given.
journalctl -o json-pretty SYSLOG_IDENTIFIER=biosconfig-manager { "_SYSTEMD_INVOCATION_ID" : "0930e3a7967e4eb68429fd472afebcec", "_HOSTNAME" : "fp5280g2", "_PID" : "243", "ATTRVALUE" : "123456789023", "_EXE" : "/usr/bin/biosconfig-manager", "_CMDLINE" : "/usr/bin/biosconfig-manager", "_SYSTEMD_SLICE" : "system.slice", "SYSLOG_IDENTIFIER" : "biosconfig-manager", "__REALTIME_TIMESTAMP" : "305445800", "_GID" : "0", "MINLEN" : "0", "MAXLEN" : "10", "CODE_LINE" : "210", "MESSAGE" : "123456789023 Length is out of range, bound is invalid, maxStringLength = 10, minStringLength = 0", ... }
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ic13a8acf8417beb92ea3ed1bec5a4bc58d3adda9
show more ...
|
567a3cf2 | 07-Dec-2021 |
George Liu <liuxiwei@inspur.com> |
logging: switch to lg2
After switching to C++20, it is recommended to use `phosphor::lg2` to format log, and the correct `CODE_LINE` and `CODE_FUNC` values can be used in log tracking.
Tested: buil
logging: switch to lg2
After switching to C++20, it is recommended to use `phosphor::lg2` to format log, and the correct `CODE_LINE` and `CODE_FUNC` values can be used in log tracking.
Tested: built biosConfigManager successfully. journalctl -o json-pretty SYSLOG_IDENTIFIER=biosconfig-manager { "_TRANSPORT" : "journal", "_PID" : "244", "__MONOTONIC_TIMESTAMP" : "513878067", "_SYSTEMD_SLICE" : "system.slice", "CODE_LINE" : "123", "_SOURCE_REALTIME_TIMESTAMP" : "513877941", "_HOSTNAME" : "fp5280g2", "_CAP_EFFECTIVE" : "1ffffffffff", "_BOOT_ID" : "40382c3612f54e1a96a6ecf41fe6b38e", "SYSLOG_IDENTIFIER" : "biosconfig-manager", "_CMDLINE" : "/usr/bin/biosconfig-manager", "_EXE" : "/usr/bin/biosconfig-manager", "LOG2_FMTMSG" : "BIOS attribute not found in the BaseBIOSTable", "_SYSTEMD_UNIT" : "xyz.openbmc_project.biosconfig_manager.service", "MESSAGE" : "BIOS attribute not found in the BaseBIOSTable", "PRIORITY" : "3", "CODE_FILE" : "../biosconfig-manager/src/manager.cpp", "CODE_FUNC" : "virtual bios_config::Manager::PendingAttributes bios_config::Manager::pendingAttributes (bios_config::Manager::PendingAttributes)" ... }
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I274d61827279b10ba3fe9d61404ce8b654ccdd9e
show more ...
|
b9e362dd | 07-Dec-2021 |
George Liu <liuxiwei@inspur.com> |
Update the clang-format file with latest
refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I51090ceaabd06da486f9
Update the clang-format file with latest
refer: https://github.com/openbmc/docs/blob/master/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I51090ceaabd06da486f9023ce2ab8e7d1efa123a
show more ...
|
fb928424 | 07-Dec-2021 |
George Liu <liuxiwei@inspur.com> |
build: switch to C++20
1. Updated to C++20 2. Limit meson version >= 0.58.0 3. Added the default buildtype to debugoptimized
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I1318c1aabdbe
build: switch to C++20
1. Updated to C++20 2. Limit meson version >= 0.58.0 3. Added the default buildtype to debugoptimized
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I1318c1aabdbeb285c1bea83b6820c878d5152c8a
show more ...
|
29656f07 | 22-Oct-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Add OWNERS file
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Ib40b1c1aed037b16cf4fc20df8cd316728014795 |
2f7ba73a | 30-Sep-2021 |
Snehalatha Venkatesh <snehalathax.v@intel.com> |
Fix for changing BIOS AdminPassword through BMC
BIOS hash value doesn't match with BMC computed hash value for changing admin password
Changed the hash function as per BIOS usage to match with BMC
Fix for changing BIOS AdminPassword through BMC
BIOS hash value doesn't match with BMC computed hash value for changing admin password
Changed the hash function as per BIOS usage to match with BMC computed hash value and BIOS hash value
Tested: By giving POST to '/redfish/v1/Systems/system/Bios/Actions/Bios.ChangePassword' Body: { "NewPassword": "123456789", "OldPassword": "1234567890", "PasswordName": "AdminPassword" } Response: Success
Signed-off-by: Snehalatha Venkatesh <snehalathax.v@intel.com> Change-Id: Ibaf0079e471914b738f167652d6b985533f5d920
show more ...
|
b5984b87 | 16-Aug-2021 |
Arun Lal K M <arun.lal@intel.com> |
Add data validation for PATCH to /Bios/Settings.
New data was validated only using option length. Added code to check if new value is part of available options. Error is thrown if the new values is
Add data validation for PATCH to /Bios/Settings.
New data was validated only using option length. Added code to check if new value is part of available options. Error is thrown if the new values is not a valid option.
Tested: By giving PATCH Request to 'redfish/v1/systems/system/bios/settings'. Output sample showing success case: PATCH command raw data: { "data":[ { "AttributeName": "AmpPrefetchEnable", "AttributeType": "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String", "AttributeValue": "0x01" } ] }
Response: { "@odata.id": "/redfish/v1/Systems/system/Bios/Settings", "@odata.type": "#Bios.v1_1_0.Bios", "AttributeRegistry": "BiosAttributeRegistry", "Id": "BiosSettingsV1", "Message": "Successfully Completed Request", "Name": "Bios Settings Version 1" }
Output sample showing failure case: PATCH command raw data: { "data":[ { "AttributeName": "AmpPrefetchEnable", "AttributeType": "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String", "AttributeValue": "0x05" } ] }
Response: { "@odata.id": "/redfish/v1/Systems/system/Bios/Settings", "@odata.type": "#Bios.v1_1_0.Bios", "AttributeRegistry": "BiosAttributeRegistry", "Id": "BiosSettingsV1", "Name": "Bios Settings Version 1", "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request failed due to an internal service error. The service is still operational.", "MessageArgs": [], "MessageId": "Base.1.8.1.InternalError", "MessageSeverity": "Critical", "Resolution": "Resubmit the request. If the problem persists, consider resetting the service." } ], "code": "Base.1.8.1.InternalError", "message": "The request failed due to an internal service error. The service is still operational." } }
Note: Valid options for knob AmpPrefetchEnable is 0x01 and 0x00 as shown below. { "AttributeName": "AmpPrefetchEnable", "CurrentValue": "0x00", "DefaultValue": "0x00", "DisplayName": "AmpPrefetchEnable", "HelpText": "Set to enable or disable MLC AMP prefetch (MSR 1A4h [4]).", "MenuPath": "./", "ReadOnly": false, "Type": "String", "Value": [ { "OneOf": "0x01" }, { "OneOf": "0x00" } ] }
Signed-off-by: Arun Lal K M <arun.lal@intel.com> Change-Id: Id66bacf2491d90aa189a8fb0f48d45243195e38c
show more ...
|
8f54ee18 | 05-Aug-2021 |
George Liu <liuxiwei@inspur.com> |
Remove readOnly attribute check
In IBM's p10 system, The BIOS attribute can be set by Host but not other OOB entities(Redfish doPatch).
All attributes can be changed when the readOnly attribute is
Remove readOnly attribute check
In IBM's p10 system, The BIOS attribute can be set by Host but not other OOB entities(Redfish doPatch).
All attributes can be changed when the readOnly attribute is true and make corresponding change in pldmtool & D-Bus also.
Tested: busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.BIOSConfig.Manager PendingAttributes a{s\(sv\)} 1 "pvm_system_name" "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String" s "XXX"
busctl get-property xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager BaseBIOSTable --verbose ... DICT_ENTRY "s(sbsssvva(sv))" { STRING "pvm_system_name"; STRUCT "sbsssvva(sv)" { STRING "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String"; BOOLEAN false; STRING "pvm_system_name"; STRING "pvm_system_name"; STRING ""; VARIANT "s" { STRING "XXX"; }; VARIANT "s" { STRING ""; }; ARRAY "(sv)" { STRUCT "sv" { STRING "xyz.openbmc_project.BIOSConfig.Manager.BoundType.MinStringLength"; VARIANT "x" { INT64 0; }; }; STRUCT "sv" { STRING "xyz.openbmc_project.BIOSConfig.Manager.BoundType.MaxStringLength"; VARIANT "x" { INT64 100; }; }; }; }; }; ...
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I70ceeff2859d6c8b56690e04018bdf0b23427042
show more ...
|
5e2cb720 | 26-May-2021 |
Snehalatha Venkatesh <snehalathax.v@intel.com> |
Change Resetflag from default to Noaction
Change Resetflag from default to Noaction as BMC have to clear the default reset bios settings flag whenever new BaseTable is received from BIOS or else BIO
Change Resetflag from default to Noaction
Change Resetflag from default to Noaction as BMC have to clear the default reset bios settings flag whenever new BaseTable is received from BIOS or else BIOS will keep reset the system with default values.
Tested: Ran unit test cases and manually tested with commands. When new BaseTable is created, ResetBIOS setting will set the flag to NoAction.
Signed-off-by: Snehalatha Venkatesh <snehalathax.v@intel.com> Change-Id: Iea029b1a5a3d97c7f19bc21851972fdc5599cb8d
show more ...
|
96e72ec5 | 20-May-2021 |
Ayushi Smriti <smriti.ayushi@linux.intel.com> |
oob bios config ChangePassword Action support
Change Password ACTION was not working as expected. This implementation adds change password support in oob bios config to enable admin password change
oob bios config ChangePassword Action support
Change Password ACTION was not working as expected. This implementation adds change password support in oob bios config to enable admin password change via Redfish. Also, password storing file is removed and only hash is required to be stored in seedData File.
Tested: -Set the BIOS password via Set BIOS Pwd hash cmd via KCS interface -Change BIOS Admin password via Change Password ACTION in Redfish -Run the Get stored Pwd hash command via KCS interface -Could get the updated admin password hash and admin Password Flag gets set to true -Verified the updated changes in seedData file as well
Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com> Change-Id: If23416d66f1a2daa4292113b899d180fc7bb2894
show more ...
|
c0f926d6 | 12-Jan-2021 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Remove executable permissions to the service file
- While creating a bibake recipe for bios settings manager,in the testing, it is found that the service file in the repo,was checked in with exe
Remove executable permissions to the service file
- While creating a bibake recipe for bios settings manager,in the testing, it is found that the service file in the repo,was checked in with executable permissions beacuse of which systemd throws the following error while starting the service.
[ systemd[1]: Configuration file /lib/systemd/system/xyz.openbmc_project.biosconfig_manager.service is marked executable. Please remove executable permission bits. Proceeding anyway. ]
- This commit would just remove the executable permissions of the bios-settings-mgr service file.
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: I81250cf96708d83d68a2acfd10e6d59e44daa79b
show more ...
|
8f706213 | 16-Dec-2020 |
Kuiying Wang <kuiying.wang@intel.com> |
oob bios config password and bios reset
Tested: 1. Bios reset flag can be modified throw redfish POST https://IP_ADDR/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios { "ResetFlag": "Factor
oob bios config password and bios reset
Tested: 1. Bios reset flag can be modified throw redfish POST https://IP_ADDR/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios { "ResetFlag": "Factory" } root@intel-obmc:~# busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager org.freedesktop.DBus.Properties Get ss xyz.openbmc_project.BIOSConfig.Manager ResetBIOSSettings v s "xyz.openbmc_project.BIOSConfig.Manager.ResetFlag.FactoryDefaults"
2. Bios change password: root@intel-obmc:~# cat /var/lib/bios-settings-manager/seedData { "UserPwdHash": "08D91157785366CDC3AA64D87E5E3C621EDAB13E26B6E484397EBA5E459E54C567BF5B1FFB36A43B6142B18F8D642E9D", "AdminPwdHash": "08D91157785366CDC3AA64D87E5E3C621EDAB13E26B6E484397EBA5E459E54C567BF5B1FFB36A43B6142B18F8D642E9D", "Seed": "123456", "HashAlgo": "SHA384" } POST https://IP_ADDR/redfish/v1/Systems/system/Bios/Actions/Bios.ChangePassword { "NewPassword": "12345678", "OldPassword": "1234567890", "PasswordName": "Administrator" } root@intel-obmc:~# cat /var/lib/bios-settings-manager/passwordData { "CurrentPassword": "1234567890", "IsAdminPwdChanged": 1, "IsUserPwdChanged": 0, "NewPassword": "2DD65D57EB60B1D92C5F3D2DC84724FCEE7BC02E57AA75E834712266ED94CAC704047B2FF7CEC1C36BED280B36BB5AC6", "UserName": "Administrator" }
Change-Id: Ib54b36819e49c891c6169c95d9cdaebd5bcb06f3 Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
show more ...
|
ce75d9e8 | 15-Dec-2020 |
Kuiying Wang <kuiying.wang@intel.com> |
Format source file by dos2unix
dos2unix to format source file which has dos end char ^M
Change-Id: Ie975dcd4762bf7d51f627bb6c1693f13a916481b Signed-off-by: Kuiying Wang <kuiying.wang@intel.com> |
f1101df2 | 05-Nov-2020 |
Tom Joseph <tomjoseph@in.ibm.com> |
Add serialization for bios-settings-manager
Tested: Restarted the biosconfig-manager application and BaseBIOSTable and PendingAttributes were restored.
Signed-off-by: Tom Joseph <tomjoseph@
Add serialization for bios-settings-manager
Tested: Restarted the biosconfig-manager application and BaseBIOSTable and PendingAttributes were restored.
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com> Change-Id: Iddbe69ed45a6895a324d236a14b6f21586315c62
show more ...
|
642f437e | 12-Aug-2020 |
Kuiying Wang <kuiying.wang@intel.com> |
Initial patch for RBC BIOS Config Manager
ResetBIOSSettings is not implemented as part of this patch apart from that GetAttribute, SetAttribute and setters for BaseBIOSTable, PendingAttributes is im
Initial patch for RBC BIOS Config Manager
ResetBIOSSettings is not implemented as part of this patch apart from that GetAttribute, SetAttribute and setters for BaseBIOSTable, PendingAttributes is implemeted.
Interface: xyz.openbmc_project.BIOSConfig.Manager Properties: .BaseBIOSTable property a{s(sbsssvva(sv))} 1 "testAttributeName" "xyz.openbmc_pr... emits-change writable .PendingAttributes property a{s(sv)} 2 "test1" "xyz.openbmc_project.BIOSCo... emits-change writable .ResetBIOSSettings property s "xyz.openbmc_project.BIOSConfig.Manag... emits-change writable Methods: .GetAttribute method s svv - .SetAttribute method sv - -
Tested: 1. Service is working well. 2. All the dbus methods and properties are shown correctly. 3. Unit test done. a). Tree root@intel-obmc:~# busctl tree xyz.openbmc_project.BIOSConfigManager `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/bios_config `-/xyz/openbmc_project/bios_config/manager b). Instrospect root@intel-obmc:~# busctl introspect xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager NAME TYPE SIGNATURE RESULT/VALUE FLAGS org.freedesktop.DBus.Introspectable interface - - - .Introspect method - s - org.freedesktop.DBus.Peer interface - - - .GetMachineId method - s - .Ping method - - - org.freedesktop.DBus.Properties interface - - - .Get method ss v - .GetAll method s a{sv} - .Set method ssv - - .PropertiesChanged signal sa{sv}as - - xyz.openbmc_project.BIOSConfig.Manager interface - - - .GetAttribute method s svv - .SetAttribute method sv - - .BaseBIOSTable property a{s(sbsssvva(sv))} 2 "attr0" "xyz.openbmc_project.BIOSCo... emits-change writable .PendingAttributes property a{s(sv)} 1 "test1" "xyz.openbmc_project.BIOSCo... emits-change writable .ResetBIOSSettings property s "xyz.openbmc_project.BIOSConfig.Manag... emits-change writable c). Method: GetAttribute/SetAttribute root@intel-obmc:~# busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager SetAttribute sv test1 s "value" root@intel-obmc:~# busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager xyz.openbmc_project.BIOSConfig.Manager GetAttribute s test1 svv "xyz.openbmc_project.BIOSConfig.Manager.AttributeType.String" x 0 s "value" d). Service root@intel-obmc:~# systemctl status xyz.openbmc_project.biosconfig_manager * xyz.openbmc_project.biosconfig_manager.service - BIOS Config Manager - For Remote BIOS configuration update Loaded: loaded (8;;file://intel-obmc/lib/systemd/system/xyz.openbmc_project.biosconfig_manager.service/lib/systemd/system/xyz.openbmc_project.biosconfig_manager.service8;;; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/xyz.openbmc_project.biosconfig_manager.service.d `-8;;file://intel-obmc/etc/systemd/system/xyz.openbmc_project.biosconfig_manager.service.d/watchdog.confwatchdog.conf8;; Active: active (running) since Thu 1970-01-01 00:00:56 UTC; 25min ago Main PID: 394 (biosconfig-mana) CGroup: /system.slice/xyz.openbmc_project.biosconfig_manager.service `-394 /usr/bin/biosconfig-manager
Jan 01 00:00:56 intel-obmc systemd[1]: Started BIOS Config Manager - For Remote BIOS configuration update.
Change-Id: I7a7312ffbdf000aab254c77ed5e4f9a8d4ec4d45 Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
show more ...
|
9c82be3b | 22-Jun-2020 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
Initial empty repository
|