a065eccb | 26-Oct-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
msgbuf: Drop unnecessary buffer size arithmetic in array helpers
If we're going to multiply we need to guard against the result overflowing. However, we don't need to multiply to derive `len` as the
msgbuf: Drop unnecessary buffer size arithmetic in array helpers
If we're going to multiply we need to guard against the result overflowing. However, we don't need to multiply to derive `len` as the sizeof() expression always evaluates to 1 by definition, yielding `count`.
Drop the derivation of `len` to clarify that overflow can't occur.
Change-Id: I47b8804663518cdbcc70efa2bce14e4edf6702a2 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
51230a0a | 10-Nov-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
pdr: Remove redundant constant for minimum numeric sensor PDR length
The minimum length of the PDR message is defined as `PLDM_PDR_NUMERIC_SENSOR_PDR_MIN_LENGTH` in `libpldm/platform.h`. No need to
pdr: Remove redundant constant for minimum numeric sensor PDR length
The minimum length of the PDR message is defined as `PLDM_PDR_NUMERIC_SENSOR_PDR_MIN_LENGTH` in `libpldm/platform.h`. No need to redefine.
Fixes: 7992eb8415cb ("Add numeric sensor PDR and sensor aux names PDR") Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: Ia8564d92c8683fa29572dc4662dc0edd8f726a73
show more ...
|
cd07fec7 | 10-Nov-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
`pldm_msgbuf_extract_sensor_value()` extracts the sensor value from the pldm_msgbuf. The type of the `tag` should be the sensor
msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
`pldm_msgbuf_extract_sensor_value()` extracts the sensor value from the pldm_msgbuf. The type of the `tag` should be the sensor data type but not the effecter data type. Change the input `tag` parameter type from `pldm_effecter_data_size` to `pldm_sensor_readings_data_type`.
Fixes: 840b140a92aa ("platform: pldm_msgbuf for decode_get_sensor_reading_resp()") Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I3e7da13c2d3260026bb15c7127c08087ea46593f
show more ...
|
c6c391d6 | 08-Nov-2023 |
George Liu <liuxiwei@inspur.com> |
pdr: Add preconditions for pldm_entity_association_tree_copy_root()
pldm_entity_association_tree_copy_root() requires that the arguments passed point to valid objects. Ensure this is documented, and
pdr: Add preconditions for pldm_entity_association_tree_copy_root()
pldm_entity_association_tree_copy_root() requires that the arguments passed point to valid objects. Ensure this is documented, and add assert()s for early warning of precondition violation in debug builds
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I15f4f10d5e7a8cebfffae94bb868a905c7c98f3d
show more ...
|
a98814fc | 29-Nov-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
oem: meta: stabilise decode_oem_meta_file_io_req()
Use of decode_oem_meta_file_io_req() is demonstrated in:
67050: Support OEM-META write file request for post code history https://gerrit.openbmc.o
oem: meta: stabilise decode_oem_meta_file_io_req()
Use of decode_oem_meta_file_io_req() is demonstrated in:
67050: Support OEM-META write file request for post code history https://gerrit.openbmc.org/c/openbmc/pldm/+/67050
Change-Id: I03cfd68f279f9bfdf515ca4302561ca0464c75cc Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
39eb3224 | 17-Nov-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
pdr: Assign record_handle in entity_association_pdr_add_children()
The entity_association_pdr_add_children() static API was hard coding the record handle value to 0 rather than assigning the record_
pdr: Assign record_handle in entity_association_pdr_add_children()
The entity_association_pdr_add_children() static API was hard coding the record handle value to 0 rather than assigning the record_handle value provided as a input parameter.
Tested: Unit tested
Fixes: 25ddbccfae0e ("pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()") Change-Id: I96b6a340f027abd2ef4009380a2fcf27742531bd Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
22fad395 | 26-Oct-2023 |
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> |
oem: meta: Add decode_oem_meta_file_io_req()
Support decode_oem_meta_file_io_req() cmd to decode the incoming post code.
PLDM OEM Meta Write File IO cmd: Example: Request: Byte 0: 0x3F (OEM c
oem: meta: Add decode_oem_meta_file_io_req()
Support decode_oem_meta_file_io_req() cmd to decode the incoming post code.
PLDM OEM Meta Write File IO cmd: Example: Request: Byte 0: 0x3F (OEM cmd) Byte 1: 0x02 (FILE IO) Byte 2: 0x00 (File io type : POST CODE) Byte 3-6: 0x04 (Data length) Byte 7-10: 0x93 0xE0 0x00 0xEA (post code)
Response: Byte 0: 0x00 (success)
Tested: - Unit Tests passed.
Change-Id: I85437698642dd3cbe6084acf1feada842d206eac Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
show more ...
|
3a267059 | 13-Nov-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
The usage of pldm_entity_association_pdr_add_from_node_with_record_handle() is demonstrated here:
https://gerrit.openbm
pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
The usage of pldm_entity_association_pdr_add_from_node_with_record_handle() is demonstrated here:
https://gerrit.openbmc.org/c/openbmc/pldm/+/63125
Change-Id: I564d2253402b22af561ebf710f33c142b70b2e16 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
4a307bca | 13-Nov-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
pdr: Stabilise pldm_pdr_find_last_in_range() API
Use of pldm_pdr_find_last_in_range() API is demonstarted here: https://gerrit.openbmc.org/c/openbmc/pldm/+/63125
Change-Id: Idf51abc591fd2e2ab31f3b7
pdr: Stabilise pldm_pdr_find_last_in_range() API
Use of pldm_pdr_find_last_in_range() API is demonstarted here: https://gerrit.openbmc.org/c/openbmc/pldm/+/63125
Change-Id: Idf51abc591fd2e2ab31f3b7e1d2957d1345702e7 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
1077d2d1 | 27-Nov-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
meson: Configure abi-dumper for mixed headers
We split the headers between include/ and src/ dependening on their purpose and use different include strategies to differentiate. There's no restrictio
meson: Configure abi-dumper for mixed headers
We split the headers between include/ and src/ dependening on their purpose and use different include strategies to differentiate. There's no restriction on the header names, so make sure abi-dumper is aware.
Change-Id: I21a6da776ce8bbf5d5d1e328f44e9cd650406dea Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
75eea49e | 27-Nov-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
meson: Sort abi-dumper output
It turns out that it helps to read the man-page! Hopefully this makes the show a whole lot more manageable.
Change-Id: I2b44a457702f1792617c0d76a443bd27b85c1515 Signed
meson: Sort abi-dumper output
It turns out that it helps to read the man-page! Hopefully this makes the show a whole lot more manageable.
Change-Id: I2b44a457702f1792617c0d76a443bd27b85c1515 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
efb40069 | 09-Nov-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
libpldm: More fixes for header use
b0c1d20a5bde ("libpldm: Fix header use") only did half the job, addressing compilation concerns for the library itself. As it turns out there were still plenty of
libpldm: More fixes for header use
b0c1d20a5bde ("libpldm: Fix header use") only did half the job, addressing compilation concerns for the library itself. As it turns out there were still plenty of places that used local includes for paths to the public headers.
Apply the rest of the header cleanups to hopefully get us into a consistent state.
Fixes: b0c1d20a5bde ("libpldm: Fix header use") Change-Id: I8d4b59c9241770583abb30389452af0a32b18b99 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
d12dd36e | 09-Nov-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
libpldm: Rationalise the local and installed path of pldm.h
Since chopping libpldm out of openbmc/pldm.git there's been a symlink from `include/libpldm/pldm.h` pointing to `include/libpldm/requester
libpldm: Rationalise the local and installed path of pldm.h
Since chopping libpldm out of openbmc/pldm.git there's been a symlink from `include/libpldm/pldm.h` pointing to `include/libpldm/requester/pldm.h`. The file list contained in the `libpldm_headers` variable defined by `include/libpldm/meson.build` contained an entry for `requester/pldm.h`, though not the symlink found at `include/libpldm/pldm.h`.
Prior to a7989cd65d51 ("meson: Fix for OEM header collision issue") `install_headers(libpldm_headers, ...)` directive didn't specify `preserve_path: true`, therefore the `requester/pldm.h` header file was installed directly under `${INCLUDEDIR}/libpldm` as `${INCLUDEDIR}/libpldm/pldm.h`, and no file was installed to `${INCLUDEDIR}/libpldm/requester/pldm.h`.
All dependent applications using the declarations in `pldm.h` therefore included the header using the directive `#include <libpldm/pldm.h>`. However, internal to the libpldm implementation we were using the non-symlinked path in the local tree: `#include "libpldm/requester/pldm.h"`
With a7989cd65d51 ("meson: Fix for OEM header collision issue") we rationalised the meson variables used to install the headers as part of properly separating OEM headers from one-another. This lead to specifying `preserve_path: true` for the `install_headers(libpldm_headers, ...)` meson directive, which further lead to the installed location of `pldm.h` changing to `${INCLUDEDIR}/libpldm/requester/pldm.h`. This broke all consuming applications which were necessarily using `#include <libpldm/pldm.h>` as outlined above.
Get rid of the symlink at `include/libpldm/pldm.h`, move `include/libpldm/requester/pldm.h` there instead, and fix up all internal references to the header. This unbreaks applications consuming libpldm, and prevents internal inconsistencies going forward.
Fixes: a7989cd65d51 ("meson: Fix for OEM header collision issue") Change-Id: I24f1e25303890c41fd3da6323c67d838022cc55d Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
5664cf20 | 07-Nov-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
meson: Move ABI compliance check alongside library target
In the spirit of keeping-things-that-are-together-together.
Change-Id: I8e75beae84da06fe1f9a32de569a1816ae093be9 Signed-off-by: Andrew Jeff
meson: Move ABI compliance check alongside library target
In the spirit of keeping-things-that-are-together-together.
Change-Id: I8e75beae84da06fe1f9a32de569a1816ae093be9 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
a7989cd6 | 30-Oct-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
meson: Fix for OEM header collision issue
It needs to be possible to build libpldm with any number of oem features enabled simultaneously. If the header files are same then the earlier implementatio
meson: Fix for OEM header collision issue
It needs to be possible to build libpldm with any number of oem features enabled simultaneously. If the header files are same then the earlier implementation will not work.
Install the header file in a way that doesn't break any oem portions. Also the symlinks are generated to the older location until we migrate the applications using the files to new location.
Tested: The headers are installed in the new location and symlinks are generated.
Change-Id: I1455d52ff4b0c7f74b49d136bf582182537592d1 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
b0c1d20a | 07-Nov-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
libpldm: Fix header use
The headers need to work whether we're building libpldm in the repo or we're building another project depending on the headers in the system include directory.
Tidy up the p
libpldm: Fix header use
The headers need to work whether we're building libpldm in the repo or we're building another project depending on the headers in the system include directory.
Tidy up the paths involved and switch to defining the public headers as system headers for the purpose of the build.
Change-Id: I49413988c94d393ea5761bc4684edcd2c2482a98 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
691668fe | 01-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
license: add spdx identifier to all files
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ifddd07cc0eb5edeb2dcb410747073d68c6631cb1 |
c0b5a6eb | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: Id7eff2a106b4da7af550c473ec391fa00db5e95b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
b9d951f7 | 17-Oct-2023 |
Archana Kakani <archana.kakani@ibm.com> |
Improving the clarity of the code
Callers of the function pldm_bios_table_attr_value_entry_enum_decode_handles() provide the pointer to the buffer and its size. Modifying the buffer size and using
Improving the clarity of the code
Callers of the function pldm_bios_table_attr_value_entry_enum_decode_handles() provide the pointer to the buffer and its size. Modifying the buffer size and using it in the library can be error-prone. Adjust the code to only read the buffer size and not to modify it.
Tested: Unit Tests passed.
Change-Id: I26e843fa817e969719aa19f1922b4ea8622078f2 Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
show more ...
|
7dc429da | 15-Oct-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
Use of pldm_transport_af_mctp_bind() is demonstrated in the following patch to pldmd:
https://gerrit.openbmc.org/c/openbmc/pldm/+/63652
transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
Use of pldm_transport_af_mctp_bind() is demonstrated in the following patch to pldmd:
https://gerrit.openbmc.org/c/openbmc/pldm/+/63652
Change-Id: I9c902d94c13bceb611606e7439964d9485ebec07 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
5239d9a6 | 15-Oct-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
base: Stabilise pldm_msg_hdr_correlate_response()
Use of pldm_msg_hdr_correlate_response() is demonstrated in the following patch to pldmd:
https://gerrit.openbmc.org/c/openbmc/pldm/+/66819
Change
base: Stabilise pldm_msg_hdr_correlate_response()
Use of pldm_msg_hdr_correlate_response() is demonstrated in the following patch to pldmd:
https://gerrit.openbmc.org/c/openbmc/pldm/+/66819
Change-Id: I875b2dee5247c986a36ccd456956fb7e2a18d11a Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
cc45aed7 | 10-Sep-2023 |
Andrew Jeffery <andrew@aj.id.au> |
transport: af-mctp: Add pldm_transport_af_mctp_bind()
The af-mctp transport needs specific setup before it can receive requests[1]. Futher, we must track the MCTP metadata on each request message an
transport: af-mctp: Add pldm_transport_af_mctp_bind()
The af-mctp transport needs specific setup before it can receive requests[1]. Futher, we must track the MCTP metadata on each request message and apply it to the response for correlation at the requester. This behaviour is addressed in the Message Tag and Tag Owner fields outlined by Table 1 of DSP0236 v1.3.1.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/mctp.rst?h=v6.5#n73
Change-Id: I3fbd84a4174b56d618a42ca58c9881ea5a80f060 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
1d0e2d4b | 22-Sep-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
transport: Use pldm_msg_hdr_correlate_response() for response correlation
Previously the correlation logic was open-coded in pldm_transport_send_recv_msg(). Make use of pldm_msg_hdr_correlate_respon
transport: Use pldm_msg_hdr_correlate_response() for response correlation
Previously the correlation logic was open-coded in pldm_transport_send_recv_msg(). Make use of pldm_msg_hdr_correlate_response() internally as well, given logic is already exposed for users of the asynchronous pldm_transport_send_msg() and pldm_transport_recv_msg() APIs.
Change-Id: I332b8db0ff86e16bae6a7332f381ea0c439531a1 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
4c1ea56c | 22-Sep-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
transport: Fix include of libpldm/base.h
This should be prefixed to make it clear that the include is not intended to be relative to `src/`. Headers under `src/` are internal-only.
Change-Id: I1b3a
transport: Fix include of libpldm/base.h
This should be prefixed to make it clear that the include is not intended to be relative to `src/`. Headers under `src/` are internal-only.
Change-Id: I1b3a1b9218003cde8c4b66956b3c7178156219fe Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
5038268c | 22-Sep-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
transport: Establish remaining time prior to response correlation
This makes it a bit easier to handle resources with respect to correlation success or failure.
Change-Id: I0bc16aadcdc53cdcd361bce1
transport: Establish remaining time prior to response correlation
This makes it a bit easier to handle resources with respect to correlation success or failure.
Change-Id: I0bc16aadcdc53cdcd361bce1b2303ac63ff9e99a Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|