google-ipmi-sys: Update the patches

0001-pcie_bifurcation patch needs to be updated to match clang-tidy.
0002 patch is (incorrectly) being used by an internal machine on the
master branch.

Tested: N/A Formatting change only
Fusion-Link: N/A Formatting change only

Google-Bug-Id: 356970616
Change-Id: I1c38b152fdd532483ee9e9bfc8a470964fc87c49
Signed-off-by: Brandon Kim <brandonkim@google.com>
(cherry picked from commit 63890bd3622f689d7b404d523a91da4e92dea6e5)
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 6467489..39e3aa1 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 b30735f1eab2b4f660637cbaf2a47587f8cdd0b5 Mon Sep 17 00:00:00 2001
+From ad2826245259bea5a016b4d7baf79e76ce29933f 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
@@ -55,9 +55,9 @@
  pcie_bifurcation.hpp                |   5 +-
  test/bifurcation_mock.hpp           |  53 +++++++
  test/handler_mock.hpp               |   3 +-
- test/handler_unittest.cpp           | 224 +++++++++++++++++++++++++++-
- test/pcie_bifurcation_unittest.cpp  |  66 +++++++-
- 16 files changed, 768 insertions(+), 30 deletions(-)
+ test/handler_unittest.cpp           | 221 +++++++++++++++++++++++++++-
+ test/pcie_bifurcation_unittest.cpp  |  66 ++++++++-
+ 16 files changed, 767 insertions(+), 28 deletions(-)
  create mode 100644 bifurcation/bifurcation_dynamic.cpp
  create mode 100644 test/bifurcation_mock.hpp
 
@@ -494,7 +494,7 @@
    dependencies: bifurcation_deps,
    include_directories: [bifurcation_inc, root_inc],
 diff --git a/handler.cpp b/handler.cpp
-index bc6323d..2bcb634 100644
+index 2483aec..0932a03 100644
 --- a/handler.cpp
 +++ b/handler.cpp
 @@ -29,6 +29,7 @@
