Revert "smbios-mdr: get SystemBootInfo"

This reverts commit b5b8275168eca9977ac4fbacb35542ef0d511cc5.

Tested: n/a; it's a revert.
Reason for revert: causing CBTR failures
Google-Bug-Id: 432371502
Change-Id: I137dc04ee7561ca8569c6c0a35a71bc62a8019ff
diff --git a/recipes-phosphor/smbios/smbios-mdr/0001-smbios-mdr-Add-support-to-get-SystemBootInfo.patch b/recipes-phosphor/smbios/smbios-mdr/0001-smbios-mdr-Add-support-to-get-SystemBootInfo.patch
deleted file mode 100644
index 5710708..0000000
--- a/recipes-phosphor/smbios/smbios-mdr/0001-smbios-mdr-Add-support-to-get-SystemBootInfo.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-From c4c3a905aa0073d0726790a06f026739a075f069 Mon Sep 17 00:00:00 2001
-From: Alex Lai <alexlai@google.com>
-Date: Tue, 1 Jul 2025 07:49:18 +0000
-Subject: [PATCH] smbios-mdr: Add support to get SystemBootInfo
-
-ref: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.2.0.pdf?page=121
-
-Tested: b/409172603#comment#15
-Google-Bug-Id: 409172603
-Signed-off-by: Alex Lai <alexlai@google.com>
----
- include/mdrv2.hpp        |  2 ++
- include/smbios_mdrv2.hpp | 11 ++++++++++
- include/system_boot.hpp  | 46 ++++++++++++++++++++++++++++++++++++++++
- src/mdrv2.cpp            | 15 +++++++++++++
- src/meson.build          |  1 +
- src/system_boot.cpp      | 27 +++++++++++++++++++++++
- 6 files changed, 102 insertions(+)
- create mode 100644 include/system_boot.hpp
- create mode 100644 src/system_boot.cpp
-
-diff --git a/include/mdrv2.hpp b/include/mdrv2.hpp
-index 5ccbb49..40e12a9 100644
---- a/include/mdrv2.hpp
-+++ b/include/mdrv2.hpp
-@@ -20,6 +20,7 @@
- #include "pcieslot.hpp"
- #include "smbios_mdrv2.hpp"
- #include "system.hpp"
-+#include "system_boot.hpp"
- 
- #ifdef GOOGLE_CPU_LINK
- #include "cpulink.hpp"
-@@ -211,6 +212,7 @@ class MDRV2 :
-     std::vector<std::unique_ptr<Dimm>> dimms;
-     std::vector<std::unique_ptr<Pcie>> pcies;
-     std::unique_ptr<System> system;
-+    std::unique_ptr<SystemBoot> system_boot;
-     std::shared_ptr<sdbusplus::asio::dbus_interface> smbiosInterface;
- 
-     std::string smbiosFilePath;
-diff --git a/include/smbios_mdrv2.hpp b/include/smbios_mdrv2.hpp
-index b7906bc..8421473 100644
---- a/include/smbios_mdrv2.hpp
-+++ b/include/smbios_mdrv2.hpp
-@@ -157,6 +157,16 @@ struct EntryPointStructure30
-     uint64_t structTableAddr;
- } __attribute__((packed));
- 
-+struct SystemBootInfo
-+{
-+    uint8_t type;
-+    uint8_t length;
-+    uint16_t handle;
-+    uint8_t reserved[6];
-+    uint8_t statusCode;
-+    uint32_t bootCount;
-+} __attribute__((packed));
-+
- #ifdef GOOGLE_CPU_LINK
- struct CpuLinkInfo
- {
-@@ -206,6 +216,7 @@ typedef enum
-     systemEventLogType = 15,
-     physicalMemoryArrayType = 16,
-     memoryDeviceType = 17,
-+    systemBootInformationType = 32,
- #ifdef GOOGLE_CPU_LINK
-     googleCpuLinkType = 162,
- #endif
-diff --git a/include/system_boot.hpp b/include/system_boot.hpp
-new file mode 100644
-index 0000000..de6c997
---- /dev/null
-+++ b/include/system_boot.hpp
-@@ -0,0 +1,46 @@
-+#pragma once
-+#include "smbios_mdrv2.hpp"
-+
-+#include <phosphor-logging/lg2.hpp>
-+#include <sdbusplus/asio/object_server.hpp>
-+
-+namespace phosphor
-+{
-+
-+namespace smbios
-+{
-+
-+class SystemBoot
-+{
-+  public:
-+    SystemBoot() = delete;
-+    SystemBoot(const SystemBoot&) = delete;
-+    SystemBoot& operator=(const SystemBoot&) = delete;
-+    SystemBoot(SystemBoot&&) = delete;
-+    SystemBoot& operator=(SystemBoot&&) = delete;
-+    ~SystemBoot() = default;
-+
-+    SystemBoot(std::shared_ptr<sdbusplus::asio::object_server>& objServer,
-+               struct SystemBootInfo* bootInfo,
-+               const std::string& smbiosInventoryPath) :
-+        server(objServer), bootInfoPtr(bootInfo),
-+        smbiosInventoryPathStr(smbiosInventoryPath)
-+    {
-+        infoUpdate();
-+    }
-+
-+    void infoUpdate();
-+
-+  private:
-+    std::shared_ptr<sdbusplus::asio::object_server>& server;
-+
-+    std::shared_ptr<sdbusplus::asio::dbus_interface> objectInterface;
-+
-+    struct SystemBootInfo* bootInfoPtr;
-+
-+    const std::string& smbiosInventoryPathStr;
-+};
-+
-+} // namespace smbios
-+
-+} // namespace phosphor
-diff --git a/src/mdrv2.cpp b/src/mdrv2.cpp
-index 3a7c673..cb608e5 100644
---- a/src/mdrv2.cpp
-+++ b/src/mdrv2.cpp
-@@ -714,6 +714,21 @@ void MDRV2::systemInfoUpdate()
-         }
-     }
- 
-+    {
-+        uint8_t* dataIn = smbiosDir.dir[smbiosDirIndex].dataStorage;
-+        if (dataIn == nullptr)
-+        {
-+            phosphor::logging::log<phosphor::logging::level::ERR>(
-+                "instantiate cpu links failed - no storage data");
-+            return;
-+        }
-+        dataIn = getSMBIOSTypePtr(dataIn, systemBootInformationType);
-+        auto systemBootInfo = reinterpret_cast<struct SystemBootInfo*>(dataIn);
-+        system_boot = std::make_unique<SystemBoot>(objServer, systemBootInfo,
-+                                                   smbiosInventoryPath);
-+        lg2::info("system boot info added");
-+    }
-+
-     system.reset();
-     system = std::make_unique<System>(bus, smbiosInventoryPath + systemSuffix,
-                                       smbiosDir.dir[smbiosDirIndex].dataStorage,
-diff --git a/src/meson.build b/src/meson.build
-index 53292c7..c64b0f6 100644
---- a/src/meson.build
-+++ b/src/meson.build
-@@ -31,6 +31,7 @@ smbiosmdrv_sources = [
-   'cpu.cpp',
-   'dimm.cpp',
-   'system.cpp',
-+  'system_boot.cpp',
-   'pcieslot.cpp',
- ]
- 
-diff --git a/src/system_boot.cpp b/src/system_boot.cpp
-new file mode 100644
-index 0000000..08eedfa
---- /dev/null
-+++ b/src/system_boot.cpp
-@@ -0,0 +1,27 @@
-+#include "system_boot.hpp"
-+
-+namespace phosphor
-+{
-+namespace smbios
-+{
-+
-+void SystemBoot::infoUpdate()
-+{
-+    // get system path name
-+    std::string path = smbiosInventoryPathStr;
-+
-+    // populate info to dbus
-+    objectInterface = server->add_interface(
-+        path, "xyz.openbmc_project.Inventory.Item.SystemBoot");
-+    objectInterface->register_property("StatusCode", bootInfoPtr->statusCode);
-+    objectInterface->register_property("BootCount", bootInfoPtr->bootCount);
-+
-+    bool result = objectInterface->initialize();
-+    if (!result)
-+    {
-+        lg2::error("Failed to initialize System boot object");
-+    }
-+}
-+
-+} // namespace smbios
-+} // namespace phosphor
--- 
-2.50.0.727.gbf7dc18ff4-goog
-
diff --git a/recipes-phosphor/smbios/smbios-mdr_%.bbappend b/recipes-phosphor/smbios/smbios-mdr_%.bbappend
index 35337f9..6f152bd 100644
--- a/recipes-phosphor/smbios/smbios-mdr_%.bbappend
+++ b/recipes-phosphor/smbios/smbios-mdr_%.bbappend
@@ -5,7 +5,6 @@
   file://0001-Use-Device-Locator-as-DIMM-Object-Path-if-Enabled.patch \
   file://0001-Support-CoreEnable-attribute.patch \
   file://0001-Process-smbios-grpc-blob-tranasfer.patch \
-  file://0001-smbios-mdr-Add-support-to-get-SystemBootInfo.patch \
 "
 
 EXTRA_OEMESON:append:gbmc = " -Ddimm-only-locator=enabled"