Skip to content
  1. Apr 27, 2024
    • Manojkiran Eda's avatar
      Deprecate the support for x86 sdk · ace4e14d
      Manojkiran Eda authored
      
      
      OpenBMC as a project has moved away from using yocto x86 sdks for unit
      testing. Instead now the preferred way to build and test code is by two
      ways:
      
      1. Leveraging the meson subproject support
      2. Using openbmc docker container
      
      Since x86 sdks needed some weird hacks in the code base like figuring
      out the linker arguments ourselves & running custom bash commands from
      the meson build files. Also with changing yocto code base, its a large
      maintainer burden to make sure this support works.
      
      Tested:
      Code builds & unit tests are passed with both the approaches mentioned
      above.
      
      Change-Id: Iaf55e2c003ffd9ee1a295de5bdfd14d81222e94b
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      ace4e14d
  2. Apr 25, 2024
  3. Apr 24, 2024
    • Manojkiran Eda's avatar
      Remove setup.cfg file from the repository · ac0da58c
      Manojkiran Eda authored
      OpenBMC CI has migrated from using `pycodestyle` to `flake8` as part of
      this[1] commit. Unlike `pycodestyle` , `flake8` does not rely on the
      presence of setup.cfg file in their root path as a trigger, but it runs
      on all repositories by default. Hence there is no need of having
      setup.cfg file, so removing it from the repository.
      
      [1]: https://github.com/openbmc/openbmc-build-scripts/commit/c5ad7ff440cfd94fc025efbd45a3859475b18820
      
      
      
      Change-Id: I8e648f3230d1f2a83b620978b36bda88aba7ebc0
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      ac0da58c
    • Manojkiran Eda's avatar
      common: Improve printBuffer() & added unit tests · cd4cd457
      Manojkiran Eda authored
      
      
      This patchset is improved version of the existing code for several
      reasons:
      
      1.The code is more concise and easier to read. It uses modern C++
      features such as `std::ranges::for_each` and `std::format`, which
      express the intent of the code more clearly compared to the nested
      if-else statements and manual formatting.
      
      2.The code now has fewer lines of code and avoids the need for creating
      and managing an `std::ostringstream` object manually, which simplifies
      the function and reduces the risk of errors.
      
      3.This patch uses type-safe range-based for loop and `uint8_t` type
      directly, whereas the existing code uses `int` for iterating over the
      buffer elements, which may lead to unintentional type conversions or
      loss of precision.
      
      4.While the performance impact may not be significant for this patch,
      using `std::ranges::for_each` with lambdas might allow for more
      optimization opportunities by the compiler compared to the traditional
      loop used in existing code.
      
      Overall, this patchset leverages modern C++ features to achieve the same
      functionality in a more concise, readable, and type-safe manner, making
      it preferable.
      
      Change-Id: I7be547ade053638cb4ca459ee795195f6f0883bf
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      cd4cd457
    • DelphineCCChiu's avatar
      fw-update: Fix variable being used before initialized · 312c3735
      DelphineCCChiu authored
      
      
      Initialize "totalNumComponentUpdates" and "compUpdateCompletedCount" to
      0 to avoid potential errors caused by uninitialized variables.
      
      Change-Id: I27f57330e77f98109a09b3270a3dd6fd50e8fb52
      Signed-off-by: default avatarDelphineCCChiu <delphine_cc_chiu@wiwynn.com>
      312c3735
    • Manojkiran Eda's avatar
      Remove unused variables · bfb929cc
      Manojkiran Eda authored
      
      
      cppcheck flags style warnings to indicate when we declare a variable and
      never use it. Its effective dead code, this patch aims at fixing all the
      [unusedVariable] warnings reported by the openbmc repo-ci.
      
      Change-Id: Ie51176c6b2ced7251b467b2d456e9f3088637121
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      bfb929cc
  4. Apr 23, 2024
  5. Apr 22, 2024
    • Manojkiran Eda's avatar
      libpldmresponder: fix a potential pldm crash · 3daf7a1c
      Manojkiran Eda authored
      
      
      In the current state, pldm does create the sensor/effecter even in the
      absence of the underlying dbus resource. There is a bug in the responder
      code due to which we emplace an empty dbus value map into the handler
      with a sensor ID. And if the remote PLDM endpoint queries for the state
      of the sensor, pldm would crash since it tries to read content from the
      empty dbus value map. This commit would fix the crash by adding
      necessary bound checks.
      
      Testing:
      1. Unit tests passed.
      2. Functionally verified the fix by giving a dummy dbus object path and
      making sure that the sensor/effecter is not created & also ensured that
      pldm does not crash.
      
      Change-Id: I5fb06677f6ae1bd74f9ec741b311f59737caf79d
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      3daf7a1c
  6. Apr 17, 2024
  7. Apr 16, 2024
  8. Apr 15, 2024
    • Archana Kakani's avatar
      pldm: Meson option for system specific bios attributes · 46f352ed
      Archana Kakani authored
      
      
      PLDM users who want to use bios attributes based on the system type
      can enable this meson option.
      With disabled option default bios json files are picked to build
      bios attribute tables.
      
      Added meson option "system-specific-bios-json" to add the support
      for system specific bios attributes.
      Below is the pre-requisite to support system specific bios
      attributes:
      1. Entity Manager service is active
      2. Entity Manager should have Decorator.Compatible interface
         and system type in Names property under this interface
      3. BIOS Attribute json files are added into the folder(Named on
         the System Type property value) and should be installed
         under /usr/share/pldm/bios/
      
      With disabled "system-specific-bios-json" option default bios
      attributes are populated.
      
      Tested:
      Poweron system-specific-bios-json enabled/disabled
      
      Change-Id: I95a953cdb12c344d22f487b83040356a1b5fa937
      Signed-off-by: default avatarArchana Kakani <archana.kakani@ibm.com>
      46f352ed
    • Archana Kakani's avatar
      oem-ibm: PCIe Topology support · d6b00561
      Archana Kakani authored
      
      
      This is the infrastructure commit to support PCIe Topology
      
      PCIe topology refers to the physical arrangement of PCIe devices within
      the system. Topology data contains links connecting PCIe device to the
      PCIe Controller.  This commit adds support for PCIe Topology and Cable
      information filetype. Topology information is provided by host using
      FILIO mechanism.
      This commit adds support for handling
      1. Topology file(PLDM_FILE_TYPE_PCIE_TOPOLOGY)
      2. Cable information file(PLDM_FILE_TYPE_CABLE_INFO)
      
      Tested: Updated Unit test and tested power on.
      
      Change-Id: Ic77f4f9921dd855c61c3929b5a458d80b1691b48
      Signed-off-by: default avatarArchana Kakani <archana.kakani@ibm.com>
      d6b00561
    • Archana Kakani's avatar
      pldm: Build BIOS Table Lazily · 62dd8ff2
      Archana Kakani authored
      Entity manager service hosts the compatible interface and populates the
      Names property with the chassis type. It is seen that the Names property
      is updated pretty late on the way to BMC ready state. And by that time
      pldmd is already creating the bios table assuming that the system type
      is not detected.
      
      To fix this behavior, rather than creating the bios table early, we need
      to wait until we get the system type from the entity manager daemon.
      
      System Type is fetched from Entity Manager Decorator.Compatible
      interface [1].
      
      PLDM registers the service name only after building the BIOS tables, to
      avoids failures to bios updates from other applications
      
      Tested: Power off/On successfully in Simulator
      
      [1] https://github.com/openbmc/entity-manager/commit/9bac6409d4bd684f058517f41de33ba1d17e5666
      
      
      
      Change-Id: I4d431061eaaf8842f6382c2e83807f725653e19b
      Signed-off-by: default avatarArchana Kakani <archana.kakani@ibm.com>
      62dd8ff2
    • Zach Clark's avatar
      Update pldm-softpoweroff application with working values · e98c51b1
      Zach Clark authored
      
      
      This commit updates the pldm-softpoweroff application so that it can
      properly locate the PLDM effecter and sensor PDRs for the graceful
      poweroff request. It also updates the host terminus ID to the correct
      value.
      
      Tested by:
      
      Running the application when Hostboot was IPLing, and also when PHYP
      was at standby.
      
        root@ever39bmc:~# /tmp/pldm-softpoweroff
        Getting the response. PLDM RC = 0
        Timer started waiting for host soft off, TIMEOUT_IN_SEC = 0x1c20
        root@ever39bmc:~# echo $?
        0
      
      Signed-off-by: default avatarZach Clark <zach@ibm.com>
      Change-Id: I7408611881abecfb5169816af032e2fb9d3a8a09
      e98c51b1
    • Sagar Srinivas's avatar
      Softoff: Add config support for PDR entities · 4d99c311
      Sagar Srinivas authored
      
      
      This commit introduces a config file for the soft power off
      app. The config file specifies the order of remote PDRs to
      be checked during the soft power off process.
      
      Previously, the entity type was hardcoded in the codebase,
      limiting scalability. With this change, the softoff app gains
      flexibility for future expansions.
      
      TESTED: By running 'obmcutil poweroff' with various remote
      entities during boot-up.
      
      Signed-off-by: default avatarSagar Srinivas <sagar.srinivas@ibm.com>
      Change-Id: Ib8d2aba6a05fc4e9da4b042fd67890e6282ed784
      4d99c311
  9. Apr 14, 2024
    • Patrick Williams's avatar
      sdbusplus: use shorter type aliases · 897b0f8b
      Patrick Williams authored
      
      
      The sdbusplus headers provide shortened aliases for many types.
      Switch to using them to provide better code clarity and shorter
      lines.  Possible replacements are for:
        * bus_t
        * exception_t
        * manager_t
        * match_t
        * message_t
        * object_t
        * slot_t
      
      Change-Id: Id9161c24e5ed91f7194d6d536a29ecda02e8dc84
      Signed-off-by: default avatarPatrick Williams <patrick@stwcx.xyz>
      897b0f8b
  10. Apr 13, 2024
    • Riya Dixit's avatar
      utils: Retrieval of managed objects of DBUS · 754041d0
      Riya Dixit authored
      
      
      This commit implements functionality to retrieve the managed object of a
      specific DBUS service on a particular path.  Additionally implements a
      function template for inventory objects which efficiently enables
      retrieval of managed object for Inventory Manager.
      
      Tested: Added unit test cases for checking the return value.
      
      Change-Id: Ide652f843db1623bdacebf3e269e03895bbb7f1a
      Signed-off-by: default avatarRiya Dixit <riyadixitagra@gmail.com>
      754041d0
  11. Apr 12, 2024
    • Thu Nguyen's avatar
      pldmd: fix memory leak · efacb6f7
      Thu Nguyen authored
      
      
      `pldmTransport.recvMsg` in `pldmd` will call
      `pldm_transport_af_mctp_recv` in libpldm. This function allocates memory
      of `requestMsg` and copy the MCTP request message data to `requestMsg`.
      `pldmd` should free memory of requestMsg after using.
      
      Tested:
      1. Check the memory usage of `pldmd`. There is no memory leak.
      
      Signed-off-by: default avatarThu Nguyen <thu@os.amperecomputing.com>
      Change-Id: Ie9270509e60790618c1a399fa3c9bf34f6f54907
      efacb6f7
  12. Apr 10, 2024
  13. Apr 02, 2024
  14. Mar 29, 2024
    • nothingIIersonal's avatar
      pldmtool: Add GetSensorReading command · 83e068ad
      nothingIIersonal authored
      
      
      Added GetSensorReading command to get the current sensor
      value and its state.
      
      Tested results:
      ```
      root@bmc:~# pldmtool platform getSensorReading -h
      get the numeric sensor reading
      Usage: pldmtool platform GetSensorReading [OPTIONS]
      
      Options:
        -h,--help                   Print this help message and exit
        -m,--mctp_eid UINT          MCTP endpoint ID
        -v,--verbose
        -n,--retry-count UINT       Number of retry when PLDM request
      message is failed
        -i,--sensor_id UINT REQUIRED
                                    Sensor ID that is used to identify
      and access the sensor
        -r,--rearm UINT REQUIRED    Manually re-arm EventState after
      responding to this request
      root@bmc:~# pldmtool platform getSensorReading -m9 -r0 -i300
      {
          "sensorDataSize": "uint8",
          "sensorOperationalState": "Sensor Enabled",
          "sensorEventMessageEnable": "Sensor Events Enabled",
          "presentState": "Sensor Normal",
          "previousState": "Sensor Unknown",
          "eventState": "Sensor Normal",
          "presentReading": 38
      }
      ```
      
      Change-Id: I83a111eef73ee20a06c699405a9cdf1f848dd66a
      Signed-off-by: default avatarRuslan Magomedov <velochimc@mail.ru>
      83e068ad
  15. Mar 26, 2024
    • Manojkiran Eda's avatar
      Add support for Previous State in Sensor events · ae933cc2
      Manojkiran Eda authored
      
      
      Previously, the sensor events generated by the PLDM stack only
      included the current state of the sensor without any reference
      to the previous state.
      
      This commit introduces a new feature to address this limitation
      by caching the previous states of all sensors.
      
      The enhancement ensures that platform event messages(sensor events)
      now contain the correct previous state information alongside the
      current state.
      
      Behavior Model:
      1. Upon the initial occurrence of a sensor event, both the current
         state and the previous state are identical, adhering to the
         specification.
      2. Subsequently, when the PLDM stack sends out sensor events, it
         retrieves the previous state from its cache and populates it
         accordingly.
      
      Testing:
      1. Example: Change the value of a sensor, such as dimm8 identify, to
         false using busctl.
         Tx: 81 02 0a 01 00 00 4d 00 01 00 [ 01 01 ]
      - Note: Initially, both the event state and the previous state are 01.
      
      2. Change the value of dimm8 identify to true.
         Tx: 81 02 0a 01 00 00 4d 00 01 00 [ 02 01 ]
      - Result: Event state: 02, Previous state: 01.
      
      3. Change the value of dimm8 identify back to false.
         Tx: 81 02 0a 01 00 00 4d 00 01 00 [ 01 02 ]
      - Result: Event state: 01, Previous state: 02.
      
      4. Similar results can be obtained using the getStateSensorReadings
         command for the same sensor at respective times.
      
      Change-Id: Ic93a55e61fd5128cecc698b3555a6639876882ed
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      ae933cc2
  16. Mar 12, 2024
  17. Mar 11, 2024
  18. Mar 06, 2024
    • Pavithra Barithaya's avatar
      oem-ibm: Access key update support · c8bcefbe
      Pavithra Barithaya authored
      An “Update Access Key” (UAK) is checked when applying system
      firmware updates. Entitled updates are applied if the embedded
      expiration date of the UAK is later than the firmware release date.
      
      Host provides us the Firmware User Access Key (FW UAK) Date to BMC in
      the genesis boot as it will have license information and only Host
      has the knowledge of it. Also the BMC can use this value even when
      host is not running.
      
      The commit implements the support for access key
      update in PLDM. The host sends a setFruRecordTable command with
      the value to be updated.
      PLDM uses the WriteKeyword method [1] since that will update both the
      D-Bus cache and the VPD backplane.
      
      [1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/com/ibm/VPD/Manager.interface.yaml
      
      
      
      Signed-off-by: default avatarPavithra Barithaya <pavithra.b@ibm.com>
      Change-Id: Ib089787db3a3c42eedb833852dc48b8fa87be7e4
      c8bcefbe
  19. Mar 05, 2024
    • Sampa Misra's avatar
      oem-ibm: Check if a FRU is IBM specific · 245fc6f1
      Sampa Misra authored
      
      
      The major difference between the standard FRUs
      and the IBM specific FRUs is the format in which
      the VPD data is written and its model type.
      If the model property is filled it is a IBM specific FRU,
      if not then that can be an industry standard FRU.
      
      Change-Id: I9c01b99e37107bc3caeb88336626bc9e514e78f0
      Signed-off-by: default avatarSampa Misra <sampmisr@in.ibm.com>
      245fc6f1
  20. Feb 28, 2024
  21. Feb 26, 2024
    • Manojkiran Eda's avatar
      Remove Sampa from the maintainers list · 15e998ba
      Manojkiran Eda authored
      
      
      I appreciate the contributions made by @Sampa to the OpenBMC
      project. However, I haven't seen any active involvement from her
      since 2021. While it's understandable that priorities may shift,
      I want to express gratitude for her past contributions.
      
      Thank you Sampa, for your past efforts.
      
      Change-Id: I91c6ba7553753dfbc0c31b42b1553f3942bc3ffa
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      15e998ba
  22. Feb 23, 2024
  23. Feb 22, 2024
    • Sagar Srinivas's avatar
      Add state set id support for remote sensor events · e3607a3c
      Sagar Srinivas authored
      
      
      In the current state, PLDM does not support having a state set ID
      field in the event JSONs, this commit would add that support in
      PLDM there by allowing hosts to have multiple sensors with the
      same entity instance number, type and container id, but with different
      state sets.
      
      TESTED: with pldmtool raw commands sending sensor events to the BMC.
      
      Signed-off-by: default avatarSagar Srinivas <sagar.srinivas@ibm.com>
      Change-Id: If9bb9bde27d6b35f5904ac199801dbdffde0f57e
      e3607a3c
    • Manojkiran Eda's avatar
      skip creating effecter when its dbus isn't present · c81d1129
      Manojkiran Eda authored
      
      
      In the current state, we attempt to create an effecter PDR even if
      the D-Bus object that is being modeled as an effecter is absent at
      the time of creation.
      
      However, this behavior may not be beneficial, as assuming that the
      D-Bus backend will magically appear later does not necessarily mean
      that we will be able to process it, we only process the JSON files
      during the first getPDR request. Therefore, it would be more efficient
      to skip creating the effecter in the absence of the D-Bus object.
      
      This commit also addresses an error trace by including the dbus object
      path when it is not present on the system, rather than the opaque
      effecter id number which does not provide contextual information and
      may make it harder to diagnose issues.
      
      Change-Id: I84239c75684f611b7985df027a93ba4531f783d0
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      c81d1129
    • Manojkiran Eda's avatar
      skip creating sensors when its dbus is not present · 819bb6f1
      Manojkiran Eda authored
      
      
      In the current state, we attempt to create a sensor PDR even if the
      D-Bus object that is being modeled as a sensor is absent at the time
      of creation.
      
      However, this behavior may not be beneficial, as assuming that the
      D-Bus backend will magically appear later does not necessarily mean
      that we will be able to process it and send sensor events, since we
      only process the JSON files only during the first getPDR request.
      Therefore, it would be more efficient to skip creating a sensor during
      the absence of the D-Bus object.
      
      This commit also addresses an error trace by including the dbus object
      path when it is not present on the system, rather than the opaque sensor
      id number which does not provide contextual information and may make it
      harder to diagnose issues.
      
      Change-Id: I5747319f15c212ab6654b9d7accfce28782c9565
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      819bb6f1
  24. Feb 19, 2024
    • Pavithra Barithaya's avatar
      oem:ibm :Implement SetFruRecordTable · a410c658
      Pavithra Barithaya authored
      
      
      The commit implements the setFruRecordTable command
      and also updates the DBus property for the IBM cable cards
      for which the host sends a setFruRecordTable command.
      
      Tested: using pldmtool
      
      Signed-off-by: default avatarPavithra Barithaya <pavithra.b@ibm.com>
      Change-Id: I70e4f85f627577d8ca1bc90447b10e9e2e8e7ccd
      a410c658
    • Kamalkumar Patel's avatar
      Enhancing misguiding error trace · 2a103ef1
      Kamalkumar Patel authored
      
      
      - There are some of the listed paths below which don't have "Present"
      property. Due to this, the FRU present property check was throwing
      "Resource not found" error which misguides the user.
      
      - The commit adds support to fix this misguiding error trace.
      
      Paths:
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0/fan0_0
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan0/fan0_1
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1/fan1_0
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan1/fan1_1
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2/fan2_0
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan2/fan2_1
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3/fan3_0
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan3/fan3_1
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan4/fan4_0
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan4/fan4_1
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan5/fan5_0
      /xyz/openbmc_project/inventory/system/chassis/motherboard/fan5/fan5_1
      
      Change-Id: I5a8fae3a5dbae428f14ccc90aeba8319a48c11b2
      Signed-off-by: default avatarKamalkumar Patel <kamalkumar.patel@ibm.com>
      2a103ef1
Loading