Skip to content
  1. Jul 26, 2023
    • Manojkiran Eda's avatar
      bump cryptography from 3.4.7 to 39.0.1 · 118465cf
      Manojkiran Eda authored
      
      
      Here is the change log:
      
      ```
      * SECURITY ISSUE - Fixed a bug where Cipher.update_into accepted Python buffer protocol objects, but allowed immutable buffers [CVE-2023-23931]
      * Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.0.8.
      ```
      
      Change-Id: I3a5f88506c6bc560c66c6b0bb8005bc2d133f3ea
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      118465cf
  2. Jul 25, 2023
    • Jeremy Kerr's avatar
      tools: fw-update: allow ISO 8610 date formats · 99e8b983
      Jeremy Kerr authored
      
      
      Currently, the ReleaseDateTime data is expected to be in a
      "%d/%m/%Y %H:%M:%S" format.
      
      However, this is ambiguous (ie., is locale-specific).
      
      This change adds supoort to allow an ISO 8601 format of:
      
       "%Y-%m-%dT%H:%M:%S"
      
      and a relaxed version with the 'T' separator replaced with a space:
      
       "%Y-%m-%d %H:%M:%S"
      
      Update the readme and example json to switch to the preferred format.
      
      Signed-off-by: default avatarJeremy Kerr <jk@codeconstruct.com.au>
      Change-Id: Ica3ae824979df6b666b8abb619ceaedffd90b374
      99e8b983
    • Jeremy Kerr's avatar
      tools: fw-update: Don't wrap datetime parsing in a catch KeyError block · b1475015
      Jeremy Kerr authored
      
      
      Currently, all of the datetime parse is wrapped in a `catch KeyError`
      block. However, the only part of this that would raise a KeyError is
      where we extract the PackageReleaseDateTime from the metadata dict.
      
      Instead, just do the key lookup separately, and parse outside of the
      catch block.
      
      Then, since we're handling a default anyway, just use .get() and then we
      don't need to catch the KeyError.
      
      Signed-off-by: default avatarJeremy Kerr <jk@codeconstruct.com.au>
      Change-Id: Iae6b92383af4fe49770e77005fcb575faa125703
      b1475015
  3. Jul 24, 2023
    • Andrew Jeffery's avatar
      libpldmresponder: Migrate to pldm_entity_association_pdr_add_check() · b0ba34d1
      Andrew Jeffery authored
      
      
      pldm_entity_assocation_pdr_add() is deprecated in libpldm as it used
      assert() for handling error cases.
      pldm_entity_association_pdr_add_check() instead returns a value
      indicating success or failure.
      
      We throw a std::runtime_error for now which at least unwinds the stack,
      unlike assert(). With this approach the problem is reduced to needing to
      refactor internal pldmd APIs, rather than despairing at libpldm aborting
      the process out of existence.
      
      Signed-off-by: default avatarAndrew Jeffery <andrew@aj.id.au>
      Change-Id: I08ebafc94cd7a392ec8f18b6c5feb75ba72cd028
      b0ba34d1
  4. Jul 21, 2023
    • vkaverap@in.ibm.com's avatar
      PLDM: Comment explaining dbus-timeout-value option · c0b0e7b1
      vkaverap@in.ibm.com authored
      
      
      To give more clarity, this commit adds an elaborate comment in
      meson_options explaining why 5 seconds DBUS timeout value was
      chosen for PLDM.
      
      Change-Id: Icbfcb2c0521810ad1d31835ff8ccda67abd0e858
      Signed-off-by: default avatarvkaverap@in.ibm.com <vkaverap@in.ibm.com>
      c0b0e7b1
    • Pavithra Barithaya's avatar
      Pldmtool change to fetch pdrs based on TerminusID · a340eed8
      Pavithra Barithaya authored
      This commit adds a new option "-n" to getPDR in the pldmtool using
      which we can retrieve the PDRs based on the terminus ID.
      
      Tested:
       ./pldmtool platform getpdr -h
      get platform descriptor records
      Usage: ./pldmtool platform GetPDR [OPTIONS]
      
      Options:
        -h,--help                   Print this help message and exit
        -m,--mctp_eid UINT          MCTP endpoint ID
        -v,--verbose
      [Option Group: Required Option]
        Retrieve individual PDR, all PDRs, PDRs of a requested type or retrieve all PDRs of the requested terminusID
        [Exactly 1 of the following options is required]
        Options:
          -d,--data UINT              retrieve individual PDRs from a PDR Repository
                                      eg: The recordHandle value for the PDR to be retrieved and 0 means get first PDR in the repository.
          -t,--type TEXT              retrieve all PDRs of the requested type
                                      supported types:
                                      [terminusLocator, stateSensor, numericEffecter, stateEffecter, EntityAssociation, fruRecord, ... ]
          -i,--terminusID UINT          retrieve all PDRs of the requested terminusID
                                      supported IDs:
                                       [1, 2, 208...]
          -a,--all                    retrieve all PDRs from a PDR repository
      
      Example 1:
      ./pldmtool platform getpdr -i 0
      []
      
      Example 2:
      ./pldmtool platform getpdr -i 2
      Copied the output here:
      https://gist.github.com/Pavithrab7/4218104bc7e58951ff91fe5b49e562b0
      
      
      
      Change-Id: I8b78818abbbbb3678e180d2bd1f38017454fd0d3
      Signed-off-by: default avatarPavithra Barithaya <pavithra.b@ibm.com>
      a340eed8
    • Kamalkumar Patel's avatar
      Adding BIOS attribute to select OS load source · 1553152a
      Kamalkumar Patel authored
      
      
      - Previously user had to do this configuration of selecting load
      source, alternate load source and DASD load source manually,
      and this was tedious task. These are network adapters connected
      to PCI slots whose part location information is available in redfish.
      - Adding bios attribute to handle selection of PCI slot location codes
      for these network adapters to be selected from the GUI webpage, GUI
      would then populate these BIOS attributes through redfish and this
      selection will be communicated to Host via these PLDM BIOS attributes.
      
      Change-Id: I7fa7cefe3323f4b21fb0335d0292ee136424fbe9
      Signed-off-by: default avatarKamalkumar Patel <kamalkumar.patel@ibm.com>
      1553152a
  5. Jul 20, 2023
    • Patrick Williams's avatar
      .gitignore: simplify due to meson · 5cf056b0
      Patrick Williams authored
      
      
      There is a lot of cruft left in the .gitignore from when this
      repository was built using autotools and when it included libpldm,
      so simplify it.
      
      Signed-off-by: default avatarPatrick Williams <patrick@stwcx.xyz>
      Change-Id: Ice4f5fea1d0e19bea71643a56df06df547763642
      5cf056b0
    • Patrick Williams's avatar
      use std::move_only_function · cdbb9e27
      Patrick Williams authored
      
      
      Since enabling C++23, we can eliminate the need for `function2` and
      instead leverage `std::move_only_function`.
      
      Signed-off-by: default avatarPatrick Williams <patrick@stwcx.xyz>
      Change-Id: Iafc70c918e38b429e586bf18f71a716bdede43f8
      cdbb9e27
    • Manojkiran Eda's avatar
      Fix spacings in meson_options · e8fd5fb9
      Manojkiran Eda authored
      
      
      The meson_options.txt looks to be very cumbersome and is difficult to
      read & maintain due to in-consistent white spacing, and the lines are
      longer than 80 characters.
      
      This commit would fix those by migrating the syntax to new lines for
      each option key, also warps the comments and the description to
      80 characters & uses multilines for descriptions that are larger than 80
      characters.Doing this should make this file more maintainable in future.
      
      Change-Id: Ic8421cc21b8809c659be8e63b02b6877542a47fd
      Signed-off-by: default avatarManojkiran Eda <manojkiran.eda@gmail.com>
      e8fd5fb9
  6. Jul 19, 2023
  7. Jul 12, 2023
  8. Jul 11, 2023
  9. Jul 06, 2023
    • Andrew Jeffery's avatar
      pldmd: Account for pldm_pdr_init() returning NULL · acb20299
      Andrew Jeffery authored
      
      
      Historically, libpldm's pldm_pdr_init() has internall used assert() to
      enforce that the returned value is not NULL. Efforts are underway to
      remove this reliance on assert() in libpldm to ensure consumers aren't
      ungracefully terminated.
      
      This change chooses to return an appropriate error to the
      caller of pldmd's internal APIs where possible. However, in a number of
      circumstances there was either not a sensible value that could be
      returned, or it was not possible to return a value without further
      refactoring. In these circumstances we choose to throw
      `std::runtime_error`, which will at least do what it can to unwind.
      While it may feel like it falls short of proper error handling, the
      reality is the calling code is already structured such that it pretends
      allocation failures never occur. The switch to throwing a runtime error
      makes a strict improvement over the immediate termination implemented by
      assert().
      
      Signed-off-by: default avatarAndrew Jeffery <andrew@aj.id.au>
      Change-Id: Ibb6bc3abf62e32f05ac079453853873298db6c4f
      acb20299
    • Andrew Jeffery's avatar
      bios_utils: BIOSTableIter: Failure to create iter throws exception · 47266d6f
      Andrew Jeffery authored
      
      
      It's possible that the heap allocation invoked by
      pldm_bios_table_iter_create() fails. The existing behaviour is to
      assert() in the implementation that it hadn't failed, but that will be
      changed to instead have the API return NULL.
      
      Check for the NULL condition with the understanding that it may occur in
      the future, and if observed, throw an exception to uphold the existing
      assumptions in the code.
      
      Signed-off-by: default avatarAndrew Jeffery <andrew@aj.id.au>
      Change-Id: I20016e8db4c814017306cc68a536a9c232c74e0e
      47266d6f
    • Andrew Jeffery's avatar
      pldm: Migrate off deprecated libpldm BIOS table entry encoding APIs · d15ecf92
      Andrew Jeffery authored
      
      
      libpldm has deprecated the affected APIs. Prefer using their `*_check()`
      variants as these return an error code rather than prevent misbehaviour
      with assert().
      
      1. pldm_bios_table_attr_entry_integer_encode()
      2. pldm_bios_table_attr_value_entry_encode_enum()
      3. pldm_bios_table_attr_value_entry_encode_string()
      4. pldm_bios_table_attr_value_entry_encode_integer()
      
      Tested: Successfully booted a p10bmc host, dumped each of the BIOS
              tables with pldmtool without issue
      
      Signed-off-by: default avatarAndrew Jeffery <andrew@aj.id.au>
      Change-Id: I823b24884e518f8c53fd153b3bc30569595ecd86
      d15ecf92
  10. Jul 04, 2023
  11. Jun 23, 2023
    • Andrew Jeffery's avatar
      oem: ibm: Use `truncate(1)` to create NVRAM related files · 95c872c1
      Andrew Jeffery authored
      
      
      Use of `dd(1)` results in back-to-back `read(2)` and `write(2)` syscalls;
      the performance of `dd(1)` is O(n) with respect to the file size. Poor
      choice of the `bs=` parameter to `dd(1)` can significantly amplify the
      amount of syscalls required to achieve the task.
      
      By contrast, `truncate(1)` generally invokes a single syscall, either
      `truncate(2)` or `ftruncate(2)`. As a consequence, `truncate(1)` is O(1)
      with respect to file size.
      
      Switch to `truncate(1)` to improve runtime efficiency of the scripts.
      
      Signed-off-by: default avatarAndrew Jeffery <andrew@aj.id.au>
      Change-Id: I69dd925f36e733fc2a1ee71cb8354ee04ee8871b
      95c872c1
  12. Jun 22, 2023
    • Andrew Jeffery's avatar
      pldm: Convert to pldm_bios_table_*_check() APIs · 488f19d0
      Andrew Jeffery authored
      The pldm_bios_table_*_check() APIs wrap around unchecked equivalents
      that only sanitize their parameters using assert(). The checks included
      in the pldm_bios_table_*_check() APIs test the same conditions that
      would trigger the assert()s in the unchecked APIs but instead return an
      error code on failure.
      
      Use of the unchecked APIs has the potential to blow up the pldmd
      process, but also requires that libpldm continue to be built with
      `-UNDEBUG` to avoid undefined behaviour (by aborting the process). This
      impacts the performance of the library in addition to be a bit of a UX
      disaster.
      
      The unchecked APIs are deprecated in libpldm as a step improve its
      safety and code generation:
      
      https://gerrit.openbmc.org/c/openbmc/libpldm/+/64179
      
      
      
      Tested: Booted the host on a p10bmc system with the patch applied.
      
      Signed-off-by: default avatarAndrew Jeffery <andrew@aj.id.au>
      Change-Id: I9677a7fa5ca59d04865963b367f3bb55c8676cfb
      488f19d0
  13. Jun 16, 2023
  14. Jun 15, 2023
    • vkaverap@in.ibm.com's avatar
      PLDM : Change the dbus timeout to 5 seconds · 9138c209
      vkaverap@in.ibm.com authored
      
      
      Dbus timeout value for every dbus call in PLDM is set to 5 seconds
      instead of default 25 seconds so that all dbus calls that expect a
      reply exists after 5 seconds if there is no response from the client.
      While BMC is still waiting for a response on any dbus calls it is
      possible that host can timeout and return an error.
      Another reason is that memory address from where BMC would read data
      sent by host may get deallocated after 20 seconds and it is possible
      for this to happen even before BMC has read the data. This has lead
      to DMA issues.
      
      Tested by adding a sleep for 10 seconds inside main function of
      phospher-host-postd and executed get dbus property on snoopd
      interface from pldm. PLDM dbus call timed out after 5 seconds.
      
      Change-Id: I1aa1b4ad7fceff2224a3ccc3bcf6abd5705963bc
      Signed-off-by: default avatarVarsha Kaverappa <vkaverap@in.ibm.com>
      9138c209
  15. Jun 13, 2023
  16. Jun 12, 2023
    • Asmitha Karunanithi's avatar
      Bios: support IPv4-mapped IPv6 address length · d15fa099
      Asmitha Karunanithi authored
      
      
      The existing code will allow ::<ipv4_address> without
      any error. However, if the address is expanded like the
      below, there will be "length out of range" error:
      0000:0000:0000:0000:0000:ffff:xxx.xxx.xxx.xxx
      
      This commit changes the maximum string length of
      IPv6 address from 39 to 45, to support IPv4-mapped
      IPv6 address.
      
      Change-Id: I8c6e90e5a0ddbf38e7826e5918408b5d29811bfd
      Signed-off-by: default avatarAsmitha Karunanithi <asmitk01@in.ibm.com>
      d15fa099
  17. Jun 09, 2023
    • Jayashankar Padath's avatar
      oem-ibm: Support new UTIL keywords · 9701cf17
      Jayashankar Padath authored
      
      
      This commit adds new UTIL record keywords RT, F5 and F6 under the
      motherboard. F5 and F6 keywords are used to fill up the desired
      host splash screen name displayed at the host console. The RT
      keyword is used to hold the record name.
      
      Tested: Verified that the name filled up through the F5 and F6
      keywords are displayed at the host splash screen
      
      Change-Id: I26f1c03db3e9f6a5b8cdc435d9e80d7c92563e16
      Signed-off-by: default avatarJayashankar Padath <jayashankar.padath@in.ibm.com>
      9701cf17
  18. Jun 02, 2023
    • Dung Cao's avatar
      pldmtool: Close socket connection · 2b85d784
      Dung Cao authored
      
      
      With pldm commands like getPDR, pldmtool opens new socket for each PDR.
      In case we have hundred number of PDRs, pldmtool open hundred number of
      socket connection to server. It causes mctp-demux (role as server) reach
      limit number of clients can handle.
      
      So pldmtool should close socket connection to server after completely
      using it.
      
      Signed-off-by: default avatarDung Cao <dung@os.amperecomputing.com>
      Change-Id: I66fb00cd2d51f131c8901a8964552bcb2fc1de13
      2b85d784
  19. May 30, 2023
    • Andrew Geissler's avatar
      remove OSStart as indication host is running · 558714d0
      Andrew Geissler authored
      
      
      The host firmware (at least for IBM) never implemented this boot
      progress when starting the OS. Instead, another host firmware team is
      utilizing it to indicate an earlier part of the boot.
      
      Therefore this boot progress code should not be treated as if the host
      is running.
      
      Signed-off-by: default avatarAndrew Geissler <geissonator@yahoo.com>
      Change-Id: I453ec41af804db880a99b62105b510464b147efa
      558714d0
    • Thu Nguyen's avatar
      pldmtool: Use instanceId from libpldm for raw command · 66871b4d
      Thu Nguyen authored
      
      
      In the pldmtool raw command, instanceId is inputted in raw data. It
      does  not use the retrievedi one from the instanceId database by
      exec() in pldm_cmd_helper. This causes the failure when the response
      handler frees this provided instanceId because that instanceID is not
      in libpldm database. To fix that, the inputted instanceId will be
      ignored and the retrieved instanceId from libpldm will be used.
      
      Tested:
      1. No "Invalid instance ID" in the journal log when running "pldmtool
      raw" commands.
      
      Signed-off-by: default avatarThu Nguyen <thu@os.amperecomputing.com>
      Change-Id: I310f699e2d87ba2fa16b69350fdd7fa69d9598f9
      66871b4d
    • ThuBaNguyen's avatar
      softoff: Fix the CI error · 499a29dd
      ThuBaNguyen authored
      
      
      The CI for new patch set report errors in softoff code.
      
      '''
      ../softoff/softoff.cpp: In member function 'int pldm::SoftPowerOff::getSensorInfo()':
      ../softoff/softoff.cpp:263:14: error: 'pdr' may be used uninitialized [-Werror=maybe-uninitialized]
        263 |         auto possibleStatesStart = pdr->possible_states;
            |              ^~~~~~~~~~~~~~~~~~~
      ../softoff/softoff.cpp:249:32: note: 'pdr' was declared here
        249 |         pldm_state_sensor_pdr* pdr;
      cc1plus: all warnings being treated as errors
      '''
      
      Update code to fix that.
      
      Signed-off-by: default avatarThuBaNguyen <thu@os.amperecomputing.com>
      Change-Id: Ib9df9f79978941ebad62164866cc688412a08922
      499a29dd
    • Rashmica Gupta's avatar
      pldmd: Add details to InstanceIdDb::free error msg · f411742d
      Rashmica Gupta authored
      
      
      and remove unnecessary `struct` from class variable;
      
      Change-Id: Id7e76bd8f6123cc47d27cfc232a2a9186f2cad06
      Signed-off-by: default avatarRashmica Gupta <rashmica@linux.ibm.com>
      f411742d
Loading