diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig')
2 files changed, 33 insertions, 21 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0001-Define-Redfish-interface-Registries-Bios.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0001-Define-Redfish-interface-Registries-Bios.patch index 19a392873..57c183c76 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0001-Define-Redfish-interface-Registries-Bios.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0001-Define-Redfish-interface-Registries-Bios.patch @@ -1,4 +1,4 @@ -From bde7f728d5a87522674bcd5515baaa02bf7b9373 Mon Sep 17 00:00:00 2001 +From 7956c74860a39e75d80f0caadcfbd5570569717d Mon Sep 17 00:00:00 2001 From: Kuiying Wang <kuiying.wang@intel.com> Date: Fri, 4 Sep 2020 19:24:25 +0800 Subject: [PATCH] Define Redfish interface "/Registries/Bios" and enable @@ -226,6 +226,7 @@ Oem - Resource.Oem No Optional Change-Id: Iecc61018c350f0b8c89df59b2864b941508b1916 Signed-off-by: Kuiying Wang <kuiying.wang@intel.com> Signed-off-by: Snehalatha Venkatesh <snehalathax.v@intel.com> +Signed-off-by: Smriti Ayushi <smriti.ayushi@intel.com> --- redfish-core/include/redfish.hpp | 3 + .../include/registries/bios_registry.hpp | 41 ++ @@ -235,7 +236,7 @@ Signed-off-by: Snehalatha Venkatesh <snehalathax.v@intel.com> create mode 100644 redfish-core/include/registries/bios_registry.hpp diff --git a/redfish-core/include/redfish.hpp b/redfish-core/include/redfish.hpp -index 0a97150..07a9417 100644 +index 2479332..8bd4bf8 100644 --- a/redfish-core/include/redfish.hpp +++ b/redfish-core/include/redfish.hpp @@ -148,7 +148,10 @@ class RedfishService @@ -297,7 +298,7 @@ index 0000000..c80937a +}; +} // namespace redfish::message_registries::bios diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp -index c2fb284..87536d6 100644 +index c2fb284..9d7157c 100644 --- a/redfish-core/lib/bios.hpp +++ b/redfish-core/lib/bios.hpp @@ -3,8 +3,140 @@ @@ -451,7 +452,7 @@ index c2fb284..87536d6 100644 + {"SettingsObject", + {{"@odata.id", "/redfish/v1/Systems/system/Bios/Settings"}}}}; + asyncResp->res.jsonValue["AttributeRegistry"] = "BiosAttributeRegistry"; -+ asyncResp->res.jsonValue["Attributes"] = {}; ++ asyncResp->res.jsonValue["Attributes"] = nlohmann::json::object(); + + crow::connections::systemBus->async_method_call( + [asyncResp](const boost::system::error_code ec, @@ -835,7 +836,7 @@ index c2fb284..87536d6 100644 * BiosReset class supports handle POST method for Reset bios. * The class retrieves and sends data directly to D-Bus. diff --git a/redfish-core/lib/message_registries.hpp b/redfish-core/lib/message_registries.hpp -index 43359e3..b2fb43c 100644 +index ae02189..510b19a 100644 --- a/redfish-core/lib/message_registries.hpp +++ b/redfish-core/lib/message_registries.hpp @@ -17,6 +17,7 @@ diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0006-Add-fix-for-broken-feature-Pending-Attributes.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0006-Add-fix-for-broken-feature-Pending-Attributes.patch index 85b5b3494..e7036c28c 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0006-Add-fix-for-broken-feature-Pending-Attributes.patch +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/biosconfig/0006-Add-fix-for-broken-feature-Pending-Attributes.patch @@ -1,6 +1,6 @@ -From 8225b2dc07279c65cdfe2ddc13964d84fd2ed8bb Mon Sep 17 00:00:00 2001 +From 5ba2b29277e982fddaf8622af39902b6a046e259 Mon Sep 17 00:00:00 2001 From: Arun Lal K M <arun.lal@intel.com> -Date: Tue, 4 Jan 2022 01:56:57 +0000 +Date: Wed, 19 Jan 2022 14:44:07 +0000 Subject: [PATCH] Add fix for broken feature 'Pending Attributes'. Fix is added for the following: @@ -11,6 +11,7 @@ Fix is added for the following: 5) POST to '/redfish/v1/Systems/system/Bios/Actions /Bios.ChangePassword/'. 6) Add support for Enumeration. +7) Support DMTF standard of displaying "Value" in BIOS attribute registries. Tested: By giving PATCH to 'redfish/v1/Systems/system/Bios/Settings' @@ -134,11 +135,11 @@ Validation has succeeded. Signed-off-by: Arun Lal K M <arun.lal@intel.com> Signed-off-by: Snehalatha Venkatesh <snehalathax.v@intel.com> --- - redfish-core/lib/bios.hpp | 592 ++++++++++++++++++++++++-------------- - 1 file changed, 383 insertions(+), 209 deletions(-) + redfish-core/lib/bios.hpp | 602 +++++++++++++++++++++++++------------- + 1 file changed, 391 insertions(+), 211 deletions(-) diff --git a/redfish-core/lib/bios.hpp b/redfish-core/lib/bios.hpp -index 0bb0b9e..69340eb 100644 +index f6d6eff..c327053 100644 --- a/redfish-core/lib/bios.hpp +++ b/redfish-core/lib/bios.hpp @@ -12,13 +12,15 @@ map{attributeName,struct{attributeType,readonlyStatus,displayname, @@ -637,9 +638,9 @@ index 0bb0b9e..69340eb 100644 BMCWEB_LOG_ERROR - << "doPatch resp_handler got error " << ec; + << "getBiosAttributes DBUS error: " << ec; - messages::internalError(asyncResp->res); - return; - } ++ messages::internalError(asyncResp->res); ++ return; ++ } + + const BiosBaseTableType* baseBiosTable = + std::get_if<BiosBaseTableType>(&retBiosTable); @@ -647,9 +648,9 @@ index 0bb0b9e..69340eb 100644 + if (baseBiosTable == nullptr) + { + BMCWEB_LOG_ERROR << "baseBiosTable is empty."; -+ messages::internalError(asyncResp->res); -+ return; -+ } + messages::internalError(asyncResp->res); + return; + } + + PendingAttributesType pendingAttributes{}; + @@ -895,10 +896,11 @@ index 0bb0b9e..69340eb 100644 } if (optItemTypeRedfish == "OneOf") { -@@ -671,6 +817,17 @@ inline void requestRoutesBiosAttributeRegistry(App& app) +@@ -671,7 +817,21 @@ inline void requestRoutesBiosAttributeRegistry(App& app) std::get_if<std::string>( &std::get<optItemValue>( optItem)); +- optItemJson[optItemTypeRedfish] = + + if (!currValue) + { @@ -910,13 +912,18 @@ index 0bb0b9e..69340eb 100644 + continue; + } + - optItemJson[optItemTypeRedfish] = ++ optItemJson["ValueDisplayName"] = ++ currValue != nullptr ? *currValue ++ : ""; ++ optItemJson["ValueName"] = currValue != nullptr ? *currValue : ""; -@@ -681,6 +838,17 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + } +@@ -681,7 +841,21 @@ inline void requestRoutesBiosAttributeRegistry(App& app) std::get_if<int64_t>( &std::get<optItemValue>( optItem)); +- optItemJson[optItemTypeRedfish] = + + if (!currValue) + { @@ -928,10 +935,14 @@ index 0bb0b9e..69340eb 100644 + continue; + } + - optItemJson[optItemTypeRedfish] = ++ optItemJson["ValueDisplayName"] = ++ currValue != nullptr ? *currValue ++ : 0; ++ optItemJson["ValueName"] = currValue != nullptr ? *currValue : 0; -@@ -689,6 +857,12 @@ inline void requestRoutesBiosAttributeRegistry(App& app) + } +@@ -689,6 +863,12 @@ inline void requestRoutesBiosAttributeRegistry(App& app) optionsArray.push_back(optItemJson); } |