@@ -601,7 +601,7 @@
      /**
       * Prepare for OS boot.
 diff --git a/handler_impl.hpp b/handler_impl.hpp
-index dc00051..7fbae3e 100644
+index 8636d3c..6ddc5cb 100644
 --- a/handler_impl.hpp
 +++ b/handler_impl.hpp
 @@ -14,10 +14,13 @@
@@ -622,14 +622,14 @@
      explicit Handler(const std::string& entityConfigPath = defaultConfigFile) :
          fsPtr(std::make_unique<FileSystemWrapper>()),
          _configFile(entityConfigPath),
--        bifurcationHelper(BifurcationStatic::createBifurcation()){};
+-        bifurcationHelper(BifurcationStatic::createBifurcation()) {};
 +        bifurcationHelper(
 +#if DYNAMIC_BIFURCATION
 +            BifurcationDynamic::createBifurcation()
 +#else
 +            BifurcationStatic::createBifurcation()
 +#endif
-+        ){};
++        ) {};
      Handler(std::reference_wrapper<BifurcationInterface> bifurcationHelper,
              const std::string& entityConfigPath = defaultConfigFile) :
          fsPtr(std::make_unique<FileSystemWrapper>()),
@@ -644,7 +644,7 @@
      uint32_t accelOobDeviceCount() const override;
      std::string accelOobDeviceName(size_t index) const override;
 diff --git a/ipmi.cpp b/ipmi.cpp
-index 5c0b916..170304d 100644
+index 237b2b5..ce751c5 100644
 --- a/ipmi.cpp
 +++ b/ipmi.cpp
 @@ -12,6 +12,8 @@
@@ -655,8 +655,8 @@
 +
  #include "ipmi.hpp"
  
- #include "bm_instance.hpp"
-@@ -85,7 +87,7 @@ Resp handleSysCommand(HandlerInterface* handler, ::ipmi::Context::ptr ctx,
+ #include "bios_setting.hpp"
+@@ -86,7 +88,7 @@ Resp handleSysCommand(HandlerInterface* handler, ::ipmi::Context::ptr ctx,
          case SysAccelOobWrite:
              return accelOobWrite(data, handler);
          case SysPCIeSlotBifurcation:
@@ -666,7 +666,7 @@
              return linuxBootDone(data, handler);
          case SysGetAccelVrSettings:
 diff --git a/meson.build b/meson.build
-index b101757..e1145d7 100644
+index 4e07ddd..7427ab0 100644
 --- a/meson.build
 +++ b/meson.build
 @@ -13,6 +13,14 @@ root_inc = include_directories('.')
@@ -834,7 +834,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 2fb470e..aabec39 100644
+index 5d01b73..ee7b524 100644
 --- a/test/handler_unittest.cpp
 +++ b/test/handler_unittest.cpp
 @@ -12,9 +12,13 @@
@@ -867,17 +867,7 @@
  using testing::Return;
  
  TEST(HandlerTest, EthCheckValidHappy)
-@@ -142,8 +148,7 @@ class MockDbusHandler : public Handler
-   public:
-     MockDbusHandler(sdbusplus::SdBusMock& mock,
-                     const std::string& config = "") :
--        Handler(config),
--        mock_(&mock)
-+        Handler(config), mock_(&mock)
-     {}
- 
-   protected:
-@@ -598,7 +603,7 @@ TEST(HandlerTest, accelOobWrite_Fail)
+@@ -597,7 +603,7 @@ TEST(HandlerTest, accelOobWrite_Fail)
                   IpmiException);
  }
  
@@ -886,7 +876,7 @@
  {
      const std::string& testJson = "/tmp/test-json";
      auto j = R"(
-@@ -624,12 +629,13 @@ TEST(HandlerTest, PcieBifurcation)
+@@ -623,12 +629,13 @@ TEST(HandlerTest, PcieBifurcation)
  
      for (const auto& [bus, output] : expectedMapping)
      {
@@ -902,7 +892,7 @@
      }
  
      std::filesystem::remove(testJson.data());
-@@ -637,7 +643,7 @@ TEST(HandlerTest, PcieBifurcation)
+@@ -636,7 +643,7 @@ TEST(HandlerTest, PcieBifurcation)
      Handler h2(std::ref(bifurcationHelper));
      for (uint8_t i = 0; i < 8; ++i)
      {
@@ -911,7 +901,7 @@
          EXPECT_TRUE(bifurcation.empty());
      }
  }
-@@ -654,6 +660,212 @@ TEST(HandlerTest, BmInstanceFailCase)
+@@ -653,6 +660,212 @@ TEST(HandlerTest, BmInstanceFailCase)
      EXPECT_THROW(h.getBMInstanceProperty(0x00), IpmiException);
  }
  
@@ -1235,5 +1225,5 @@
  
  } // namespace ipmi
 -- 
-2.45.1.288.g0e0cd299f1-goog
+2.46.0.295.g3b9ea8a38a-goog
 
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 99231a9..4d70742 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,4 +1,4 @@
-From 9a87ff5d07318ce7733ef7f6eb157eb491c4ad04 Mon Sep 17 00:00:00 2001
+From 90c098831a5f6507dcbc73291b8f88f51c819cbd Mon Sep 17 00:00:00 2001
 From: Michael Shen <gpgpgp@google.com>
 Date: Mon, 29 Apr 2024 03:30:08 +0000
 Subject: [PATCH 2/2] boot-time-monitor: Add commands
@@ -50,7 +50,7 @@
  create mode 100644 test/boot_time_monitor_unittest.cpp
 
 diff --git a/README.md b/README.md
-index 71a213b..9e8097d 100644
+index e43454a..51898ce 100644
 --- a/README.md
 +++ b/README.md
 @@ -457,6 +457,49 @@ Response (if applicable)
@@ -301,7 +301,7 @@
 +} // namespace ipmi
 +} // namespace google
 diff --git a/handler.cpp b/handler.cpp
-index 2bcb634..7b051f3 100644
+index 0932a03..863215f 100644
 --- a/handler.cpp
 +++ b/handler.cpp
 @@ -753,6 +753,81 @@ void Handler::linuxBootDone() const
@@ -427,7 +427,7 @@
       * Update the VR settings for the given settings_id
       *
 diff --git a/handler_impl.hpp b/handler_impl.hpp
-index 7fbae3e..10ba504 100644
+index 6ddc5cb..078ff37 100644
 --- a/handler_impl.hpp
 +++ b/handler_impl.hpp
 @@ -84,6 +84,11 @@ class Handler : public HandlerInterface
@@ -443,18 +443,18 @@
                              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 170304d..836f57f 100644
+index ce751c5..bb814d3 100644
 --- a/ipmi.cpp
 +++ b/ipmi.cpp
-@@ -18,6 +18,7 @@
- 
+@@ -19,6 +19,7 @@
+ #include "bios_setting.hpp"
  #include "bm_instance.hpp"
  #include "bmc_mode.hpp"
 +#include "boot_time_monitor.hpp"
  #include "cable.hpp"
  #include "commands.hpp"
  #include "cpld.hpp"
-@@ -90,6 +91,12 @@ Resp handleSysCommand(HandlerInterface* handler, ::ipmi::Context::ptr ctx,
+@@ -91,6 +92,12 @@ Resp handleSysCommand(HandlerInterface* handler, ::ipmi::Context::ptr ctx,
              return pcieBifurcation(ctx, data, handler, DYNAMIC_BIFURCATION);
          case SysLinuxBootDone:
              return linuxBootDone(data, handler);
@@ -468,10 +468,10 @@
              return accelGetVrSettings(ctx, data, handler);
          case SysSetAccelVrSettings:
 diff --git a/meson.build b/meson.build
-index e1145d7..b7e3f44 100644
+index 7427ab0..b6da226 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -60,6 +60,7 @@ sys_lib = static_library(
+@@ -61,6 +61,7 @@ sys_lib = static_library(
    'eth.cpp',
    'flash_size.cpp',
    'handler.cpp',
@@ -714,7 +714,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 aabec39..ec0fdfc 100644
+index ee7b524..e02740a 100644
 --- a/test/handler_unittest.cpp
 +++ b/test/handler_unittest.cpp
 @@ -307,8 +307,8 @@ void ExpectGetManagedObjects(StrictMock<sdbusplus::SdBusMock>& mock,
@@ -726,8 +726,8 @@
 +                      std::string_view service, std::string_view objPath,
 +                      std::string_view interface, std::string_view function)
  {
-     EXPECT_CALL(
-         mock, sd_bus_message_new_method_call(_,         // sd_bus *bus,
+     EXPECT_CALL(mock, sd_bus_message_new_method_call(
+                           _,         // sd_bus *bus,
 @@ -866,6 +866,198 @@ TEST(HandlerTest, PcieBifurcationDynamic)
      std::remove(testFilename);
  }
@@ -928,7 +928,7 @@
  
  } // namespace ipmi
 diff --git a/test/meson.build b/test/meson.build
-index f7e3bb9..d6f50bd 100644
+index 061b352..80187f2 100644
 --- a/test/meson.build
 +++ b/test/meson.build
 @@ -23,6 +23,7 @@ tests = [
@@ -940,5 +940,5 @@
    'pcie',
    'poweroff',
 -- 
-2.45.1.288.g0e0cd299f1-goog
+2.46.0.295.g3b9ea8a38a-goog