xref: /openbmc/libpldm/CHANGELOG.md (revision 0ee03b5b)
1# Changelog
2
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6and this project adheres to
7[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
9Change categories:
10
11- Added
12- Changed
13- Deprecated
14- Removed
15- Fixed
16- Security
17
18## [Unreleased]
19
20### Added
21
221. base: Define macros for reserved TIDs
23
24## [0.8.0] - 2024-05-23
25
26### Added
27
281. base: Provide pldm_msg_hdr_correlate_response()
292. transport: af-mctp: Add pldm_transport_af_mctp_bind()
303. oem: ibm: Add chapdata file type support
314. base: Added PLDM_SMBIOS & PLDM_RDE message types
325. oem: meta: Add decode_oem_meta_file_io_req()
336. state-set: Add all state set values to system power state enum as per DSP0249
347. platform: Add alias members to the enum
35   pldm_pdr_repository_chg_event_change_record_event_data_operation.
36
37   enum constants with inconsistent names are deprecated with this change.
38   remove old inconsistent enum members after backward compatibility cleanup is
39   done
40
418. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
429. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
4310. platform: Add 3 PDR type enum for Redfish Device Enablement per
44    DSP0248_1.2.0
4511. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
4612. entity: Add enum for Network Interface Connectors and Network Ports
47    Connection Types
4813. pdr: Add decode_numeric_effecter_pdr_data()
4914. oem: ibm: Support for the Real SAI entity id
5015. fw_update: Add encode req & decode resp for query_downstream_devices
5116. fw_update: Add encode req & decode resp for query_downstream_identifiers
5217. platform: Add support for GetStateEffecterStates command
53
54### Changed
55
561. base: Stabilise pldm_msg_hdr_correlate_response()
572. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
583. libpldm: Fix header use
594. libpldm: More fixes for header use
605. pdr: Stabilise pldm_pdr_find_last_in_range() API
616. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
627. oem: meta: stabilise decode_oem_meta_file_io_req()
638. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
64
65### Deprecated
66
671. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
68   with `PLDM_OEM_IBM_`
69
70### Fixed
71
721. libpldm: Rationalise the local and installed path of pldm.h
732. pdr: Assign record_handle in entity_association_pdr_add_children()
743. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
754. pdr: Remove redundant constant for minimum numeric sensor PDR length
765. tests: oem: meta: Fix fileio use of msgbuf
77
78## [0.7.0] - 2023-08-29
79
80### Added
81
821. state-set: Add new enum for Operational Fault Status enum
83
84### Changed
85
861. transport: Match specified metadata in pldm_transport_send_recv_msg()
872. transport: mctp-demux: Drop ABI annotation for internal symbols
883. transport: Stabilise core transport and implementation APIs
89
90   This stabilisation covers the following headers and functions:
91
92   - libpldm/transport.h
93
94     - pldm_transport_poll()
95     - pldm_transport_send_msg()
96     - pldm_transport_recv_msg()
97     - pldm_transport_send_recv_msg()
98
99   - libpldm/transport/af-mctp.h
100
101     - pldm_transport_af_mctp_init()
102     - pldm_transport_af_mctp_destroy()
103     - pldm_transport_af_mctp_core()
104     - pldm_transport_af_mctp_init_pollfd()
105     - pldm_transport_af_mctp_map_tid()
106     - pldm_transport_af_mctp_unmap_tid()
107
108   - libpldm/transport/mctp-demux.h
109     - pldm_transport_mctp_demux_init()
110     - pldm_transport_mctp_demux_destroy()
111     - pldm_transport_mctp_demux_core()
112     - pldm_transport_mctp_demux_init_pollfd()
113     - pldm_transport_mctp_demux_map_tid()
114     - pldm_transport_mctp_demux_unmap_tid()
115
116### Deprecated
117
1181. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
119   `libpldm/requester/pldm.h`):
120
121   - pldm_open()
122   - pldm_send_recv()
123   - pldm_send()
124   - pldm_recv()
125   - pldm_recv_any()
126   - pldm_close()
127
128   Users should migrate to the newer "transport" APIs instead.
129
130## Fixed
131
1321. tests: Exclude transport tests when build excludes testing ABIs
1332. abi: Capture deprecation of pldm_close()
134
135## [0.6.0] - 2023-08-22
136
137### Changed
138
1391. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
1402. meson: Apply `b_ndebug=if-release` by default
1413. pdr : Stabilize pldm_entity_association_tree_add_entity()
1424. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
1435. pdr: Stabilize pldm_entity_node_get_remote_container_id()
1446. transport: af-mctp: Assign out-params on success in \*\_recv()
1457. transport: Generalise the pldm_transport_recv_msg() API
146
147### Removed
148
1491. pdr: Remove pldm_entity_association_pdr_add()
1502. state-set: Remove enum pldm_state_set_operational_fault_status_values
151
152### Fixed
153
1541. transport: register init_pollfd callback for af-mctp
1552. transport: fix init_pollfd function parameter
1563. transport: Fix doxygen and variables for send and recv functions
1574. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
158
159## [0.5.0] - 2023-08-09
160
161### Added
162
1631. pdr: Introduce pldm_entity_association_pdr_add_check()
164
165### Changed
166
1671. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
1682. transport: pldm_transport_poll(): Adjust return value semantics
1693. transport: free un-wanted responses in pldm_transport_send_recv_msg()
170
171### Deprecated
172
1731. state-set: Enum pldm_state_set_operational_fault_status_values
174
175   The enum operational_fault_status is defined with wrong members and will
176   eventually be replaced with the correct members. Any uses of
177   pldm_state_set_operational_fault_status_values members should move to
178   equivalent pldm_state_set_operational_stress_status_values members if needed.
179
1802. platform: Struct field name in fru_record_set PDR
181
182   References to entity_instance_num should be changed to entity_instance
183
1843. platform: Struct field name in numeric sensor value PDR
185
186   References to entity_instance_num should be changed to entity_instance
187
188### Removed
189
1901. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
1912. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
1923. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
1934. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
1945. bios_table: Remove pldm_bios_table_append_pad_checksum()
1956. fru: Remove get_fru_record_by_option()
1967. pdr: Make is_present() static
1978. pdr: Remove pldm_pdr_add()
1989. pdr: Remove pldm_pdr_add_fru_record_set()
19910. pdr: Remove pldm_entity_association_pdr_add_from_node()
20011. pdr: Make find_entity_ref_in_tree() static
20112. pdr: Make entity_association_tree_find() static
202
203### Fixed
204
2051. requester: Fix response buffer cast in pldm_send_recv()
2062. pdr: Hoist record handle overflow test to avoid memory leak
2073. transport: Correct comparison in while loop condition
208
209## [0.4.0] - 2023-07-14
210
211### Added
212
2131. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
2142. fru: Introduce get_fru_record_by_option_check()
2153. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
2164. pdr: Introduce pldm_pdr_add_check()
2175. pdr: Introduce pldm_pdr_add_fru_record_set_check()
218
219### Changed
220
2211. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
2222. requester: Expose pldm_close() in header
2233. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
2244. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
2255. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
2266. pdr: pldm_pdr_init(): Return NULL on allocation failure
2277. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
2288. pdr: Document preconditions for trivial accessor functions
229
230   A trivial accessor function is one that exposes properties of an object in a
231   way can't result in an error, beyond passing an invalid argument to the
232   function. For APIs meeting this definition we define a precondition that
233   struct pointers must point to valid objects to avoid polluting the function
234   prototypes. The following APIs now have this precondition explicitly defined:
235
236   - pldm_entity_extract()
237   - pldm_entity_get_parent()
238   - pldm_entity_is_exist_parent()
239   - pldm_entity_is_node_parent()
240   - pldm_is_current_parent_child
241   - pldm_is_empty_entity_assoc_tree()
242   - pldm_pdr_get_record_count()
243   - pldm_pdr_get_record_handle()
244   - pldm_pdr_get_repo_size()
245   - pldm_pdr_record_is_remote()
246
2479. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
24810. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
24911. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
25012. pdr: pldm_entity_association_tree_visit(): Document preconditions
25113. pdr: pldm_entity_association_tree_visit(): Exit early on failure
25214. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
25315. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
25416. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
25517. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
25618. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
25719. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
25820. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
25921. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
26022. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
26123. pdr: pldm_entity_get_num_children(): Don't return invalid values
26224. libpldm: Lift or remove asserts where a subsequent check exists
263
264### Deprecated
265
2661. pldm_bios_table_attr_entry_integer_encode()
267
268   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
269
2702. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
271
272   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
273
2743. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
275
276   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
277
2784. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
279
280   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
281
2825. pdr: Deprecate is_present()
283
284   There should be no users of this symbol. If you are a user, you should figure
285   out how to stop, or get in touch. This symbol will be marked static the
286   release after deprecation.
287
2886. pdr: Deprecate find_entity_ref_in_tree()
289
290   There should be no users of this symbol. If you are a user, you should figure
291   out how to stop, or get in touch. This symbol will be marked static the
292   release after deprecation.
293
2947. pdr: Deprecate entity_association_tree_find()
295
296   There should be no users of this symbol. If you are a user, you should figure
297   out how to stop, or get in touch. This symbol will be marked static the
298   release after deprecation.
299
3008. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
301
302   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
303   pldm_bios_table_append_pad_checksum() should migrate to
304   pldm_bios_table_append_pad_checksum_check()
305
3069. fru: Stabilise get_fru_record_by_option_check()
307
308   get_fru_record_by_option() is deprecated by this change. Users of
309   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
310
31110. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
312
313    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
314    Users of pldm_entity_association_pdr_add_from_node() should migrate to
315    pldm_entity_association_pdr_add_from_node_check()
316
31711. pdr: Stabilise pldm_pdr_add_check()
318
319    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
320    migrate to pldm_pdr_add_check()
321
32212. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
323
324    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
325    pldm_pdr_add_fru_record_set() should migrate to
326    pldm_pdr_add_fru_record_set_check()
327
328### Removed
329
3301. bios_table: Remove deprecated APIs sanitized by assert():
331
332   - pldm_bios_table_string_entry_encode()
333   - pldm_bios_table_string_entry_decode_string()
334   - pldm_bios_table_attr_entry_enum_encode()
335   - pldm_bios_table_attr_entry_enum_decode_pv_num()
336   - pldm_bios_table_attr_entry_enum_decode_def_num()
337   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
338   - pldm_bios_table_attr_entry_string_encode()
339   - pldm_bios_table_attr_entry_string_decode_def_string_length()
340
341### Fixed
342
3431. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
3442. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
3453. transport: mctp-demux: Don't test socket for non-zero value
3464. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
3475. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
3486. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
3497. abi: Update to remove pldm_close() from reference dumps
3508. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
351
352## [0.3.0] - 2023-06-23
353
354### Added
355
3561. Add encode/decode pldmMessagePollEvent data
3572. README: Add a section on working with libpldm
3583. pdr: Introduce remote_container_id and associated APIs
3594. pdr: Add APIs for creating and locating remote PDRs
3605. pdr: Add pldm_pdr_find_last_in_range()
3616. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
3627. pdr: Add pldm_pdr_find_container_id_range_exclude()
363
364### Changed
365
3661. include: Move installed transport.h under libpldm/
3672. libpldm: Explicit deprecated, stable and testing ABI classes
3683. meson: Reduce strength of oem-ibm requirements from enabled to allowed
369
370   The `oem-ibm` feature is now enabled by the default meson configuration, for
371   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
372   recipe:
373
374   https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10
375
376   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
377   when invoking `meson setup`
378
3794. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
3805. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
381
382### Deprecated
383
3841. bios_table: Deprecate APIs with arguments sanitized using assert()
385
386   C provides enough foot-guns without us encoding them into library APIs.
387   Specifically, deprecate the following in favour of their `*_check()` variants
388   which ensure assertions won't fail or otherwise invoke UB:
389
390   - pldm_bios_table_string_entry_encode()
391   - pldm_bios_table_string_entry_decode_string()
392   - pldm_bios_table_attr_entry_enum_encode()
393   - pldm_bios_table_attr_entry_enum_decode_pv_num()
394   - pldm_bios_table_attr_entry_enum_decode_def_num()
395   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
396   - pldm_bios_table_attr_entry_string_encode()
397   - pldm_bios_table_attr_entry_string_decode_def_string_length()
398
399### Removed
400
4011. libpldm: Remove the requester-api option
402
403### Fixed
404
4051. requester: Make pldm_open() return existing fd
4062. transport: Prevent sticking in waiting for response
4073. transport: Match on response in pldm_transport_send_recv_msg()
4084. requester: Add check before accessing hdr in pldm_recv()
4095. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
410