History log of /openbmc/libpldm/include/ (Results 1 – 25 of 199)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
309a5cde20-Nov-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

libpldm: Install api header, update changelog

3a2c6589c566 ("dsp: firmware_update: Iterators for downstream device
descriptors") added some new firmware update APIs and a new header, but
forgot to i

libpldm: Install api header, update changelog

3a2c6589c566 ("dsp: firmware_update: Iterators for downstream device
descriptors") added some new firmware update APIs and a new header, but
forgot to install the new header and update the changelog. Fix both now.

gitlint-ignore: UC1, B1
Fixes: 3a2c6589c566 ("dsp: firmware_update: Iterators for downstream device descriptors")
Change-Id: I0e89aaf22638f019843937c4449e1169b6fa0092
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

3a2c658907-Nov-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

dsp: firmware_update: Iterators for downstream device descriptors

Provide an ergonomic and safe means to iterate through downstream
devices and their descriptors while avoiding the need to allocate.

dsp: firmware_update: Iterators for downstream device descriptors

Provide an ergonomic and safe means to iterate through downstream
devices and their descriptors while avoiding the need to allocate. The
strategy leaves the library user to make their own choices about how the
data is handled.

The user-facing portion of the change takes the form of two new macros,
to be nested inside one another:

```
foreach_pldm_downstream_device(...) {
foreach_pldm_downstream_device_descriptor(...) {
// Do something with the device-specific descriptor
}
}
```

Examples uses are provided in the documentation and in changes to the
test suite.

Change-Id: I6e79454b94868da73f318635bcaae57cd51fbf97
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

a9bd972d06-Nov-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

dsp: firmware_update: Fix local include of stdbool

Change-Id: I45fa986c24321aa7d6067b843d0d06ccde7d6d86
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

8e23fd0425-Oct-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

stateset: Add new state sets from DSP0249 v1.3.0

Add state set id's that are newly defined in v1.3.0 of DSP0249 Platform
Level Data Model (PLDM) State Set Specification.

Change-Id: I918a00b019377df

stateset: Add new state sets from DSP0249 v1.3.0

Add state set id's that are newly defined in v1.3.0 of DSP0249 Platform
Level Data Model (PLDM) State Set Specification.

Change-Id: I918a00b019377df5b3759a18a73e5f6d2dbeab0a
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...

654eb96625-Oct-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

entity: Add new entity types from DSP0249 v1.3.0

Add entity types that are newly defined in v1.3.0 of DSP0249 Platform
Level Data Model (PLDM) State Set Specification.

Change-Id: I9ba7d44c34795c41d

entity: Add new entity types from DSP0249 v1.3.0

Add entity types that are newly defined in v1.3.0 of DSP0249 Platform
Level Data Model (PLDM) State Set Specification.

Change-Id: I9ba7d44c34795c41dc0e9c9b18214faf9ac63019
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...

98e137de08-Oct-2024 Gilbert Chen <gilbertc@nvidia.com>

dsp: platform: Fix decode_set_event_receiver_req()

Per DSP0248 V1.3.0 table13, the heartbeatTimer field shall be omitted
from the request data if eventMessageGlobalEnable is not set to
enableAsyncKe

dsp: platform: Fix decode_set_event_receiver_req()

Per DSP0248 V1.3.0 table13, the heartbeatTimer field shall be omitted
from the request data if eventMessageGlobalEnable is not set to
enableAsyncKeepAlive.

Rework the change in 8c43abb due to the issue found in
openbmc/pldm@35f25949fe4d ("Fix invalid read by adjusting request
size")

gitlint-ignore: B1, UC1
Fixes: 66c7723adbdc ("msgbuf: Enable pldm_msgbuf_extract() into packed members")
Fixes: 9667f5823930 ("platform: pldm_msgbuf for decode_set_event_receiver_req()")
Fixes: 6ef2aa90a793 ("platform: Test invalid heartbeat conditions after assignment")
Fixes: 9c76679224cf ("libpldm: Migrate to subproject")
Change-Id: I7ca50e487b9f1e6c6ea2b34f73c363def8b2d295
Signed-off-by: Gilbert Chen <gilbertc@nvidia.com>

show more ...

a989249902-Oct-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

dsp: firmware_update: Bounds check decode_downstream_device_parameter_table_entry_versions()

```
../src/dsp/firmware_update.c: In function ‘decode_downstream_device_parameter_table_entry_versions’:

dsp: firmware_update: Bounds check decode_downstream_device_parameter_table_entry_versions()

```
../src/dsp/firmware_update.c: In function ‘decode_downstream_device_parameter_table_entry_versions’:
../src/dsp/firmware_update.c:1248:48: error: use of attacker-controlled value ‘*entry.active_comp_ver_str_len’ as offset without upper-bounds checking [CWE-823] [-Werror=analyzer-tainted-offset]
1248 | active[entry->active_comp_ver_str_len] = '\0';
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
```

gitlint-ignore: T1, B1, UC1
Fixes: b6ef35b48065 ("fw_update: Add encode req & decode resp for get_downstream_fw_params")
Change-Id: I15571804f391dc97de6d80c90325ded006aee500
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

2332e05707-Oct-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

Revert "dsp: platform: Fix decode_set_event_receiver_req()"

This reverts commit 8c43abb70aeadde39d99af2c1b6b5d4a1416fc47.

As found in openbmc/pldm@35f25949fe4d ("Fix invalid read by adjusting
reque

Revert "dsp: platform: Fix decode_set_event_receiver_req()"

This reverts commit 8c43abb70aeadde39d99af2c1b6b5d4a1416fc47.

As found in openbmc/pldm@35f25949fe4d ("Fix invalid read by adjusting
request size") the change in 8c43abb70aea ("dsp: platform: Fix
decode_set_event_receiver_req()") reduces the value of
PLDM_SET_EVENT_RECEIVER_REQ_BYTES and causes an out-of-bounds access.

A new macro should be introduced rather than changing the value of
PLDM_SET_EVENT_RECEIVER_REQ_BYTES.

Change-Id: I922c7eff86919f513e302bec393c0a516046e923
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

8c43abb701-Oct-2024 Gilbert Chen <gilbertc@nvidia.com>

dsp: platform: Fix decode_set_event_receiver_req()

Per DSP0248 V1.3.0 table13, the heartbeatTimer field shall be omitted
from the request data if eventMessageGlobalEnable is not set to
enableAsyncKe

dsp: platform: Fix decode_set_event_receiver_req()

Per DSP0248 V1.3.0 table13, the heartbeatTimer field shall be omitted
from the request data if eventMessageGlobalEnable is not set to
enableAsyncKeepAlive.

gitlint-ignore: B1, UC1
Fixes: 66c7723adbdc ("msgbuf: Enable pldm_msgbuf_extract() into packed members")
Fixes: 9667f5823930 ("platform: pldm_msgbuf for decode_set_event_receiver_req()")
Fixes: 6ef2aa90a793 ("platform: Test invalid heartbeat conditions after assignment")
Fixes: 9c76679224cf ("libpldm: Migrate to subproject")
Change-Id: Ia2a0c71a1f37a0fd32670b9b66b051e18fb73dbe
Signed-off-by: Gilbert Chen <gilbertc@nvidia.com>

show more ...

387b10f624-Sep-2024 Thu Nguyen <thu@os.amperecomputing.com>

platform: fix encode/decode_poll_for_platform_event_message_req

The checking `TransferOperationFlag` and `eventIDToAcknowledge` in
`encode/decode_poll_for_platform_event_message_req` APIs is not
cor

platform: fix encode/decode_poll_for_platform_event_message_req

The checking `TransferOperationFlag` and `eventIDToAcknowledge` in
`encode/decode_poll_for_platform_event_message_req` APIs is not
corrected. Update the conditions to follow the section `16.7
PollForPlatformEventMessage command` in DSP0248 V1.3.0.

Change-Id: Ie799d38f4a492b7719c2ff7c14fe83a1f81dc0b1
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>

show more ...

3f87748119-Sep-2024 Pavithra Barithaya <pavithrabarithaya07@gmail.com>

oem: ibm: Add PCIe Topology Actions StateSetId and Enums

PCIe Topology involves certain actions that can be done in order
to either get the topology info or save the topology info etc.
This commit a

oem: ibm: Add PCIe Topology Actions StateSetId and Enums

PCIe Topology involves certain actions that can be done in order
to either get the topology info or save the topology info etc.
This commit adds the necessary enumerations for the topology
action and the corresponding state set ID.

Change-Id: I6fa7d25327a8ce94b3538de3e46e25e944088997
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>

show more ...

7a3c14ec08-Sep-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

base: Add size and buffer macros for struct pldm_msg

Give library users a supported way to allocate pldm_msg buffers on the
stack.

A demonstration conversion is done in tests/oem/ibm/host.cpp.

Cha

base: Add size and buffer macros for struct pldm_msg

Give library users a supported way to allocate pldm_msg buffers on the
stack.

A demonstration conversion is done in tests/oem/ibm/host.cpp.

Change-Id: I71158bd6b062c6e6522dc4a4cdcb089a139cd841
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

f223a1b906-Sep-2024 Unive Tien <unive.tien.wiwynn@gmail.com>

Define length of downstream device

A struct named `pldm_downstream_device` is missing its size macro,
causing the parsing size unclear, therefore, this macro is now defined.

Change-Id: Ife05c50eab2

Define length of downstream device

A struct named `pldm_downstream_device` is missing its size macro,
causing the parsing size unclear, therefore, this macro is now defined.

Change-Id: Ife05c50eab2b7fd72eaf069f0dd7cde16ee13b5a
Signed-off-by: Unive Tien <unive.tien.wiwynn@gmail.com>

show more ...

6058215022-Sep-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

dsp: pdr: Add pldm_entity_association_tree_copy_root_check()

Allocations cannot be treated as infallible. Ensure that copying
the entity association tree signals failure to the caller along with
cle

dsp: pdr: Add pldm_entity_association_tree_copy_root_check()

Allocations cannot be treated as infallible. Ensure that copying
the entity association tree signals failure to the caller along with
cleaning up after itself to avoid leaking memory.

Change-Id: Icfd255b45530e42a6a3a0a3205e665eed53708d1
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

3b5ab92922-Sep-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

dsp: bios_table: Null check for pldm_bios_table_iter_is_end()

GCC's -fanalyzer identified the following:

```
In file included from ../tests/dsp/bios_table_iter.c:15:
../src/dsp/bios_table.c: In fun

dsp: bios_table: Null check for pldm_bios_table_iter_is_end()

GCC's -fanalyzer identified the following:

```
In file included from ../tests/dsp/bios_table_iter.c:15:
../src/dsp/bios_table.c: In function ‘pldm_bios_table_iter_is_end’:
../src/dsp/bios_table.c:991:17: error: dereference of NULL ‘iter’ [CWE-476] [-Werror=analyzer-null-dereference]
991 | if (iter->table_len - iter->current_pos <= pad_and_check_max) {
| ~~~~^~~~~~~~~~~
```

As a safety measure, return true to indicate the end of the iterator if
the iterator is null.

Fixes: 9c76679224cf ("libpldm: Migrate to subproject")
Change-Id: I18eec144120054de33eb351f9a80dee936118126
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

8b53ad9d15-Jun-2024 Varsha Kaverappa <vkaverap@in.ibm.com>

pdr: Remove PDR record by record set identifier

API to remove a record from a PLDM PDR repository if it is
of type FRU record set identifier and if it matches given
record set identifier. Record han

pdr: Remove PDR record by record set identifier

API to remove a record from a PLDM PDR repository if it is
of type FRU record set identifier and if it matches given
record set identifier. Record handle of the PDR where this
entity is found is saved and will be required to update PDR
repo by removing the entry corresponding to this entity
in the PDR table. Also the Node associated with this pldm
entity is deleted from PDR tree.

Change-Id: I24606c4d75ff64864f4aa95d8b2341b8911a7ff8
Signed-off-by: Varsha Kaverappa <vkaverap@in.ibm.com>

show more ...

b31e4c6c25-Jun-2024 Varsha Kaverappa <vkaverap@in.ibm.com>

pdr: Remove contained entity from PDR repo

API to remove a contained entity from an entity association PDR. This
API saves record handle of the PLDM PDR record where the contained
entity is found. T

pdr: Remove contained entity from PDR repo

API to remove a contained entity from an entity association PDR. This
API saves record handle of the PLDM PDR record where the contained
entity is found. The record handle we get from this API will be
required to update PDR repo by removing the entry corresponding to
this entity in the PDR table. Also the Node associated with this pldm
entity is deleted from PDR tree. The PLDM PDR record which holds the
contained entity to be removed is found with the parent entity
properties sent to this API as input.

Tested By: Unit tested by removing entities from PDR repo

Change-Id: I55fb898a0e67d8c9cd95594b4ec6a6a4866c9531
Signed-off-by: Varsha Kaverappa <vkaverap@in.ibm.com>

show more ...

6476c96826-Jul-2024 Lora Lin <lora.lin.wiwynn@gmail.com>

oem: meta: Add encode_oem_meta_file_io_read_resp()

Add encode_oem_meta_file_io_read_resp function

This function is used to encode the message of reading file IO.
Assemble responses to read file IO

oem: meta: Add encode_oem_meta_file_io_read_resp()

Add encode_oem_meta_file_io_read_resp function

This function is used to encode the message of reading file IO.
Assemble responses to read file IO messages, but the response
content other than the completion code needs to be additionally
appended.

Change-Id: Ib030ac9f37fe73b66fb762dcf8b8297bce79836a
Signed-off-by: Lora Lin <lora.lin.wiwynn@gmail.com>

show more ...

893a08f016-Jul-2024 Lora Lin <lora.lin.wiwynn@gmail.com>

oem: meta: Add decode_oem_meta_file_io_read_req()

Add decode_oem_meta_file_io_read_req function.

This function is used to decode the message of reading file IO.
Need to include read_option (read fi

oem: meta: Add decode_oem_meta_file_io_read_req()

Add decode_oem_meta_file_io_read_req function.

This function is used to decode the message of reading file IO.
Need to include read_option (read file attributes or data), length
(the length of the read data) and read_info (The information
needed to read the file).
Take reading file data as an example:
read_info needs to contain transferFlag, offset to know the
starting position and transfer progress of the read file.

Change-Id: I425476d36e3cd69d2da45beceff1c4a2362640dc
Signed-off-by: Lora Lin <lora.lin.wiwynn@gmail.com>

show more ...

0f5be28f21-Jul-2024 Lora Lin <lora.lin.wiwynn@gmail.com>

oem: meta: Add decode_oem_meta_file_io_write_req()

Add decode_oem_meta_file_io_write_req function.
Deprecate decode_oem_meta_file_io_req function.

The difference between functions decode_oem_meta_f

oem: meta: Add decode_oem_meta_file_io_write_req()

Add decode_oem_meta_file_io_write_req function.
Deprecate decode_oem_meta_file_io_req function.

The difference between functions decode_oem_meta_file_io_req and
decode_oem_meta_file_io_write_req:

- decode_oem_meta_file_io_write_req:
- return 0 on success and return a negative errno value on failure.
- input parameters is structure.
- add req_length parameter to check whether the total length of
the request is buffer overflow.
- decode_oem_meta_file_io_req:
- return PLDM_SUCCESS on success and return another PLDM completion
code on failure.
- input parameters is passing individual pointers.

Change-Id: Iae3c7f24128bc25c5af6951f34fdc6d8a7b90381
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Signed-off-by: Lora Lin <lora.lin.wiwynn@gmail.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

4e67265608-Sep-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

fru: Remove get_fru_record_by_option_check()

Deprecated prior to v0.9.0.

Change-Id: Ifec87c665842d9ae5ba78fa1888ea99c2bbe90f5
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

453dfff307-Sep-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

pdr: Remove pldm_pdr_add_fru_record_set_check()

Deprecated prior to v0.9.0.

Change-Id: I402338aad0f54947f6748b882b3163fc72825199
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

f309c48d07-Sep-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

pdr: Remove pldm_pdr_add_check()

Deprecated prior to v0.9.0.

Change-Id: Ib53d20bfee6365429db56bc2420b2d294d5464b4
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

73a2f66e07-Sep-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

pdr: Remove pldm_entity_association_pdr_add_from_node_check()

Deprecated prior to v0.9.0.

Change-Id: Ibe52bb1c7c26314a9c91c40917d378d6bb851447
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.co

pdr: Remove pldm_entity_association_pdr_add_from_node_check()

Deprecated prior to v0.9.0.

Change-Id: Ibe52bb1c7c26314a9c91c40917d378d6bb851447
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

38004f7a07-Sep-2024 Andrew Jeffery <andrew@codeconstruct.com.au>

pdr: Remove pldm_entity_association_pdr_add_check()

Deprecated prior to v0.9.0.

Change-Id: I7706f27c732efbb3332d26fe4e7f0be1c205c66b
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

12345678