smbios-mdr: Remove unused patches

These 2 patches had been upstreamed and brought in with srcrev bumps a
long time ago, but we never removed them.

Remove them from the files to avoid confusion:

Tested: No-op / no code uses them.
Fusion-Link: fusion2 N/A, no code change

Google-Bug-Id: 301192077
Google-Bug-Id: 300011331
Google-Bug-Id: 438992572
Change-Id: I909fc9abf1a5eea7b86bd9ea05d6f2bdbb5df2b2
Signed-off-by: Brandon Kim <brandonkim@google.com>
diff --git a/recipes-phosphor/smbios/smbios-mdr/0009-Refactored-MDRV2-class-to-allow-more-than-one.patch b/recipes-phosphor/smbios/smbios-mdr/0009-Refactored-MDRV2-class-to-allow-more-than-one.patch
deleted file mode 100644
index 586f208..0000000
--- a/recipes-phosphor/smbios/smbios-mdr/0009-Refactored-MDRV2-class-to-allow-more-than-one.patch
+++ /dev/null
@@ -1,590 +0,0 @@
-From 9572d6a7be1e0bf9025d8945ed81725def6eaa5e Mon Sep 17 00:00:00 2001
-From: Josh Lehan <krellan@google.com>
-Date: Mon, 11 Sep 2023 05:28:19 -0700
-Subject: [PATCH 09/11] Refactored MDRV2 class to allow more than one
-
-Refactored the main MDRV2 class to allow more than one object of this
-class to exist at the same time. All hardcoded paths have been made
-parameters to the constructor, so that they can be varied at runtime as
-needed, to avoid overlap.
-
-Also did some necessary internal cleanups to facilitate this.
-
-Tested: Created multiple copies of the MDRV2 object at the same time,
-it worked, all appeared on D-Bus, under distinct object paths and
-inventory paths. Destructed the MDRV2 object, it disappeared from
-D-Bus, constructed it again, it came back.
-
-https://gist.github.com/Krellan/6930bc2ed1ac16b93afcc3a12c02e545
-
-Patch Tracking Bug: b/300011331
-Upstream info / review: https://gerrit.openbmc.org/c/openbmc/smbios-mdr/+/66559
-Upstream-Status: Submitted
-Justification: Pending upstream review
-
-In-Review: https://gerrit.openbmc.org/c/openbmc/smbios-mdr/+/66559
-Change-Id: Iaa6e46958c8b4957e51dcc87b2181096b085b738
-Google-Bug-Id: 289445587
-Signed-off-by: Josh Lehan <krellan@google.com>
-
-%% original patch: 0009-Refactored-MDRV2-class-to-allow-more-than-one.patch
----
- include/mdrv2.hpp                 |  72 ++++++++++++++++----
- include/smbios_mdrv2.hpp          |  16 ++---
- include/system.hpp                |  18 +++--
- src/mdrv2.cpp                     | 105 ++++++++++++++++++++----------
- src/mdrv2_main.cpp                |  24 ++++---
- src/smbios-ipmi-blobs/handler.cpp |  17 +++--
- src/system.cpp                    |   4 +-
- 7 files changed, 173 insertions(+), 83 deletions(-)
-
-diff --git a/include/mdrv2.hpp b/include/mdrv2.hpp
-index 65890ed..4ad3fb4 100644
---- a/include/mdrv2.hpp
-+++ b/include/mdrv2.hpp
-@@ -36,29 +36,46 @@
- #include <sdbusplus/timer.hpp>
- #include <xyz/openbmc_project/Smbios/MDR_V2/server.hpp>
- 
--sdbusplus::asio::object_server& getObjectServer(void);
-+#include <filesystem>
-+#include <memory>
- 
--using RecordVariant =
--    std::variant<std::string, uint64_t, uint32_t, uint16_t, uint8_t>;
- namespace phosphor
- {
- namespace smbios
- {
- 
--static constexpr const char* mdrV2Path = "/xyz/openbmc_project/Smbios/MDR_V2";
--static constexpr const char* smbiosPath = "/xyz/openbmc_project/Smbios";
-+using RecordVariant =
-+    std::variant<std::string, uint64_t, uint32_t, uint16_t, uint8_t>;
-+
-+static constexpr const char* defaultObjectPath =
-+    "/xyz/openbmc_project/Smbios/MDR_V2";
- static constexpr const char* smbiosInterfaceName =
-     "xyz.openbmc_project.Smbios.GetRecordType";
- static constexpr const char* mapperBusName = "xyz.openbmc_project.ObjectMapper";
- static constexpr const char* mapperPath = "/xyz/openbmc_project/object_mapper";
- static constexpr const char* mapperInterface =
-     "xyz.openbmc_project.ObjectMapper";
--static constexpr const char* systemInterfacePath =
-+static constexpr const char* defaultInventoryPath =
-     "/xyz/openbmc_project/inventory/system";
- static constexpr const char* systemInterface =
-     "xyz.openbmc_project.Inventory.Item.System";
- constexpr const int limitEntryLen = 0xff;
- 
-+// Avoid putting multiple interfaces with same name on same object
-+static std::string getInterfaceFromObjectPath(const std::string& objectPath)
-+{
-+    if (objectPath != defaultObjectPath)
-+    {
-+        // Place GetRecordType interface on object itself, not parent
-+        return objectPath;
-+    }
-+
-+    std::filesystem::path path(objectPath);
-+
-+    // As there is only one default, safe to place it on the common parent
-+    return path.parent_path().string();
-+}
-+
- class MDRV2 :
-     sdbusplus::server::object_t<
-         sdbusplus::server::xyz::openbmc_project::smbios::MDRV2>
-@@ -69,15 +86,38 @@ class MDRV2 :
-     MDRV2& operator=(const MDRV2&) = delete;
-     MDRV2(MDRV2&&) = delete;
-     MDRV2& operator=(MDRV2&&) = delete;
--    ~MDRV2() = default;
- 
--    MDRV2(sdbusplus::bus_t& bus, const char* path,
--          boost::asio::io_context& io) :
-+    virtual ~MDRV2()
-+    {
-+        if (smbiosInterface)
-+        {
-+            if (objServer)
-+            {
-+                // Must manually undo add_interface()
-+                objServer->remove_interface(smbiosInterface);
-+            }
-+        }
-+    }
-+
-+    MDRV2(std::shared_ptr<boost::asio::io_context> io,
-+          std::shared_ptr<sdbusplus::asio::connection> conn,
-+          std::shared_ptr<sdbusplus::asio::object_server> obj,
-+          std::string filePath, std::string objectPath,
-+          std::string inventoryPath) :
-         sdbusplus::server::object_t<
--            sdbusplus::server::xyz::openbmc_project::smbios::MDRV2>(bus, path),
--        timer(io), bus(bus), smbiosInterface(getObjectServer().add_interface(
--                                 smbiosPath, smbiosInterfaceName))
-+            sdbusplus::server::xyz::openbmc_project::smbios::MDRV2>(
-+            *conn, objectPath.c_str()),
-+        timer(*io), bus(conn), objServer(std::move(obj)),
-+        smbiosInterface(objServer->add_interface(
-+            getInterfaceFromObjectPath(objectPath), smbiosInterfaceName)),
-+        smbiosFilePath(std::move(filePath)),
-+        smbiosObjectPath(std::move(objectPath)),
-+        smbiosInventoryPath(std::move(inventoryPath))
-     {
-+        lg2::info("SMBIOS data file path: {F}", "F", smbiosFilePath);
-+        lg2::info("SMBIOS control object: {O}", "O", smbiosObjectPath);
-+        lg2::info("SMBIOS inventory path: {I}", "I", smbiosInventoryPath);
-+
-         smbiosDir.agentVersion = smbiosAgentVersion;
-         smbiosDir.dirVersion = 1;
-         smbiosDir.dirEntries = 1;
-@@ -127,7 +167,8 @@ class MDRV2 :
-   private:
-     boost::asio::steady_timer timer;
- 
--    sdbusplus::bus_t& bus;
-+    std::shared_ptr<sdbusplus::asio::connection> bus;
-+    std::shared_ptr<sdbusplus::asio::object_server> objServer;
- 
-     Mdr2DirStruct smbiosDir;
- 
-@@ -151,6 +192,11 @@ class MDRV2 :
-     std::vector<std::unique_ptr<Pcie>> pcies;
-     std::unique_ptr<System> system;
-     std::shared_ptr<sdbusplus::asio::dbus_interface> smbiosInterface;
-+
-+    std::string smbiosFilePath;
-+    std::string smbiosObjectPath;
-+    std::string smbiosInventoryPath;
-+    std::unique_ptr<sdbusplus::bus::match_t> motherboardConfigMatch;
- };
- 
- } // namespace smbios
-diff --git a/include/smbios_mdrv2.hpp b/include/smbios_mdrv2.hpp
-index 0b4638a..5f77699 100644
---- a/include/smbios_mdrv2.hpp
-+++ b/include/smbios_mdrv2.hpp
-@@ -19,9 +19,9 @@
- #include <phosphor-logging/elog-errors.hpp>
- 
- #include <array>
-+#include <string>
- 
--static constexpr const char* mdrType2File = "/var/lib/smbios/smbios2";
--static constexpr const char* smbiosPath = "/var/lib/smbios";
-+static constexpr const char* mdrDefaultFile = "/var/lib/smbios/smbios2";
- 
- static constexpr uint16_t mdrSMBIOSSize = 32 * 1024;
- 
-@@ -155,17 +155,13 @@ struct EntryPointStructure30
-     uint64_t structTableAddr;
- } __attribute__((packed));
- 
--static constexpr const char* cpuPath =
--    "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu";
-+static constexpr const char* cpuSuffix = "/chassis/motherboard/cpu";
- 
--static constexpr const char* dimmPath =
--    "/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm";
-+static constexpr const char* dimmSuffix = "/chassis/motherboard/dimm";
- 
--static constexpr const char* pciePath =
--    "/xyz/openbmc_project/inventory/system/chassis/motherboard/pcieslot";
-+static constexpr const char* pcieSuffix = "/chassis/motherboard/pcieslot";
- 
--static constexpr const char* systemPath =
--    "/xyz/openbmc_project/inventory/system/chassis/motherboard/bios";
-+static constexpr const char* systemSuffix = "/chassis/motherboard/bios";
- 
- constexpr std::array<SMBIOSVersion, 3> supportedSMBIOSVersions{
-     SMBIOSVersion{3, 2}, SMBIOSVersion{3, 3}, SMBIOSVersion{3, 5}};
-diff --git a/include/system.hpp b/include/system.hpp
-index 4753a01..ac75a0c 100644
---- a/include/system.hpp
-+++ b/include/system.hpp
-@@ -17,6 +17,7 @@
- #pragma once
- #include "smbios_mdrv2.hpp"
- 
-+#include <sdbusplus/asio/connection.hpp>
- #include <xyz/openbmc_project/Common/UUID/server.hpp>
- #include <xyz/openbmc_project/Inventory/Decorator/Revision/server.hpp>
- 
-@@ -40,15 +41,17 @@ class System :
-     System(System&&) = default;
-     System& operator=(System&&) = default;
- 
--    System(sdbusplus::bus_t& bus, const std::string& objPath,
--           uint8_t* smbiosTableStorage) :
-+    System(std::shared_ptr<sdbusplus::asio::connection> bus,
-+           std::string objPath, uint8_t* smbiosTableStorage,
-+           std::string filePath) :
-         sdbusplus::server::object_t<
-             sdbusplus::server::xyz::openbmc_project::common::UUID>(
--            bus, objPath.c_str()),
-+            *bus, objPath.c_str()),
-         sdbusplus::server::object_t<sdbusplus::server::xyz::openbmc_project::
-                                         inventory::decorator::Revision>(
--            bus, objPath.c_str()),
--        bus(bus), path(objPath), storage(smbiosTableStorage)
-+            *bus, objPath.c_str()),
-+        bus(std::move(bus)), path(std::move(objPath)),
-+        storage(smbiosTableStorage), smbiosFilePath(std::move(filePath))
-     {
-         std::string input = "0";
-         uuid(input);
-@@ -58,7 +61,8 @@ class System :
-     std::string uuid(std::string value) override;
- 
-     std::string version(std::string value) override;
--    sdbusplus::bus_t& bus;
-+
-+    std::shared_ptr<sdbusplus::asio::connection> bus;
- 
-   private:
-     /** @brief Path of the group instance */
-@@ -108,6 +112,8 @@ class System :
-         uint8_t skuNum;
-         uint8_t family;
-     } __attribute__((packed));
-+
-+    std::string smbiosFilePath;
- };
- 
- } // namespace smbios
-diff --git a/src/mdrv2.cpp b/src/mdrv2.cpp
-index aba2775..99dc302 100644
---- a/src/mdrv2.cpp
-+++ b/src/mdrv2.cpp
-@@ -35,7 +35,7 @@ std::vector<uint8_t> MDRV2::getDirectoryInformation(uint8_t dirIndex)
- {
-     std::vector<uint8_t> responseDir;
- 
--    std::ifstream smbiosFile(mdrType2File, std::ios_base::binary);
-+    std::ifstream smbiosFile(smbiosFilePath, std::ios_base::binary);
-     if (!smbiosFile.good())
-     {
-         phosphor::logging::log<phosphor::logging::level::ERR>(
-@@ -216,7 +216,7 @@ bool MDRV2::readDataFromFlash(MDRSMBIOSHeader* mdrHdr, uint8_t* data)
-             "Read data from flash error - Invalid data point");
-         return false;
-     }
--    std::ifstream smbiosFile(mdrType2File, std::ios_base::binary);
-+    std::ifstream smbiosFile(smbiosFilePath, std::ios_base::binary);
-     if (!smbiosFile.good())
-     {
-         phosphor::logging::log<phosphor::logging::level::ERR>(
-@@ -377,7 +377,7 @@ int MDRV2::findIdIndex(std::vector<uint8_t> dataInfo)
- 
- uint8_t MDRV2::directoryEntries(uint8_t value)
- {
--    std::ifstream smbiosFile(mdrType2File, std::ios_base::binary);
-+    std::ifstream smbiosFile(smbiosFilePath, std::ios_base::binary);
-     if (!smbiosFile.good())
-     {
-         phosphor::logging::log<phosphor::logging::level::ERR>(
-@@ -394,53 +394,88 @@ uint8_t MDRV2::directoryEntries(uint8_t value)
- 
- void MDRV2::systemInfoUpdate()
- {
-+    // By default, look for System interface on any system/board/* object
-+    std::string mapperAncestorPath = smbiosInventoryPath;
-+    std::string matchParentPath = smbiosInventoryPath + "/board/";
-+    bool requireExactMatch = false;
-+
-+    // If customized, look for System on only that custom object
-+    if (smbiosInventoryPath != defaultInventoryPath)
-+    {
-+        std::filesystem::path path(smbiosInventoryPath);
-+
-+        // Search under parent to find exact match for self
-+        mapperAncestorPath = path.parent_path().string();
-+        matchParentPath = mapperAncestorPath;
-+        requireExactMatch = true;
-+    }
-+
-     std::string motherboardPath;
--    auto method = bus.new_method_call(mapperBusName, mapperPath,
--                                      mapperInterface, "GetSubTreePaths");
--    method.append(systemInterfacePath);
-+    auto method = bus->new_method_call(mapperBusName, mapperPath,
-+                                       mapperInterface, "GetSubTreePaths");
-+    method.append(mapperAncestorPath);
-     method.append(0);
-     method.append(std::vector<std::string>({systemInterface}));
- 
-     try
-     {
-         std::vector<std::string> paths;
--        sdbusplus::message_t reply = bus.call(method);
-+        sdbusplus::message_t reply = bus->call(method);
-         reply.read(paths);
--        if (paths.size() < 1)
-+
-+        size_t pathsCount = paths.size();
-+        for (size_t i = 0; i < pathsCount; ++i)
-+        {
-+            if (requireExactMatch && (paths[i] != smbiosInventoryPath))
-+            {
-+                continue;
-+            }
-+
-+            motherboardPath = std::move(paths[i]);
-+            break;
-+        }
-+
-+        if (motherboardPath.empty())
-         {
-             phosphor::logging::log<phosphor::logging::level::ERR>(
-                 "Failed to get system motherboard dbus path. Setting up a "
-                 "match rule");
--            // Add match rule if motherboard dbus path is not yet created
--            static std::unique_ptr<sdbusplus::bus::match_t>
-+
-+            if (!motherboardConfigMatch)
-+            {
-                 motherboardConfigMatch =
-                     std::make_unique<sdbusplus::bus::match_t>(
--                        bus,
-+                        *bus,
-                         sdbusplus::bus::match::rules::interfacesAdded() +
-                             sdbusplus::bus::match::rules::argNpath(
--                                0,
--                                "/xyz/openbmc_project/inventory/system/board/"),
-+                                0, matchParentPath),
-                         [this](sdbusplus::message_t& msg) {
--                sdbusplus::message::object_path objectName;
--                boost::container::flat_map<
--                    std::string,
-+                    sdbusplus::message::object_path objectName;
-                     boost::container::flat_map<
--                        std::string, std::variant<std::string, uint64_t>>>
--                    msgData;
--                msg.read(objectName, msgData);
--                if (msgData.contains(systemInterface))
--                {
--                    this->systemInfoUpdate();
--                }
-+                        std::string,
-+                        boost::container::flat_map<
-+                            std::string, std::variant<std::string, uint64_t>>>
-+                        msgData;
-+                    msg.read(objectName, msgData);
-+                    if (msgData.contains(systemInterface))
-+                    {
-+                        systemInfoUpdate();
-+                    }
-                         });
-+            }
-         }
-         else
-         {
--            motherboardPath = std::move(paths[0]);
-+            lg2::info(
-+                "Found Inventory anchor object for SMBIOS content {I}: {M}",
-+                "I", smbiosInventoryPath, "M", motherboardPath);
-         }
-     }
-     catch (const sdbusplus::exception_t& e)
-     {
-+        lg2::error(
-+            "Exception while trying to find Inventory anchor object for SMBIOS content {I}: {E}",
-+            "I", smbiosInventoryPath, "E", e.what());
-         phosphor::logging::log<phosphor::logging::level::ERR>(
-             "Failed to query system motherboard",
-             phosphor::logging::entry("ERROR=%s", e.what()));
-@@ -462,11 +497,12 @@ void MDRV2::systemInfoUpdate()
- 
-     for (unsigned int index = 0; index < *num; index++)
-     {
--        std::string path = cpuPath + std::to_string(index);
-+        std::string path = smbiosInventoryPath + cpuSuffix +
-+                           std::to_string(index);
-         if (index + 1 > cpus.size())
-         {
-             cpus.emplace_back(std::make_unique<phosphor::smbios::Cpu>(
--                bus, path, index, smbiosDir.dir[smbiosDirIndex].dataStorage,
-+                *bus, path, index, smbiosDir.dir[smbiosDirIndex].dataStorage,
-                 motherboardPath));
-         }
-         else
-@@ -494,11 +530,12 @@ void MDRV2::systemInfoUpdate()
- 
-     for (unsigned int index = 0; index < *num; index++)
-     {
--        std::string path = dimmPath + std::to_string(index);
-+        std::string path = smbiosInventoryPath + dimmSuffix +
-+                           std::to_string(index);
-         if (index + 1 > dimms.size())
-         {
-             dimms.emplace_back(std::make_unique<phosphor::smbios::Dimm>(
--                bus, path, index, smbiosDir.dir[smbiosDirIndex].dataStorage,
-+                *bus, path, index, smbiosDir.dir[smbiosDirIndex].dataStorage,
-                 motherboardPath));
-         }
-         else
-@@ -526,11 +563,12 @@ void MDRV2::systemInfoUpdate()
- 
-     for (unsigned int index = 0; index < *num; index++)
-     {
--        std::string path = pciePath + std::to_string(index);
-+        std::string path = smbiosInventoryPath + pcieSuffix +
-+                           std::to_string(index);
-         if (index + 1 > pcies.size())
-         {
-             pcies.emplace_back(std::make_unique<phosphor::smbios::Pcie>(
--                bus, path, index, smbiosDir.dir[smbiosDirIndex].dataStorage,
-+                *bus, path, index, smbiosDir.dir[smbiosDirIndex].dataStorage,
-                 motherboardPath));
-         }
-         else
-@@ -541,8 +579,9 @@ void MDRV2::systemInfoUpdate()
-     }
- 
-     system.reset();
--    system = std::make_unique<System>(
--        bus, systemPath, smbiosDir.dir[smbiosDirIndex].dataStorage);
-+    system = std::make_unique<System>(bus, smbiosInventoryPath + systemSuffix,
-+                                      smbiosDir.dir[smbiosDirIndex].dataStorage,
-+                                      smbiosFilePath);
- }
- 
- std::optional<size_t> MDRV2::getTotalCpuSlot()
-@@ -768,7 +807,7 @@ std::vector<uint32_t> MDRV2::synchronizeDirectoryCommonData(uint8_t idIndex,
- 
-     timer.expires_after(usec);
-     timer.async_wait([this](boost::system::error_code ec) {
--        if (ec || this == nullptr)
-+        if (ec)
-         {
-             phosphor::logging::log<phosphor::logging::level::ERR>(
-                 "Timer Error!");
-diff --git a/src/mdrv2_main.cpp b/src/mdrv2_main.cpp
-index 643afae..b895c8b 100644
---- a/src/mdrv2_main.cpp
-+++ b/src/mdrv2_main.cpp
-@@ -26,24 +26,22 @@
- #include <sdbusplus/asio/connection.hpp>
- #include <sdbusplus/asio/object_server.hpp>
- 
--auto io = std::make_shared<boost::asio::io_context>();
--auto connection = std::make_shared<sdbusplus::asio::connection>(*io);
--auto objServer = sdbusplus::asio::object_server(connection);
--
--sdbusplus::asio::object_server& getObjectServer(void)
-+int main()
- {
--    return objServer;
--}
-+    auto io = std::make_shared<boost::asio::io_context>();
-+    auto connection = std::make_shared<sdbusplus::asio::connection>(*io);
-+    auto objServer =
-+        std::make_shared<sdbusplus::asio::object_server>(connection);
- 
--int main(void)
--{
--    sdbusplus::bus_t& bus = static_cast<sdbusplus::bus_t&>(*connection);
--    sdbusplus::server::manager_t objManager(bus,
-+    sdbusplus::server::manager_t objManager(*connection,
-                                             "/xyz/openbmc_project/inventory");
- 
--    bus.request_name("xyz.openbmc_project.Smbios.MDR_V2");
-+    connection->request_name("xyz.openbmc_project.Smbios.MDR_V2");
- 
--    phosphor::smbios::MDRV2 mdrV2(bus, phosphor::smbios::mdrV2Path, *io);
-+    auto mdrV2 = std::make_shared<phosphor::smbios::MDRV2>(
-+        io, connection, objServer, mdrDefaultFile,
-+        phosphor::smbios::defaultObjectPath,
-+        phosphor::smbios::defaultInventoryPath);
- 
- #ifdef GRPC_BLOB
-     blobs::SmbiosGrpcServer smbiosGrpcServer(io);
-diff --git a/src/smbios-ipmi-blobs/handler.cpp b/src/smbios-ipmi-blobs/handler.cpp
-index 4b1841f..ddd411e 100644
---- a/src/smbios-ipmi-blobs/handler.cpp
-+++ b/src/smbios-ipmi-blobs/handler.cpp
-@@ -15,6 +15,7 @@
- #include <algorithm>
- #include <cstdint>
- #include <ctime>
-+#include <filesystem>
- #include <fstream>
- #include <memory>
- #include <string>
-@@ -34,7 +35,7 @@ bool syncSmbiosData()
-     bool status = false;
-     sdbusplus::bus_t bus = sdbusplus::bus_t(ipmid_get_sd_bus_connection());
-     sdbusplus::message_t method =
--        bus.new_method_call(mdrV2Service, phosphor::smbios::mdrV2Path,
-+        bus.new_method_call(mdrV2Service, phosphor::smbios::defaultObjectPath,
-                             mdrV2Interface, "AgentSynchronizeData");
- 
-     try
-@@ -48,7 +49,8 @@ bool syncSmbiosData()
-             "Error Sync data with service",
-             phosphor::logging::entry("ERROR=%s", e.what()),
-             phosphor::logging::entry("SERVICE=%s", mdrV2Service),
--            phosphor::logging::entry("PATH=%s", phosphor::smbios::mdrV2Path));
-+            phosphor::logging::entry("PATH=%s",
-+                                     phosphor::smbios::defaultObjectPath));
-         return false;
-     }
- 
-@@ -191,23 +193,26 @@ bool SmbiosBlobHandler::commit(uint16_t session,
-     /* Clear the commit_error bit. */
-     blobPtr->state &= ~blobs::StateFlags::commit_error;
- 
-+    std::string defaultDir =
-+        std::filesystem::path(mdrDefaultFile).parent_path();
-+
-     MDRSMBIOSHeader mdrHdr;
-     mdrHdr.mdrType = mdrTypeII;
-     mdrHdr.timestamp = std::time(nullptr);
-     mdrHdr.dataSize = blobPtr->buffer.size();
--    if (access(smbiosPath, F_OK) == -1)
-+    if (access(defaultDir.c_str(), F_OK) == -1)
-     {
--        int flag = mkdir(smbiosPath, S_IRWXU);
-+        int flag = mkdir(defaultDir.c_str(), S_IRWXU);
-         if (flag != 0)
-         {
-             phosphor::logging::log<phosphor::logging::level::ERR>(
--                "create folder failed for writting smbios file");
-+                "create folder failed for writing smbios file");
-             blobPtr->state |= blobs::StateFlags::commit_error;
-             return false;
-         }
-     }
- 
--    std::ofstream smbiosFile(mdrType2File,
-+    std::ofstream smbiosFile(mdrDefaultFile,
-                              std::ios_base::binary | std::ios_base::trunc);
-     if (!smbiosFile.good())
-     {
-diff --git a/src/system.cpp b/src/system.cpp
-index c0713a6..a838577 100644
---- a/src/system.cpp
-+++ b/src/system.cpp
-@@ -133,7 +133,7 @@ std::string System::version(std::string /* value */)
-         if (std::find_if(tempS.begin(), tempS.end(),
-                          [](char ch) { return !isprint(ch); }) != tempS.end())
-         {
--            std::ofstream smbiosFile(mdrType2File, std::ios_base::trunc);
-+            std::ofstream smbiosFile(smbiosFilePath, std::ios_base::trunc);
-             if (!smbiosFile.good())
-             {
-                 phosphor::logging::log<phosphor::logging::level::ERR>(
-@@ -149,7 +149,7 @@ std::string System::version(std::string /* value */)
-         }
-         result = tempS;
- 
--        setProperty(bus, biosActiveObjPath, biosVersionIntf, biosVersionProp,
-+        setProperty(*bus, biosActiveObjPath, biosVersionIntf, biosVersionProp,
-                     result);
-     }
-     lg2::info("VERSION INFO - BIOS - {VER}", "VER", result);
--- 
-2.42.0.515.g380fc7ccd1-goog
-
diff --git a/recipes-phosphor/smbios/smbios-mdr/0012-Entered-remaining-CPU-family-text-strings.patch b/recipes-phosphor/smbios/smbios-mdr/0012-Entered-remaining-CPU-family-text-strings.patch
deleted file mode 100644
index 47839c4..0000000
--- a/recipes-phosphor/smbios/smbios-mdr/0012-Entered-remaining-CPU-family-text-strings.patch
+++ /dev/null
@@ -1,278 +0,0 @@
-From 5d97024851ebdf09bcd2acce293d373fd87ae601 Mon Sep 17 00:00:00 2001
-From: Josh Lehan <krellan@google.com>
-Date: Tue, 19 Sep 2023 21:05:12 -0700
-Subject: [PATCH] Entered remaining CPU family text strings
-
-The table of CPU family text strings was incomplete, missing many
-entries, of processors both historical and bleeding-edge. Added the
-missing entries, as per Table 23 of DSP0134 3.7.0 spec.
-
-Following the consistent format of whatever spelling and capitalization
-the entry had in the spec, but with the dropping of special marketing
-characters like (C), (R), (TM).
-
-Tested: My CPU no longer shows up as "Unknown Processor Family".
-
-Patch Tracking Bug: b/301192077
-Upstream info / review: https://gerrit.openbmc.org/c/openbmc/smbios-mdr/+/66660
-Upstream-Status: Submitted
-Justification: Pending upstream review
-
-Google-Bug-Id: 301024431
-Change-Id: I499cb516de27bf4adec7d034030c3d9c19c2c833
-Signed-off-by: Josh Lehan <krellan@google.com>
----
- include/cpu.hpp | 212 +++++++++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 202 insertions(+), 10 deletions(-)
-
-diff --git a/include/cpu.hpp b/include/cpu.hpp
-index bae8dc0..26579a6 100644
---- a/include/cpu.hpp
-+++ b/include/cpu.hpp
-@@ -44,16 +44,134 @@ using Item = sdbusplus::server::xyz::openbmc_project::inventory::Item;
- using association =
-     sdbusplus::server::xyz::openbmc_project::association::Definitions;
- 
--// Definition follow smbios spec DSP0134 3.0.0
-+// This table is up to date as of SMBIOS spec DSP0134 3.7.0
- static const std::map<uint8_t, const char*> familyTable = {
--    {0x1, "Other"},
--    {0x2, "Unknown"},
-+    {0x01, "Other"},
-+    {0x02, "Unknown"},
-+    {0x03, "8086"},
-+    {0x04, "80286"},
-+    {0x05, "Intel 386 processor"},
-+    {0x06, "Intel 486 processor"},
-+    {0x07, "8087"},
-+    {0x08, "80287"},
-+    {0x09, "80387"},
-+    {0x0a, "80487"},
-+    {0x0b, "Intel Pentium processor"},
-+    {0x0c, "Pentium Pro processor"},
-+    {0x0d, "Pentium II processor"},
-+    {0x0e, "Pentium processor with MMX technology"},
-+    {0x0f, "Intel Celeron processor"},
-     {0x10, "Pentium II Xeon processor"},
-+    {0x11, "Pentium III processor"},
-+    {0x12, "M1 Family"},
-+    {0x13, "M2 Family"},
-+    {0x14, "Intel Celeron M processor"},
-+    {0x15, "Intel Pentium 4 HT processor"},
-+    {0x16, "Intel Processor"},
-+    {0x18, "AMD Duron Processor Family"},
-+    {0x19, "K5 Family"},
-+    {0x1a, "K6 Family"},
-+    {0x1b, "K6-2"},
-+    {0x1c, "K6-3"},
-+    {0x1d, "AMD Athlon Processor Family"},
-+    {0x1e, "AMD29000 Family"},
-+    {0x1f, "K6-2+"},
-+    {0x20, "Power PC Family"},
-+    {0x21, "Power PC 601"},
-+    {0x22, "Power PC 603"},
-+    {0x23, "Power PC 603+"},
-+    {0x24, "Power PC 604"},
-+    {0x25, "Power PC 620"},
-+    {0x26, "Power PC x704"},
-+    {0x27, "Power PC 750"},
-+    {0x28, "Intel Core Duo processor"},
-+    {0x29, "Intel Core Duo mobile processor"},
-+    {0x2a, "Intel Core Solo mobile processor"},
-     {0x2b, "Intel Atom processor"},
-     {0x2c, "Intel Core M processor"},
-     {0x2d, "Intel Core m3 processor"},
-     {0x2e, "Intel Core m5 processor"},
-     {0x2f, "Intel Core m7 processor"},
-+    {0x30, "Alpha Family"},
-+    {0x31, "Alpha 21064"},
-+    {0x32, "Alpha 21066"},
-+    {0x33, "Alpha 21164"},
-+    {0x34, "Alpha 21164PC"},
-+    {0x35, "Alpha 21164a"},
-+    {0x36, "Alpha 21264"},
-+    {0x37, "Alpha 21364"},
-+    {0x38, "AMD Turion II Ultra Dual-Core Mobile M Processor Family"},
-+    {0x39, "AMD Turion II Dual-Core Mobile M Processor Family"},
-+    {0x3a, "AMD Athlon II Dual-Core M Processor Family"},
-+    {0x3b, "AMD Opteron 6100 Series Processor"},
-+    {0x3c, "AMD Opteron 4100 Series Processor"},
-+    {0x3d, "AMD Opteron 6200 Series Processor"},
-+    {0x3e, "AMD Opteron 4200 Series Processor"},
-+    {0x3f, "AMD FX Series Processor"},
-+    {0x40, "MIPS Family"},
-+    {0x41, "MIPS R4000"},
-+    {0x42, "MIPS R4200"},
-+    {0x43, "MIPS R4400"},
-+    {0x44, "MIPS R4600"},
-+    {0x45, "MIPS R10000"},
-+    {0x46, "AMD C-Series Processor"},
-+    {0x47, "AMD E-Series Processor"},
-+    {0x48, "AMD A-Series Processor"},
-+    {0x49, "AMD G-Series Processor"},
-+    {0x4a, "AMD Z-Series Processor"},
-+    {0x4b, "AMD R-Series Processor"},
-+    {0x4c, "AMD Opteron 4300 Series Processor"},
-+    {0x4d, "AMD Opteron 6300 Series Processor"},
-+    {0x4e, "AMD Opteron 3300 Series Processor"},
-+    {0x4f, "AMD FirePro Series Processor"},
-+    {0x50, "SPARC Family"},
-+    {0x51, "SuperSPARC"},
-+    {0x52, "microSPARC II"},
-+    {0x53, "microSPARC IIep"},
-+    {0x54, "UltraSPARC"},
-+    {0x55, "UltraSPARC II"},
-+    {0x56, "UltraSPARC Iii"},
-+    {0x57, "UltraSPARC III"},
-+    {0x58, "UltraSPARC IIIi"},
-+    {0x60, "68040 Family"},
-+    {0x61, "68xxx"},
-+    {0x62, "68000"},
-+    {0x63, "68010"},
-+    {0x64, "68020"},
-+    {0x65, "68030"},
-+    {0x66, "AMD Athlon X4 Quad-Core Processor Family"},
-+    {0x67, "AMD Opteron X1000 Series Processor"},
-+    {0x68, "AMD Opteron X2000 Series APU"},
-+    {0x69, "AMD Opteron A-Series Processor"},
-+    {0x6a, "AMD Opteron X3000 Series APU"},
-+    {0x6b, "AMD Zen Processor Family"},
-+    {0x70, "Hobbit Family"},
-+    {0x78, "Crusoe TM5000 Family"},
-+    {0x79, "Crusoe TM3000 Family"},
-+    {0x7a, "Efficeon TM8000 Family"},
-+    {0x80, "Weitek"},
-+    {0x82, "Itanium processor"},
-+    {0x83, "AMD Athlon 64 Processor Family"},
-+    {0x84, "AMD Opteron Processor Family"},
-+    {0x85, "AMD Sempron Processor Family"},
-+    {0x86, "AMD Turion 64 Mobile Technology"},
-+    {0x87, "Dual-Core AMD Opteron Processor Family"},
-+    {0x88, "AMD Athlon 64 X2 Dual-Core Processor Family"},
-+    {0x89, "AMD Turion 64 X2 Mobile Technology"},
-+    {0x8a, "Quad-Core AMD Opteron Processor Family"},
-+    {0x8b, "Third-Generation AMD Opteron Processor Family"},
-+    {0x8c, "AMD Phenom FX Quad-Core Processor Family"},
-+    {0x8d, "AMD Phenom X4 Quad-Core Processor Family"},
-+    {0x8e, "AMD Phenom X2 Dual-Core Processor Family"},
-+    {0x8f, "AMD Athlon X2 Dual-Core Processor Family"},
-+    {0x90, "PA-RISC Family"},
-+    {0x91, "PA-RISC 8500"},
-+    {0x92, "PA-RISC 8000"},
-+    {0x93, "PA-RISC 7300LC"},
-+    {0x94, "PA-RISC 7200"},
-+    {0x95, "PA-RISC 7100LC"},
-+    {0x96, "PA-RISC 7100"},
-+    {0xa0, "V30 Family"},
-     {0xa1, "Quad-Core Intel Xeon processor 3200 Series"},
-     {0xa2, "Dual-Core Intel Xeon processor 3000 Series"},
-     {0xa3, "Quad-Core Intel Xeon processor 5300 Series"},
-@@ -70,8 +188,40 @@ static const std::map<uint8_t, const char*> familyTable = {
-     {0xae, "Quad-Core Intel Xeon processor 7400 Series"},
-     {0xaf, "Multi-Core Intel Xeon processor 7400 Series"},
-     {0xb0, "Pentium III Xeon processor"},
-+    {0xb1, "Pentium III Processor with Intel SpeedStep Technology"},
-+    {0xb2, "Pentium 4 Processor"},
-     {0xb3, "Intel Xeon processor"},
-+    {0xb4, "AS400 Family"},
-     {0xb5, "Intel Xeon processor MP"},
-+    {0xb6, "AMD Athlon XP Processor Family"},
-+    {0xb7, "AMD Athlon MP Processor Family"},
-+    {0xb8, "Intel Itanium 2 processor"},
-+    {0xb9, "Intel Pentium M processor"},
-+    {0xba, "Intel Celeron D processor"},
-+    {0xbb, "Intel Pentium D processor"},
-+    {0xbc, "Intel Pentium Processor Extreme Edition"},
-+    {0xbd, "Intel Core Solo Processor"},
-+    {0xbf, "Intel Core 2 Duo Processor"},
-+    {0xc0, "Intel Core 2 Solo processor"},
-+    {0xc1, "Intel Core 2 Extreme processor"},
-+    {0xc2, "Intel Core 2 Quad processor"},
-+    {0xc3, "Intel Core 2 Extreme mobile processor"},
-+    {0xc4, "Intel Core 2 Duo mobile processor"},
-+    {0xc5, "Intel Core 2 Solo mobile processor"},
-+    {0xc6, "Intel Core i7 processor"},
-+    {0xc7, "Dual-Core Intel Celeron processor"},
-+    {0xc8, "IBM390 Family"},
-+    {0xc9, "G4"},
-+    {0xca, "G5"},
-+    {0xcb, "ESA/390 G6"},
-+    {0xcc, "z/Architecture base"},
-+    {0xcd, "Intel Core i5 processor"},
-+    {0xce, "Intel Core i3 processor"},
-+    {0xcf, "Intel Core i9 processor"},
-+    {0xd2, "VIA C7-M Processor Family"},
-+    {0xd3, "VIA C7-D Processor Family"},
-+    {0xd4, "VIA C7 Processor Family"},
-+    {0xd5, "VIA Eden Processor Family"},
-     {0xd6, "Multi-Core Intel Xeon processor"},
-     {0xd7, "Dual-Core Intel Xeon processor 3xxx Series"},
-     {0xd8, "Quad-Core Intel Xeon processor 3xxx Series"},
-@@ -82,15 +232,57 @@ static const std::map<uint8_t, const char*> familyTable = {
-     {0xde, "Quad-Core Intel Xeon processor 7xxx Series"},
-     {0xdf, "Multi-Core Intel Xeon processor 7xxx Series"},
-     {0xe0, "Multi-Core Intel Xeon processor 3400 Series"},
--    {0xfe, "Processor Family 2 Indicator"}
--
--};
-+    {0xe4, "AMD Opteron 3000 Series Processor"},
-+    {0xe5, "AMD Sempron II Processor"},
-+    {0xe6, "Embedded AMD Opteron Quad-Core Processor Family"},
-+    {0xe7, "AMD Phenom Triple-Core Processor Family"},
-+    {0xe8, "AMD Turion Ultra Dual-Core Mobile Processor Family"},
-+    {0xe9, "AMD Turion Dual-Core Mobile Processor Family"},
-+    {0xea, "AMD Athlon Dual-Core Processor Family"},
-+    {0xeb, "AMD Sempron SI Processor Family"},
-+    {0xec, "AMD Phenom II Processor Family"},
-+    {0xed, "AMD Athlon II Processor Family"},
-+    {0xee, "Six-core AMD Opteron Processor Family"},
-+    {0xef, "AMD Sempron M Processor Family"},
-+    {0xfa, "i860"},
-+    {0xfb, "i960"},
-+    {0xfe, "Processor Family 2 Indicator"}};
- 
--// Definition follow smbios spec DSP0134 3.1.1
-+// This table is up to date as of SMBIOS spec DSP0134 3.7.0
- static const std::map<uint16_t, const char*> family2Table = {
--    {0x100, "ARMv7"}, {0x101, "ARMv8"}, {0x118, "ARM"}, {0x119, "StrongARM"}
--
--};
-+    {0x100, "ARMv7"},
-+    {0x101, "ARMv8"},
-+    {0x102, "ARMv9"},
-+    {0x104, "SH-3"},
-+    {0x105, "SH-4"},
-+    {0x118, "ARM"},
-+    {0x119, "StrongARM"},
-+    {0x12c, "6x86"},
-+    {0x12d, "MediaGX"},
-+    {0x12e, "MII"},
-+    {0x140, "WinChip"},
-+    {0x15e, "DSP"},
-+    {0x1f4, "Video Processor"},
-+    {0x200, "RISC-V RV32"},
-+    {0x201, "RISC-V RV64"},
-+    {0x202, "RISC-V RV128"},
-+    {0x258, "LoongArch"},
-+    {0x259, "Loongson 1 Processor Family"},
-+    {0x25a, "Loongson 2 Processor Family"},
-+    {0x25b, "Loongson 3 Processor Family"},
-+    {0x25c, "Loongson 2K Processor Family"},
-+    {0x25d, "Loongson 3A Processor Family"},
-+    {0x25e, "Loongson 3B Processor Family"},
-+    {0x25f, "Loongson 3C Processor Family"},
-+    {0x260, "Loongson 3D Processor Family"},
-+    {0x261, "Loongson 3E Processor Family"},
-+    {0x262, "Dual-Core Loongson 2K Processor 2xxx Series"},
-+    {0x26c, "Quad-Core Loongson 3A Processor 5xxx Series"},
-+    {0x26d, "Multi-Core Loongson 3A Processor 5xxx Series"},
-+    {0x26e, "Quad-Core Loongson 3B Processor 5xxx Series"},
-+    {0x26f, "Multi-Core Loongson 3B Processor 5xxx Series"},
-+    {0x270, "Multi-Core Loongson 3C Processor 5xxx Series"},
-+    {0x271, "Multi-Core Loongson 3D Processor 5xxx Series"}};
- 
- // Definition follow smbios spec DSP0134 3.0.0
- static const std::array<std::optional<processor::Capability>, 16>
--- 
-2.42.0.459.ge4e396fd5e-goog
-