ipmi: fix patches for fitting the latest src

Tested: build pass
Fusion-Link: https://fusion2.corp.google.com/9f008bfc-ef74-3633-8430-bb45113dd6ec (platform5)
Fusion-Link: https://fusion2.corp.google.com/f527167f-10c0-3456-a639-1029663c6d9b (platform15)
Fusion-Link: https://fusion2.corp.google.com/3dbee874-b5cc-3ddb-9203-4c5f0263b421 (platform18)
Fusion-Link: https://fusion2.corp.google.com/2267aa28-8918-3db2-ad0c-5e4fd4ef22ba (platform17)
Fusion-Link: https://fusion2.corp.google.com/a9f9282a-18e3-34e5-bcdd-6110b09d5daa (platform11)
Fusion-Link: https://fusion2.corp.google.com/8c8bcb52-c065-3b07-bb2d-b1387b34bd2d (platform11-emr)
Google-Bug-Id: 541287798
Change-Id: I80fd2be30bb5b83549aa0de39caa857cc0fdd86e
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/recipes-google/ipmi/google-ipmi-sys/0001-pcie_bifurcation-Fetch-highest-level-bifurcation-at-.patch b/recipes-google/ipmi/google-ipmi-sys/0001-pcie_bifurcation-Fetch-highest-level-bifurcation-at-.patch
index 63e000f..b6016e7 100644
--- a/recipes-google/ipmi/google-ipmi-sys/0001-pcie_bifurcation-Fetch-highest-level-bifurcation-at-.patch
+++ b/recipes-google/ipmi/google-ipmi-sys/0001-pcie_bifurcation-Fetch-highest-level-bifurcation-at-.patch
@@ -1,4 +1,4 @@
-From afe9ea49b93310aba31c78c1882d2ec9fefbbe9e Mon Sep 17 00:00:00 2001
+From e3c62b4fb4d96a55abc52d439ad5965cbfe0fe2c Mon Sep 17 00:00:00 2001
 From: Willy Tu <wltu@google.com>
 Date: Sun, 10 Oct 2021 13:34:41 -0700
 Subject: [PATCH] bifurcation: Enable Dynamic Bifurication
@@ -40,9 +40,10 @@
 %% original patch: 0001-pcie_bifurcation-Fetch-highest-level-bifurcation-at-.patch
 
 Change-Id: I0c473ae5657533113958b0b57f3145dd072f9b8a
+Signed-off-by: Willy Tu <wltu@google.com>
 ---
  bifurcation/bifurcation.hpp         | 159 +++++++++++++++-
- bifurcation/bifurcation_dynamic.cpp | 222 +++++++++++++++++++++++
+ bifurcation/bifurcation_dynamic.cpp | 222 ++++++++++++++++++++++
  bifurcation/bifurcation_static.cpp  |   3 +-
  bifurcation/meson.build             |   1 +
  handler.cpp                         |  55 +++++-
@@ -55,9 +56,9 @@
  pcie_bifurcation.hpp                |   5 +-
  test/bifurcation_mock.hpp           |  56 ++++++
  test/handler_mock.hpp               |   3 +-
- test/handler_unittest.cpp           | 271 +++++++++++++++++++++++++++-
+ test/handler_unittest.cpp           | 274 +++++++++++++++++++++++++++-
  test/pcie_bifurcation_unittest.cpp  |  66 ++++++-
- 16 files changed, 869 insertions(+), 28 deletions(-)
+ 16 files changed, 872 insertions(+), 28 deletions(-)
  create mode 100644 bifurcation/bifurcation_dynamic.cpp
  create mode 100644 test/bifurcation_mock.hpp
 
@@ -531,7 +532,7 @@
      dependencies: bifurcation_deps,
      include_directories: [bifurcation_inc, root_inc],
 diff --git a/handler.cpp b/handler.cpp
-index 66210a3..8927c85 100644
+index 863a253..8855011 100644
 --- a/handler.cpp
 +++ b/handler.cpp
 @@ -31,6 +31,7 @@
@@ -560,7 +561,7 @@
  #include <variant>
  
  #ifndef NCSI_IF_NAME
-@@ -667,9 +671,56 @@ void Handler::accelOobWrite(std::string_view name, uint64_t address,
+@@ -672,9 +676,56 @@ void Handler::accelOobWrite(std::string_view name, uint64_t address,
      }
  }
  
