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 ...
|
6967fc73 | 31-Oct-2023 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Add supported PLDM message types to the enum
Added PLDM_SMBIOS & PLDM_RDE messages types to the enum based on DSP0245 specification.
Change-Id: I936ee7fcd0937c1f8026a6e01ef6513d6a489450 Signed-off-
Add supported PLDM message types to the enum
Added PLDM_SMBIOS & PLDM_RDE messages types to the enum based on DSP0245 specification.
Change-Id: I936ee7fcd0937c1f8026a6e01ef6513d6a489450 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
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 |
499389ec | 19-Oct-2023 |
Kamalkumar Patel <kamalkumar.patel@ibm.com> |
oem: ibm: Add chapdata file type support
- When remote user configure the network parameter information for partition firmware to boot different server on the network then remote user has to aut
oem: ibm: Add chapdata file type support
- When remote user configure the network parameter information for partition firmware to boot different server on the network then remote user has to authenticate themselves to the server.
- Remote user will pass encrypted key(chapsecret) and it's keyname (chapname) to remote host via file io operation which would be done via PLDM.
- Adding new chapdata file type support which contain chapname and chapsecret information which would be communicate to remote terminus via PLDM.
Change-Id: I48710a7ce80e08a27c0b0e960378b2f56c69b4ef Signed-off-by: Kamalkumar Patel <kamalkumar.patel@ibm.com>
show more ...
|
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 ...
|
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 ...
|
91c06e9a | 22-Sep-2023 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
base: Provide pldm_msg_hdr_correlate_response()
Users of the asynchronous pldm_transport_send_msg() and pldm_transport_recv_msg() APIs likely need some way to correlate a received message as a respo
base: Provide pldm_msg_hdr_correlate_response()
Users of the asynchronous pldm_transport_send_msg() and pldm_transport_recv_msg() APIs likely need some way to correlate a received message as a response to a sent request.
Change-Id: I232400aebf06845e3eabf24205e31aa5668de9ba Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
74dbe879 | 11-Sep-2023 |
Matt Spinler <spinler@us.ibm.com> |
oem-ibm: Add new file io completion code
The IBM hypervisor sends 0x8B meaning 'full file discarded' when it doesn't have room to store a file. In this case specifically it's for when they are rece
oem-ibm: Add new file io completion code
The IBM hypervisor sends 0x8B meaning 'full file discarded' when it doesn't have room to store a file. In this case specifically it's for when they are receiving event logs from the BMC.
Change-Id: I21cf1cd4c7034237d47d3855397627712bb2fe17 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
f37e4dc8 | 21-Aug-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
state-set: Add new enum for Operational Fault status
The spec DSP0249 specifies three enum values for Operational Fault Status enum value (Set ID: 10). This commit adds the same.
Change-Id: Ib39c60
state-set: Add new enum for Operational Fault status
The spec DSP0249 specifies three enum values for Operational Fault Status enum value (Set ID: 10). This commit adds the same.
Change-Id: Ib39c60db3e33b5ccdcef036bc900523989d148e7 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
7e3c9e4d | 14-Aug-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
state-set: Remove operational_fault_status enum value
As per the spec DSP0249 the PLDM state set Operational Fault Status [Set ID: 10] can have three enumeration values but the enum is wrongly defin
state-set: Remove operational_fault_status enum value
As per the spec DSP0249 the PLDM state set Operational Fault Status [Set ID: 10] can have three enumeration values but the enum is wrongly defined at the moment. This commit removes the wrongly defined enum values.
Change-Id: I83cb5bbb56671b95312faa4310c5e31fc89f1aa8 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
24576290 | 30-Jul-2023 |
Rashmica Gupta <rashmica@linux.ibm.com> |
transport: Generalise the pldm_transport_recv_msg() API
Currently pldm_transport_recv_msg() only works for requesters as the TID param is an input. Responders need the source TID of the message rece
transport: Generalise the pldm_transport_recv_msg() API
Currently pldm_transport_recv_msg() only works for requesters as the TID param is an input. Responders need the source TID of the message received so they know where to send the response.
The TID was being used to look up the EID mapped to the TID and failing the function call if it didn't match. This check doesn't need to happen at this level, and can be added in at the requester API level if required.
Make the TID param an output, and use the EID of the message to lookup the TID.
Change-Id: I671dbfe2d94a9ad8d77ea0ef150f1c744f928c53 Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
show more ...
|
f1ebde49 | 30-Jul-2023 |
Rashmica Gupta <rashmica@linux.ibm.com> |
transport: Fix doxygen and variables for send and recv functions
This was missed updated properly when making the transport functions work for both requesters and responders.
Fixes: c1b66f420912 ("
transport: Fix doxygen and variables for send and recv functions
This was missed updated properly when making the transport functions work for both requesters and responders.
Fixes: c1b66f420912 ("requester: Add new APIs to support multiple transports") Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com> Change-Id: Ie32f11a98ab1b11caaafbca5e837e1eda5c9cc37
show more ...
|
36402ffb | 16-Aug-2023 |
BonnieLo-wiwynn <Bonnie_Lo@wiwynn.com> |
transport: fix init_pollfd function parameter
The init_pollfd function parameter was declared as pldm_transport_af_mctp, but it seems like it is intended to use pldm_transport instead. The headers w
transport: fix init_pollfd function parameter
The init_pollfd function parameter was declared as pldm_transport_af_mctp, but it seems like it is intended to use pldm_transport instead. The headers were not included in c files, so it didn't cause conflicting types at compile time.
Change-Id: I54f1397efee0ae5e68a24f1473e0395f02d53eaf Fixes: c1b66f4 ("requester: Add new APIs to support multiple transports") Fixes: ba6971b ("requester: Add af_mctp transport") Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
show more ...
|
302d9ff2 | 01-Aug-2023 |
Sagar Srinivas <sagar.srinivas@ibm.com> |
pdr: Rename pldm_entity_association_tree_find_if_remote()
Rename pldm_entity_association_tree_find_if_remote() to pldm_entity_association_tree_find_with_locality(), instead of being specific on remo
pdr: Rename pldm_entity_association_tree_find_if_remote()
Rename pldm_entity_association_tree_find_if_remote() to pldm_entity_association_tree_find_with_locality(), instead of being specific on remote entity, rather keeping it generic.
Discussion at https://gerrit.openbmc.org/c/openbmc/libpldm/+/65481/7/src/pdr.c
Change-Id: Icb89d6919d8a2cba6fbba216dd2be70637ba0216 Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
show more ...
|
f56e4dcd | 23-Jul-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
transport: free un-wanted responses in pldm_transport_send_recv_msg()
mctp-demux broadcasts the PLDM response messages to all of mctp socket instances. That means the GetSensorReading response from
transport: free un-wanted responses in pldm_transport_send_recv_msg()
mctp-demux broadcasts the PLDM response messages to all of mctp socket instances. That means the GetSensorReading response from one instance (pldmd) can be received by the other instance (pldmtool) which is waiting for the response of GetPDR request message. When the gap time between the two requests of pldmtool is long enough the number of GetSensorReading response messages can be more than 32. That means the instance ID of new GetPDR command in pldmtool can equal with the used and free one in GetSensorReading. The `pldm_transport_send_recv_msg()` will detect the reponse of GetSensorReading as the response of the GetPDR request.
To prevent this unexpected behavior the `pldm_transport_send_recv_msg()` should free the un-wanted responses before sending new PLDM request. The serialised message to be sent must already encode an allocated instance ID, which by the specification must not be reused before expiry. Therefore after the socket is drained, any subsequent response containing the request's instance ID must be the response matching the request.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> [AJ: Add a test, massage the commit message] Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I6c684bdaea2ba5d96b24ecd3c72e846c644fb16d
show more ...
|
3380a6c6 | 11-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
transport: pldm_transport_poll(): Adjust return value semantics
Prior, a timeout in pldm_transport_poll() would result in a pldm_transport_recv() call being issued in pldm_transport_send_recv(). Tha
transport: pldm_transport_poll(): Adjust return value semantics
Prior, a timeout in pldm_transport_poll() would result in a pldm_transport_recv() call being issued in pldm_transport_send_recv(). That's not the right course of action as it will translate to a blocking recv() system call for either of the current transport implementations. As there's no data present the recv() blocks indefinitely, violating the timeout constraint.
Instead, align the behaviour with POSIX poll(2)[1], which returns the number of active descriptors. The number of active descriptors is 0 if a timeout occurs.
[1]: https://www.man7.org/linux/man-pages/man2/poll.2.html#RETURN_VALUE
Fixes: c1b66f420912 ("requester: Add new APIs to support multiple transports") Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Id75e8dad49a0ea6081830d0825896094bff0e827
show more ...
|
f047004e | 19-Jul-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
platform: Uniform struct field name for Numeric SensorValue PDR
The PDR structure has a field for entity instance number. This commit is making the field name uniform across all the PDR structures d
platform: Uniform struct field name for Numeric SensorValue PDR
The PDR structure has a field for entity instance number. This commit is making the field name uniform across all the PDR structures defined because the user APIs can access these structures using a common template.
Added it as a union for now but later in time we will remove the union and the non-uniform field name.
Change-Id: I36d4c9ac80ccbd4b539cb2efa02af727be265565 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
d3f781de | 19-Jul-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
platform: Uniform struct field name for FRU Record Set PDR
The PDR structure has a field for entity instance number. This commit is making the field uniform across all the PDR structures defined bec
platform: Uniform struct field name for FRU Record Set PDR
The PDR structure has a field for entity instance number. This commit is making the field uniform across all the PDR structures defined because the user APIs can access these structures using a common template.
Added it as a union for now but later in time we will remove the union and the non-uniform field name.
Change-Id: Ib9da47d0b354a6fb67f95ae3c84791dad6daec98 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
ccd986f6 | 14-Jul-2023 |
Pavithra Barithaya <pavithra.b@ibm.com> |
state-set: Add the enum for Operational Stress Status state
As per the spec DSP0249 the PLDM state set Operational Stress Status [Set ID: 9] can have two enumeration values defined. This commit adds
state-set: Add the enum for Operational Stress Status state
As per the spec DSP0249 the PLDM state set Operational Stress Status [Set ID: 9] can have two enumeration values defined. This commit adds the enum for the same.
Change-Id: I37962d53c8baf48d0af7beb5ea891c0d2350f4c2 Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
show more ...
|
8985dfd1 | 17-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Remove pldm_entity_association_pdr_add_from_node()
pldm_entity_association_pdr_add_from_node() was deprecated in v0.4.0, remove it now.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-I
pdr: Remove pldm_entity_association_pdr_add_from_node()
pldm_entity_association_pdr_add_from_node() was deprecated in v0.4.0, remove it now.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I41b79b015fde81184c8726a3784e9d918d8d9743
show more ...
|
14d2984b | 17-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Remove pldm_pdr_add_fru_record_set()
pldm_pdr_add_fru_record_set() was deprecated in v0.4.0, remove it now.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3a3f76baf9dca84e2c6b8674
pdr: Remove pldm_pdr_add_fru_record_set()
pldm_pdr_add_fru_record_set() was deprecated in v0.4.0, remove it now.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I3a3f76baf9dca84e2c6b867448257a0b6e2ab178
show more ...
|
c79a5df5 | 17-Jul-2023 |
Andrew Jeffery <andrew@aj.id.au> |
pdr: Remove pldm_pdr_add()
pldm_pdr_add() was deprecated in v0.4.0, remove it now.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ie8a00749a0473cb76e503cf88d5ae1379918a0a6 |