diff options
author | Nikita Kosenkov <NKosenkov@IBS.RU> | 2022-09-08 17:09:49 +0300 |
---|---|---|
committer | Nikita Kosenkov <NKosenkov@IBS.RU> | 2022-09-08 17:20:54 +0300 |
commit | 4eb714e1231a9692267c7b69163e3d80513e7f6b (patch) | |
tree | 4f472c34d5ac0d8155e21c1fa11e08f9a87d8da1 /meta-ibs/meta-cp2-5422 | |
parent | f844428f5c50832162cdb67f038c6998f15c004b (diff) | |
download | openbmc-4eb714e1231a9692267c7b69163e3d80513e7f6b.tar.xz |
bmcweb: Applied patches from the 'sila' branch
Diffstat (limited to 'meta-ibs/meta-cp2-5422')
-rw-r--r-- | meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch | 136 | ||||
-rw-r--r-- | meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch | 69 | ||||
-rw-r--r-- | meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0010-Add-smtp-client.patch (renamed from meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/00010-Add-smtp-client.patch) | 0 | ||||
-rw-r--r-- | meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend | 13 |
4 files changed, 5 insertions, 213 deletions
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch deleted file mode 100644 index f7f5145b0c..0000000000 --- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch +++ /dev/null @@ -1,136 +0,0 @@ -From ed5862ee20506cba2c6354a1e8260ef1dc1726ea Mon Sep 17 00:00:00 2001 -From: eportnov <eportnov@ibs.ru> -Date: Fri, 8 Jul 2022 10:31:14 +0300 -Subject: [PATCH] add new cpu fields - ---- - redfish-core/lib/processor.hpp | 106 +++++++++++++++++++++++++++++++++ - 1 file changed, 106 insertions(+) - -diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp -index a7f8a413f..d97d314fd 100644 ---- a/redfish-core/lib/processor.hpp -+++ b/redfish-core/lib/processor.hpp -@@ -66,6 +66,77 @@ inline void getProcessorUUID(std::shared_ptr<bmcweb::AsyncResp> aResp, - }); - } - -+inline std::string translateInstructionSetTypeToRedfish(const std::string& instructionSetType) -+{ -+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.ARM_A32") -+ { -+ return "ARM-A32"; -+ } -+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.ARM_A64") -+ { -+ return "ARM-A64"; -+ } -+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.IA_64") -+ { -+ return "IA-64"; -+ } -+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.MIPS32") -+ { -+ return "MIPS32"; -+ } -+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.MIPS64") -+ { -+ return "MIPS64"; -+ } -+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.OEM") -+ { -+ return "OEM"; -+ } -+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.PowerISA") -+ { -+ return "PowerISA"; -+ } -+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.x86") -+ { -+ return "x86"; -+ } -+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.x86_64") -+ { -+ return "x86-64"; -+ } -+ return ""; -+} -+ -+inline std::string translateProcessorArchTypeToRedfish(const std::string& processorArchType) -+{ -+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.ARM") -+ { -+ return "ARM"; -+ } -+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.IA_64") -+ { -+ return "IA-64"; -+ } -+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.MIPS") -+ { -+ return "MIPS"; -+ } -+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.OEM") -+ { -+ return "OEM"; -+ } -+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.Power") -+ { -+ return "Power"; -+ } -+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.x86") -+ { -+ return "x86"; -+ } -+ return ""; -+} -+ -+ - inline void getCpuDataByInterface( - const std::shared_ptr<bmcweb::AsyncResp>& aResp, - const dbus::utility::DBusInteracesMap& cpuInterfacesProperties) -@@ -144,6 +215,41 @@ inline void getCpuDataByInterface( - aResp->res.jsonValue["TotalThreads"] = *value; - } - } -+ else if (property.first == "InstructionSet") -+ { -+ const std::string* value = -+ std::get_if<std::string>(&property.second); -+ if (value != nullptr) -+ { -+ aResp->res.jsonValue["InstructionSet"] = translateInstructionSetTypeToRedfish(*value); -+ } -+ } -+ else if (property.first == "Version") -+ { -+ const std::string* value = -+ std::get_if<std::string>(&property.second); -+ if (value != nullptr) -+ { -+ aResp->res.jsonValue["Version"] = *value; -+ } -+ } -+ else if (property.first == "ProcessorArchitecture") -+ { -+ const std::string* value = -+ std::get_if<std::string>(&property.second); -+ if (value != nullptr) -+ { -+ aResp->res.jsonValue["ProcessorArchitecture"] = translateProcessorArchTypeToRedfish(*value); -+ } -+ } -+ else if (property.first == "MinSpeedMHz") -+ { -+ const uint32_t* value = std::get_if<uint32_t>(&property.second); -+ if (value != nullptr) -+ { -+ aResp->res.jsonValue["MinSpeedMHz"] = *value; -+ } -+ } - else if (property.first == "EffectiveFamily") - { - const uint16_t* value = std::get_if<uint16_t>(&property.second); --- -2.35.1 - diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch deleted file mode 100644 index 13b880457e..0000000000 --- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 824ef06312f5457fa6ab7d8ef08d160f3dc888a9 Mon Sep 17 00:00:00 2001 -From: eportnov <eportnov@ibs.ru> -Date: Fri, 8 Jul 2022 16:30:51 +0300 -Subject: [PATCH] add new dimm fields - ---- - redfish-core/lib/memory.hpp | 25 ++++++++++++++++++++++++- - 1 file changed, 24 insertions(+), 1 deletion(-) - -diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp -index 3c10130e5..be3af6fb3 100644 ---- a/redfish-core/lib/memory.hpp -+++ b/redfish-core/lib/memory.hpp -@@ -31,6 +31,10 @@ namespace redfish - - inline std::string translateMemoryTypeToRedfish(const std::string& memoryType) - { -+ if (memoryType == "xyz.openbmc_project.Inventory.Item.Dimm.DeviceType.DRAM") -+ { -+ return "DRAM"; -+ } - if (memoryType == "xyz.openbmc_project.Inventory.Item.Dimm.DeviceType.DDR") - { - return "DDR"; -@@ -470,6 +474,7 @@ inline void - messages::internalError(aResp->res); - return; - } -+ aResp->res.jsonValue["MemorySize"] = (*memorySize); - aResp->res.jsonValue[jsonPtr]["CapacityMiB"] = (*memorySize >> 10); - } - else if (property.first == "PartNumber") -@@ -634,7 +639,7 @@ inline void - // so just leave off - if (!memoryDeviceType.empty()) - { -- aResp->res.jsonValue[jsonPtr]["MemoryDeviceType"] = -+ aResp->res.jsonValue[jsonPtr]["MemoryType"] = - memoryDeviceType; - } - if (value->find("DDR") != std::string::npos) -@@ -647,6 +652,24 @@ inline void - } - } - } -+ else if (property.first == "Model") -+ { -+ const auto* value = -+ std::get_if<std::string>(&property.second); -+ if (value != nullptr) -+ { -+ aResp->res.jsonValue["Model"] = *value; -+ } -+ } -+ else if (property.first == "Description") -+ { -+ const auto* value = -+ std::get_if<std::string>(&property.second); -+ if (value != nullptr) -+ { -+ aResp->res.jsonValue["Description"] = *value; -+ } -+ } - // memory location interface - else if (property.first == "Channel" || - property.first == "MemoryController" || --- -2.35.1 - diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/00010-Add-smtp-client.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0010-Add-smtp-client.patch index 7b0172c881..7b0172c881 100644 --- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/00010-Add-smtp-client.patch +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0010-Add-smtp-client.patch diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend index 69ce3be11a..a6258f3f6e 100644 --- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -2,19 +2,16 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "\ file://0001-IBS-Default-BMC-Name-and-Model.patch \ + file://0005-Fix-keep-and-re-send-initial-negotiation-data-from-W.patch \ + file://0006-fix-bug-empty-pcie-functions.patch \ + file://0007-Removed-non-working-boot-override-modes.patch \ + file://0008-Add-pcie-device-names.patch \ + file://0010-Add-smtp-client.patch \ " #SRC_URI += "\ -# file://0001-IBS-Default-BMC-Name-and-Model.patch \ -# file://0002-add-new-cpu-fields.patch \ -# file://0003-add-new-dimm-fields.patch \ # file://0004-configure-telemetry.patch \ -# file://0005-Fix-keep-and-re-send-initial-negotiation-data-from-W.patch \ -# file://0006-fix-bug-empty-pcie-functions.patch \ -# file://0007-Removed-non-working-boot-override-modes.patch \ -# file://0008-Add-pcie-device-names.patch \ # file://0009-fix-circular-buffer-telemetry.patch \ -# file://00010-Add-smtp-client.patch \ # " EXTRA_OEMESON += "\ |