@@ -620,7 +621,7 @@
  }
  
 diff --git a/handler.hpp b/handler.hpp
-index adcbafb..9333830 100644
+index 8aa859a..0f9083d 100644
 --- a/handler.hpp
 +++ b/handler.hpp
 @@ -202,9 +202,12 @@ class HandlerInterface
@@ -639,7 +640,7 @@
      /**
       * Prepare for OS boot.
 diff --git a/handler_impl.hpp b/handler_impl.hpp
-index f2456b3..1755ac6 100644
+index 8358bdb..c89b0d3 100644
 --- a/handler_impl.hpp
 +++ b/handler_impl.hpp
 @@ -14,10 +14,13 @@
@@ -682,7 +683,7 @@
      uint32_t accelOobDeviceCount() const override;
      std::string accelOobDeviceName(size_t index) const override;
 diff --git a/ipmi.cpp b/ipmi.cpp
-index c086bc4..df9771e 100644
+index f76c1a8..e60e927 100644
 --- a/ipmi.cpp
 +++ b/ipmi.cpp
 @@ -12,6 +12,8 @@
@@ -704,15 +705,16 @@
              return linuxBootDone(data, handler);
          case SysGetAccelVrSettings:
 diff --git a/meson.build b/meson.build
-index 39ae9c5..d0b6394 100644
+index 899c726..379ffa3 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -13,10 +13,19 @@ conf_data.set_quoted(
+@@ -13,11 +13,20 @@ conf_data.set_quoted(
      'STATIC_BIFURCATION_CONFIG',
      get_option('static-bifurcation'),
  )
 +
  conf_data.set_quoted('CPU_CONFIG_PATH', get_option('cpu-config-path'))
+ conf_data.set_quoted('MEMORY_CONFIG_PATH', get_option('memory-config-path'))
  
  conf_data.set10('IPMI_ALLOWLIST', get_option('ipmi_allowlist'))
  
@@ -728,10 +730,10 @@
  
  bm_conf_data = configuration_data()
 diff --git a/meson.options b/meson.options
-index 4239f04..8a8125b 100644
+index 5b3386f..6398239 100644
 --- a/meson.options
 +++ b/meson.options
-@@ -30,3 +30,16 @@ option(
+@@ -36,3 +36,16 @@ option(
      value: false,
      description: 'IPMI allowlist enablement Flag',
  )
@@ -875,7 +877,7 @@
 +} // namespace ipmi
 +} // namespace google
 diff --git a/test/handler_mock.hpp b/test/handler_mock.hpp
-index a8c0821..a58e273 100644
+index 5a05d52..1c85c9a 100644
 --- a/test/handler_mock.hpp
 +++ b/test/handler_mock.hpp
 @@ -64,8 +64,9 @@ class HandlerMock : public HandlerInterface
@@ -890,7 +892,7 @@
      MOCK_METHOD(void, accelSetVrSettings,
                  (::ipmi::Context::ptr, uint8_t, uint8_t, uint16_t),
 diff --git a/test/handler_unittest.cpp b/test/handler_unittest.cpp
-index d28014a..2f6ab1f 100644
+index d7e7ff1..5f5150f 100644
 --- a/test/handler_unittest.cpp
 +++ b/test/handler_unittest.cpp
 @@ -12,9 +12,13 @@
@@ -957,10 +959,14 @@
          EXPECT_TRUE(bifurcation.empty());
      }
  }
-@@ -722,6 +729,262 @@ TEST(HandlerTest, GetCoreCountWithExtraKeys)
-     std::remove(testFilename);
- }
+@@ -802,6 +809,265 @@ TEST(HandlerTest, GetMemoryCapacityGibWithExtraKeys)
  
+     Handler h;
+     EXPECT_EQ(h.getMemoryCapacityGib(testFilename), 512);
++
++    std::remove(testFilename);
++}
++
 +struct PhysicalTopology
 +{
 +    std::string name;
@@ -1173,7 +1179,9 @@
 +TEST(HandlerTest, PcieBifurcationDynamicChannels)
 +{
 +    std::vector<std::string> baseAssociations = {
-+        "slot-10", "slot-20", "slot-30",
++        "slot-10",
++        "slot-20",
++        "slot-30",
 +    };
 +    std::vector<PhysicalTopology> topology = {
 +        {"slot-10", 10, 16, std::vector<std::string>{}, 2},
@@ -1214,12 +1222,9 @@
 +    bifurcation = h.pcieBifurcation(nullptr, 2, true);
 +    EXPECT_THAT(bifurcation, ElementsAre(16));
 +
-+    std::remove(testFilename);
-+}
-+
- // TODO: Add checks for other functions of handler.
+     std::remove(testFilename);
+ }
  
- } // namespace ipmi
 diff --git a/test/pcie_bifurcation_unittest.cpp b/test/pcie_bifurcation_unittest.cpp
 index 90e81e4..8c1a398 100644
 --- a/test/pcie_bifurcation_unittest.cpp
diff --git a/recipes-google/ipmi/google-ipmi-sys/0002-boot-time-monitor-Add-commands.patch b/recipes-google/ipmi/google-ipmi-sys/0002-boot-time-monitor-Add-commands.patch
index c295e56..aaf916c 100644
--- a/recipes-google/ipmi/google-ipmi-sys/0002-boot-time-monitor-Add-commands.patch
+++ b/recipes-google/ipmi/google-ipmi-sys/0002-boot-time-monitor-Add-commands.patch
@@ -1,7 +1,7 @@
-From f564d08b3a2fa04a37b38edb7300d5f96f5ca00a Mon Sep 17 00:00:00 2001
+From 72edc8cd0197aef6dda730f2f56bf78c516309c2 Mon Sep 17 00:00:00 2001
 From: Michael Shen <gpgpgp@google.com>
 Date: Mon, 29 Apr 2024 03:30:08 +0000
-Subject: [PATCH] boot-time-monitor: Add commands
+Subject: [PATCH 2/3] boot-time-monitor: Add commands
 
 Add new commands `sendRebootCheckpoint`, `sendRebootComplete` and
 `sendRebootAdditionalDuration`.
@@ -50,7 +50,7 @@
  create mode 100644 test/boot_time_monitor_unittest.cpp
 
 diff --git a/README.md b/README.md
-index aa84259..72fa05e 100644
+index ec30690..7c8225c 100644
 --- a/README.md
 +++ b/README.md
 @@ -460,6 +460,51 @@ Response (if applicable)
@@ -303,7 +303,7 @@
 +} // namespace ipmi
 +} // namespace google
 diff --git a/handler.cpp b/handler.cpp
-index a4e8c1f..5ea5f0e 100644
+index 8855011..69f6850 100644
 --- a/handler.cpp
 +++ b/handler.cpp
 @@ -801,6 +801,81 @@ void Handler::linuxBootDone() const
@@ -389,7 +389,7 @@
  static constexpr char ACCEL_POWER_PATH_PREFIX[] =
      "/com/google/accelPower/accel_power_";
 diff --git a/handler.hpp b/handler.hpp
-index 9333830..b04f6f2 100644
+index 0f9083d..c3380bc 100644
 --- a/handler.hpp
 +++ b/handler.hpp
 @@ -217,6 +217,35 @@ class HandlerInterface
@@ -429,7 +429,7 @@
       * Update the VR settings for the given settings_id
       *
 diff --git a/handler_impl.hpp b/handler_impl.hpp
-index 1755ac6..b72dd59 100644
+index c89b0d3..9360dc5 100644
 --- a/handler_impl.hpp
 +++ b/handler_impl.hpp
 @@ -85,6 +85,11 @@ class Handler : public HandlerInterface
@@ -445,7 +445,7 @@
                              uint8_t settings_id, uint16_t value) const override;
      uint16_t accelGetVrSettings(::ipmi::Context::ptr ctx, uint8_t chip_id,
 diff --git a/ipmi.cpp b/ipmi.cpp
-index df9771e..74d554a 100644
+index e60e927..965d6d2 100644
 --- a/ipmi.cpp
 +++ b/ipmi.cpp
 @@ -19,6 +19,7 @@
@@ -470,10 +470,10 @@
              return accelGetVrSettings(ctx, data, handler);
          case SysSetAccelVrSettings:
 diff --git a/meson.build b/meson.build
-index 9c1b718..5629568 100644
+index 379ffa3..39d8a95 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -65,6 +65,7 @@ sys_lib = static_library(
+@@ -67,6 +67,7 @@ sys_lib = static_library(
      'eth.cpp',
      'flash_size.cpp',
      'handler.cpp',
@@ -481,7 +481,7 @@
      'host_power_off.cpp',
      'ipmi.cpp',
      'linux_boot_done.cpp',
-@@ -76,7 +77,7 @@ sys_lib = static_library(
+@@ -78,7 +79,7 @@ sys_lib = static_library(
      'psu.cpp',
      'util.cpp',
      implicit_include_directories: false,
@@ -708,7 +708,7 @@
 +} // namespace ipmi
 +} // namespace google
 diff --git a/test/handler_mock.hpp b/test/handler_mock.hpp
-index a58e273..ea1903c 100644
+index 1c85c9a..f7b9c75 100644
 --- a/test/handler_mock.hpp
 +++ b/test/handler_mock.hpp
 @@ -68,6 +68,12 @@ class HandlerMock : public HandlerInterface
@@ -725,7 +725,7 @@
                  (::ipmi::Context::ptr, uint8_t, uint8_t, uint16_t),
                  (const, override));
 diff --git a/test/handler_unittest.cpp b/test/handler_unittest.cpp
-index e69a307..317ef36 100644
+index 6ce5d22..7a3d83b 100644
 --- a/test/handler_unittest.cpp
 +++ b/test/handler_unittest.cpp
 @@ -308,8 +308,8 @@ void ExpectGetManagedObjects(StrictMock<sdbusplus::SdBusMock>& mock,
@@ -739,7 +739,7 @@
  {
      EXPECT_CALL(mock, sd_bus_message_new_method_call(
                            _,         // sd_bus *bus,
-@@ -935,6 +935,198 @@ TEST(HandlerTest, PcieBifurcationDynamic)
+@@ -1069,6 +1069,198 @@ TEST(HandlerTest, PcieBifurcationDynamicChannels)
      std::remove(testFilename);
  }
  
@@ -939,7 +939,7 @@
  
  } // namespace ipmi
 diff --git a/test/meson.build b/test/meson.build
-index 9a6308a..f231333 100644
+index 413ec04..51bd580 100644
 --- a/test/meson.build
 +++ b/test/meson.build
 @@ -28,6 +28,7 @@ tests = [
@@ -951,5 +951,5 @@
      'pcie',
      'poweroff',
 -- 
-2.55.0.141.g00534a21ce-goog
+2.55.0.1007.g17ff1f9808-goog
 
diff --git a/recipes-google/ipmi/google-ipmi-sys/0003-Revert-sdbusplus-use-shorter-type-aliases.patch b/recipes-google/ipmi/google-ipmi-sys/0003-Revert-sdbusplus-use-shorter-type-aliases.patch
index 128870b..d3879ac 100644
--- a/recipes-google/ipmi/google-ipmi-sys/0003-Revert-sdbusplus-use-shorter-type-aliases.patch
+++ b/recipes-google/ipmi/google-ipmi-sys/0003-Revert-sdbusplus-use-shorter-type-aliases.patch
@@ -1,7 +1,7 @@
-From 38654e656ea76f4bf97c9903c8ef362e1554ab2c Mon Sep 17 00:00:00 2001
+From bf753d8bcffccb627a56b5df36009a1e223edd8a Mon Sep 17 00:00:00 2001
 From: Willy Tu <wltu@google.com>
 Date: Wed, 15 Jul 2026 16:06:41 +0000
-Subject: [PATCH] Revert "sdbusplus: use shorter type aliases"
+Subject: [PATCH 3/3] Revert "sdbusplus: use shorter type aliases"
 
 sdbusplus is not updated yet.
 
@@ -11,10 +11,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/handler.cpp b/handler.cpp
-index dec6f22..7f80b0c 100644
+index 69f6850..d56767b 100644
 --- a/handler.cpp
 +++ b/handler.cpp
-@@ -473,8 +473,8 @@ using AnyType = std::variant<std::string, uint8_t, uint32_t, uint64_t>;
+@@ -477,8 +477,8 @@ using AnyType = std::variant<std::string, uint8_t, uint32_t, uint64_t>;
  using AnyTypeList = std::vector<std::pair<std::string, AnyType>>;
  using NamedArrayOfAnyTypeLists =
      std::vector<std::pair<std::string, AnyTypeList>>;
@@ -26,5 +26,5 @@
  } // namespace
  
 -- 
-2.55.0.141.g00534a21ce-goog
+2.55.0.1007.g17ff1f9808-goog