xref: /openbmc/libpldm/CHANGELOG.md (revision 0f5be28ff0e2735c735add28fa8269894a2181bc)
16fd81a51SAndrew Jeffery# Changelog
26fd81a51SAndrew Jeffery
36fd81a51SAndrew JefferyAll notable changes to this project will be documented in this file.
46fd81a51SAndrew Jeffery
56fd81a51SAndrew JefferyThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66fd81a51SAndrew Jefferyand this project adheres to
76fd81a51SAndrew Jeffery[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
86fd81a51SAndrew Jeffery
96fd81a51SAndrew JefferyChange categories:
106fd81a51SAndrew Jeffery
116fd81a51SAndrew Jeffery- Added
126fd81a51SAndrew Jeffery- Changed
136fd81a51SAndrew Jeffery- Deprecated
146fd81a51SAndrew Jeffery- Removed
156fd81a51SAndrew Jeffery- Fixed
166fd81a51SAndrew Jeffery- Security
176fd81a51SAndrew Jeffery
18ff2f4214SAndrew Jeffery## [Unreleased]
19ff2f4214SAndrew Jeffery
20*0f5be28fSLora Lin### Added
21*0f5be28fSLora Lin
22*0f5be28fSLora Lin1. oem: meta: Add decode_oem_meta_file_io_write_req()
23*0f5be28fSLora Lin
24*0f5be28fSLora Lin### Deprecated
25*0f5be28fSLora Lin
26*0f5be28fSLora Lin1. oem: meta: Deprecate `decode_oem_meta_file_io_req()`
27*0f5be28fSLora Lin
28*0f5be28fSLora Lin   Users should switch to `decode_oem_meta_file_io_write_req()`. Modify this
29*0f5be28fSLora Lin   function to make it safer.
30*0f5be28fSLora Lin
31*0f5be28fSLora Lin   Modification:
32*0f5be28fSLora Lin
33*0f5be28fSLora Lin   - The meaning of the returned result.
34*0f5be28fSLora Lin   - Change parameters from individual pointers to a struct.
35*0f5be28fSLora Lin   - Check the length provided in the message won't exceed the buffer.
36*0f5be28fSLora Lin
37ff2f4214SAndrew Jeffery### Removed
38ff2f4214SAndrew Jeffery
39eb9df78bSAndrew Jeffery1. Deprecated functions with the `_check` suffix
40eb9df78bSAndrew Jeffery
414e672656SAndrew Jeffery   - `get_fru_record_by_option_check()`
42eb9df78bSAndrew Jeffery   - `pldm_bios_table_append_pad_checksum_check()`
43eb9df78bSAndrew Jeffery   - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
4407fdf2d8SAndrew Jeffery   - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
4503aa3d6cSAndrew Jeffery   - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
4683a208afSAndrew Jeffery   - `pldm_bios_table_attr_entry_enum_encode_check()`
47f5c63dfdSAndrew Jeffery   - `pldm_bios_table_attr_entry_integer_encode_check()`
484d8634d7SAndrew Jeffery   - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
495f288563SAndrew Jeffery   - `pldm_bios_table_attr_entry_string_encode_check()`
502170655aSAndrew Jeffery   - `pldm_bios_table_attr_value_entry_encode_enum_check()`
515a8b7c54SAndrew Jeffery   - `pldm_bios_table_attr_value_entry_encode_integer_check()`
52de926829SAndrew Jeffery   - `pldm_bios_table_attr_value_entry_encode_string_check()`
531085e232SAndrew Jeffery   - `pldm_bios_table_string_entry_decode_string_check()`
54c79375dfSAndrew Jeffery   - `pldm_bios_table_string_entry_encode_check()`
5538004f7aSAndrew Jeffery   - `pldm_entity_association_pdr_add_check()`
5673a2f66eSAndrew Jeffery   - `pldm_entity_association_pdr_add_from_node_check()`
57f309c48dSAndrew Jeffery   - `pldm_pdr_add_check()`
58453dfff3SAndrew Jeffery   - `pldm_pdr_add_fru_record_set_check()`
59ff2f4214SAndrew Jeffery
60615344fcSAndrew Jeffery## [0.9.1] - 2024-09-07
61615344fcSAndrew Jeffery
62615344fcSAndrew Jeffery### Changed
63615344fcSAndrew Jeffery
64615344fcSAndrew Jeffery1. Moved evolutions intended for v0.9.0 into place
65615344fcSAndrew Jeffery
66615344fcSAndrew Jeffery   Evolutions for the release have been moved from `evolutions/current` to
67615344fcSAndrew Jeffery   `evolutions/v0.9.1`. Library users can apply them to migrate off of
68615344fcSAndrew Jeffery   deprecated APIs.
6939f88325SRashmica Gupta
70747a498eSAndrew Jeffery## [0.9.0] - 2024-09-07
71747a498eSAndrew Jeffery
720ee03b5bSThu Nguyen### Added
730ee03b5bSThu Nguyen
740ee03b5bSThu Nguyen1. base: Define macros for reserved TIDs
75b02e0e11SVarsha Kaverappa2. pdr: Add pldm_entity_association_pdr_add_contained_entity_to_remote_pdr()
76b02e0e11SVarsha Kaverappa3. pdr: Add pldm_entity_association_pdr_create_new()
77e5469f54SThu Nguyen4. platform: Define macros for the responded transferflags
78274732fcSPavithra Barithaya5. pdr: Add pldm_pdr_get_terminus_handle() API
79dacfa354SThu Nguyen6. pdr: Add related decode_entity_auxiliary_names_pdr() APIs
80b6ef35b4SChris Wang7. fw_update: Add encode req & decode resp for get_downstream_fw_params
8102903038SThu Nguyen8. platform: Add decode_pldm_platform_cper_event() API
820a1be3cbSAndrew Jeffery9. decode_get_pdr_repository_info_resp_safe()
830a1be3cbSAndrew Jeffery
840a1be3cbSAndrew Jeffery   Replaces decode_get_pdr_repository_info_resp() as discussed in the
850a1be3cbSAndrew Jeffery   `Deprecated` section below
860a1be3cbSAndrew Jeffery
870a1be3cbSAndrew Jeffery10. decode_get_pdr_resp_safe()
880a1be3cbSAndrew Jeffery
890a1be3cbSAndrew Jeffery    Replaces decode_get_pdr_resp() as discussed in the `Deprecated` section
900a1be3cbSAndrew Jeffery    below
910ee03b5bSThu Nguyen
9243cb4b5fSThu Nguyen### Changed
9343cb4b5fSThu Nguyen
9443cb4b5fSThu Nguyen1. pdr: Stabilise related decode_entity_auxiliary_names_pdr() APIs
957739d123SThu Nguyen2. platform: Rework decode/encode_pldm_message_poll_event_data() APIs
96f874b383SThu Nguyen3. platform: Stabilise decode_pldm_message_poll_event_data() APIs
9790bbe6c0SAndrew Jeffery4. ABI break for decode_sensor_op_data()
9890bbe6c0SAndrew Jeffery
9990bbe6c0SAndrew Jeffery   Applying LIBPLDM_CC_NONNULL to the internal msgbuf APIs caused
10090bbe6c0SAndrew Jeffery   abi-compliance-checker to flag a change in the register containing the
10190bbe6c0SAndrew Jeffery   parameter `previous_op_state`.
10243cb4b5fSThu Nguyen
1033559aa1fSThu Nguyen5. platform: Stabilise decode_pldm_platform_cper_event() API
1043559aa1fSThu Nguyen
105d9b70ba7SAndrew Jeffery### Deprecated
106d9b70ba7SAndrew Jeffery
107e7f55113SAndrew Jeffery1. Rename and deprecate functions with the `_check` suffix
108d9b70ba7SAndrew Jeffery
109e7f55113SAndrew Jeffery   All library function return values always need to be checked. The `_check`
110e7f55113SAndrew Jeffery   suffix is redundant, so remove it. Migration to the non-deprecated
111e7f55113SAndrew Jeffery   equivalents without the `_check` suffix can be performed using
112e7f55113SAndrew Jeffery   `scripts/ apply-renames` and the [clang-rename][] configurations under
113e7f55113SAndrew Jeffery   `evolutions/`
114d9b70ba7SAndrew Jeffery
115e7f55113SAndrew Jeffery   The deprecated functions:
116e7f55113SAndrew Jeffery
117e7f55113SAndrew Jeffery   - `get_fru_record_by_option_check()`
118d8bb75cbSAndrew Jeffery   - `pldm_bios_table_append_pad_checksum_check()`
11946673f4aSAndrew Jeffery   - `pldm_bios_table_attr_entry_enum_decode_def_num_check()`
12082b4d3b4SAndrew Jeffery   - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
121b06882f1SAndrew Jeffery   - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
1227126b1d2SAndrew Jeffery   - `pldm_bios_table_attr_entry_enum_encode_check()`
1235347e279SAndrew Jeffery   - `pldm_bios_table_attr_entry_integer_encode_check()`
124c668ffceSAndrew Jeffery   - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
125f6be4933SAndrew Jeffery   - `pldm_bios_table_attr_entry_string_encode_check()`
12609004d6aSAndrew Jeffery   - `pldm_bios_table_attr_value_entry_encode_enum_check()`
127504dd17fSAndrew Jeffery   - `pldm_bios_table_attr_value_entry_encode_integer_check()`
1281a3983ceSAndrew Jeffery   - `pldm_bios_table_attr_value_entry_encode_string_check()`
1298c37ab36SAndrew Jeffery   - `pldm_bios_table_string_entry_decode_string_check()`
130e48fdd6eSAndrew Jeffery   - `pldm_bios_table_string_entry_encode_check()`
131d72ea4b8SAndrew Jeffery   - `pldm_entity_association_pdr_add_check()`
132aa49b71fSAndrew Jeffery   - `pldm_entity_association_pdr_add_from_node_check()`
133e7f55113SAndrew Jeffery   - `pldm_pdr_add_check()`
134e7f55113SAndrew Jeffery   - `pldm_pdr_add_fru_record_set_check()`
135d9b70ba7SAndrew Jeffery
136acb0681dSAndrew Jeffery[clang-rename]: https://clang.llvm.org/extra/clang-rename.html
137d9b70ba7SAndrew Jeffery
1380a1be3cbSAndrew Jeffery2. `decode_get_pdr_repository_info_resp()`
1390a1be3cbSAndrew Jeffery
1400a1be3cbSAndrew Jeffery   Users should move to `decode_get_pdr_repository_info_resp_safe()` which
1410a1be3cbSAndrew Jeffery   eliminates the opportunity for buffer overruns when extracting objects from
1420a1be3cbSAndrew Jeffery   the message.
1430a1be3cbSAndrew Jeffery
1440a1be3cbSAndrew Jeffery3. `decode_get_pdr_resp()`
1450a1be3cbSAndrew Jeffery
1460a1be3cbSAndrew Jeffery   Users should move to `decode_get_pdr_resp_safe()` which reduces the
1470a1be3cbSAndrew Jeffery   invocation tedium and improves memory safety over `decode_get_pdr_resp()`.
1480a1be3cbSAndrew Jeffery
149a1efaa2eSAndrew Jeffery### Removed
150a1efaa2eSAndrew Jeffery
151a1efaa2eSAndrew Jeffery1. IBM OEM header compatibility symlinks.
152a1efaa2eSAndrew Jeffery
153a1efaa2eSAndrew Jeffery   Anyone left using the deprecated paths can migrate using the coccinelle patch
154a1efaa2eSAndrew Jeffery   at `evolutions/current/oem-ibm-header-compat.cocci`.
155a1efaa2eSAndrew Jeffery
156e4240679SAndrew Jeffery### Fixed
157e4240679SAndrew Jeffery
158e4240679SAndrew Jeffery1. requester: instance-id: Release read lock on conflict
159e4240679SAndrew Jeffery
160c166dd5fSAndrew Jeffery## [0.8.0] - 2024-05-23
161c166dd5fSAndrew Jeffery
162acf22454SAndrew Jeffery### Added
163acf22454SAndrew Jeffery
164acf22454SAndrew Jeffery1. base: Provide pldm_msg_hdr_correlate_response()
165acf22454SAndrew Jeffery2. transport: af-mctp: Add pldm_transport_af_mctp_bind()
166499389ecSKamalkumar Patel3. oem: ibm: Add chapdata file type support
1676967fc73SManojkiran Eda4. base: Added PLDM_SMBIOS & PLDM_RDE message types
16822fad395SDelphine CC Chiu5. oem: meta: Add decode_oem_meta_file_io_req()
16939aa036eSVarsha Kaverappa6. state-set: Add all state set values to system power state enum as per DSP0249
1700ee77664SVarsha Kaverappa7. platform: Add alias members to the enum
1710ee77664SVarsha Kaverappa   pldm_pdr_repository_chg_event_change_record_event_data_operation.
1720ee77664SVarsha Kaverappa
1730ee77664SVarsha Kaverappa   enum constants with inconsistent names are deprecated with this change.
1740ee77664SVarsha Kaverappa   remove old inconsistent enum members after backward compatibility cleanup is
1750ee77664SVarsha Kaverappa   done
176acf22454SAndrew Jeffery
177a9f2ffd4SPavithra Barithaya8. oem-ibm: Alias `pldm_oem_ibm_fru_field_type` members as `PLDM_OEM_IBM_*`
178819f138aSPavithra Barithaya9. oem: ibm: Add Firmware Update Access Key(UAK) as a FRU field type
17964764fd6SJinliang Wang10. platform: Add 3 PDR type enum for Redfish Device Enablement per
18064764fd6SJinliang Wang    DSP0248_1.2.0
18164764fd6SJinliang Wang11. state_set: Add CONNECTED and DISCONNECTED enum for Link State set
18264764fd6SJinliang Wang12. entity: Add enum for Network Interface Connectors and Network Ports
18364764fd6SJinliang Wang    Connection Types
184d4878cdfSThu Nguyen13. pdr: Add decode_numeric_effecter_pdr_data()
185ea435c9fSJayashankar Padath14. oem: ibm: Support for the Real SAI entity id
1864c1f2c72SChris Wang15. fw_update: Add encode req & decode resp for query_downstream_devices
187458475a9SChris Wang16. fw_update: Add encode req & decode resp for query_downstream_identifiers
188a6fa5559STal Yacobi17. platform: Add support for GetStateEffecterStates command
189a9f2ffd4SPavithra Barithaya
190acf22454SAndrew Jeffery### Changed
191acf22454SAndrew Jeffery
192acf22454SAndrew Jeffery1. base: Stabilise pldm_msg_hdr_correlate_response()
193acf22454SAndrew Jeffery2. transport: af-mctp: Stabilise pldm_transport_af_mctp_bind()
194b0c1d20aSAndrew Jeffery3. libpldm: Fix header use
195efb40069SAndrew Jeffery4. libpldm: More fixes for header use
1964a307bcaSPavithra Barithaya5. pdr: Stabilise pldm_pdr_find_last_in_range() API
1973a267059SPavithra Barithaya6. pdr: Stabilise pldm_entity_association_pdr_add_from_node_with_record_handle()
198a98814fcSAndrew Jeffery7. oem: meta: stabilise decode_oem_meta_file_io_req()
199c6c391d6SGeorge Liu8. pdr: pldm_entity_association_tree_copy_root(): Document preconditions
200acf22454SAndrew Jeffery
201a9f2ffd4SPavithra Barithaya### Deprecated
202a9f2ffd4SPavithra Barithaya
203a9f2ffd4SPavithra Barithaya1. Deprecate `pldm_oem_ibm_fru_field_type` members that that are not prefixed
204a9f2ffd4SPavithra Barithaya   with `PLDM_OEM_IBM_`
205a9f2ffd4SPavithra Barithaya
206d12dd36eSAndrew Jeffery### Fixed
207d12dd36eSAndrew Jeffery
208d12dd36eSAndrew Jeffery1. libpldm: Rationalise the local and installed path of pldm.h
20939eb3224SPavithra Barithaya2. pdr: Assign record_handle in entity_association_pdr_add_children()
210cd07fec7SThu Nguyen3. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
21151230a0aSThu Nguyen4. pdr: Remove redundant constant for minimum numeric sensor PDR length
21232df16c4SAndrew Jeffery5. tests: oem: meta: Fix fileio use of msgbuf
213d12dd36eSAndrew Jeffery
2143f39f963SAndrew Jeffery## [0.7.0] - 2023-08-29
2153f39f963SAndrew Jeffery
216f37e4dc8SPavithra Barithaya### Added
217f37e4dc8SPavithra Barithaya
218f37e4dc8SPavithra Barithaya1. state-set: Add new enum for Operational Fault Status enum
2196c835a14SAndrew Jeffery
2206c835a14SAndrew Jeffery### Changed
2216c835a14SAndrew Jeffery
2226c835a14SAndrew Jeffery1. transport: Match specified metadata in pldm_transport_send_recv_msg()
22345816b89SAndrew Jeffery2. transport: mctp-demux: Drop ABI annotation for internal symbols
2240a6d6821SAndrew Jeffery3. transport: Stabilise core transport and implementation APIs
2250a6d6821SAndrew Jeffery
2260a6d6821SAndrew Jeffery   This stabilisation covers the following headers and functions:
2270a6d6821SAndrew Jeffery
2280a6d6821SAndrew Jeffery   - libpldm/transport.h
2290a6d6821SAndrew Jeffery
2300a6d6821SAndrew Jeffery     - pldm_transport_poll()
2310a6d6821SAndrew Jeffery     - pldm_transport_send_msg()
2320a6d6821SAndrew Jeffery     - pldm_transport_recv_msg()
2330a6d6821SAndrew Jeffery     - pldm_transport_send_recv_msg()
2340a6d6821SAndrew Jeffery
2350a6d6821SAndrew Jeffery   - libpldm/transport/af-mctp.h
2360a6d6821SAndrew Jeffery
2370a6d6821SAndrew Jeffery     - pldm_transport_af_mctp_init()
2380a6d6821SAndrew Jeffery     - pldm_transport_af_mctp_destroy()
2390a6d6821SAndrew Jeffery     - pldm_transport_af_mctp_core()
2400a6d6821SAndrew Jeffery     - pldm_transport_af_mctp_init_pollfd()
2410a6d6821SAndrew Jeffery     - pldm_transport_af_mctp_map_tid()
2420a6d6821SAndrew Jeffery     - pldm_transport_af_mctp_unmap_tid()
2430a6d6821SAndrew Jeffery
2440a6d6821SAndrew Jeffery   - libpldm/transport/mctp-demux.h
2450a6d6821SAndrew Jeffery     - pldm_transport_mctp_demux_init()
2460a6d6821SAndrew Jeffery     - pldm_transport_mctp_demux_destroy()
2470a6d6821SAndrew Jeffery     - pldm_transport_mctp_demux_core()
2480a6d6821SAndrew Jeffery     - pldm_transport_mctp_demux_init_pollfd()
2490a6d6821SAndrew Jeffery     - pldm_transport_mctp_demux_map_tid()
2500a6d6821SAndrew Jeffery     - pldm_transport_mctp_demux_unmap_tid()
2510a6d6821SAndrew Jeffery
2520a6d6821SAndrew Jeffery### Deprecated
2530a6d6821SAndrew Jeffery
2540a6d6821SAndrew Jeffery1. All the existing "requester" APIs from `libpldm/pldm.h` (also known as
2550a6d6821SAndrew Jeffery   `libpldm/requester/pldm.h`):
2560a6d6821SAndrew Jeffery
2570a6d6821SAndrew Jeffery   - pldm_open()
2580a6d6821SAndrew Jeffery   - pldm_send_recv()
2590a6d6821SAndrew Jeffery   - pldm_send()
2600a6d6821SAndrew Jeffery   - pldm_recv()
2610a6d6821SAndrew Jeffery   - pldm_recv_any()
2620a6d6821SAndrew Jeffery   - pldm_close()
2630a6d6821SAndrew Jeffery
2640a6d6821SAndrew Jeffery   Users should migrate to the newer "transport" APIs instead.
265f37e4dc8SPavithra Barithaya
266ba05dba7SAndrew Jeffery## Fixed
267ba05dba7SAndrew Jeffery
268ba05dba7SAndrew Jeffery1. tests: Exclude transport tests when build excludes testing ABIs
26934ac891fSAndrew Jeffery2. abi: Capture deprecation of pldm_close()
270ba05dba7SAndrew Jeffery
271d2a36a16SAndrew Jeffery## [0.6.0] - 2023-08-22
272d2a36a16SAndrew Jeffery
2737062382aSAndrew Jeffery### Changed
2747062382aSAndrew Jeffery
2757062382aSAndrew Jeffery1. pdr: Avoid ID overflow in pldm_entity_association_tree_add_entity()
2765cf32ea8SAndrew Jeffery2. meson: Apply `b_ndebug=if-release` by default
277e7eebe33SAndrew Jeffery3. pdr : Stabilize pldm_entity_association_tree_add_entity()
27875ce90a5SAndrew Jeffery4. pdr: Stabilise pldm_entity_association_tree_find_with_locality()
279def8e024SPavithra Barithaya5. pdr: Stabilize pldm_entity_node_get_remote_container_id()
280ac24737cSAndrew Jeffery6. transport: af-mctp: Assign out-params on success in \*\_recv()
28124576290SRashmica Gupta7. transport: Generalise the pldm_transport_recv_msg() API
2827062382aSAndrew Jeffery
283255f6549SAndrew Jeffery### Removed
284255f6549SAndrew Jeffery
285255f6549SAndrew Jeffery1. pdr: Remove pldm_entity_association_pdr_add()
2867e3c9e4dSPavithra Barithaya2. state-set: Remove enum pldm_state_set_operational_fault_status_values
287255f6549SAndrew Jeffery
288b4cd5172SDelphine CC Chiu### Fixed
289b4cd5172SDelphine CC Chiu
290b4cd5172SDelphine CC Chiu1. transport: register init_pollfd callback for af-mctp
29136402ffbSBonnieLo-wiwynn2. transport: fix init_pollfd function parameter
292f1ebde49SRashmica Gupta3. transport: Fix doxygen and variables for send and recv functions
2937caa8af1SAndrew Jeffery4. transport: af-mctp: Ensure malloc() succeeds in \*\_recv()
294b4cd5172SDelphine CC Chiu
29520cc060cSAndrew Jeffery## [0.5.0] - 2023-08-09
29620cc060cSAndrew Jeffery
29765945992SAndrew Jeffery### Added
29865945992SAndrew Jeffery
29965945992SAndrew Jeffery1. pdr: Introduce pldm_entity_association_pdr_add_check()
30065945992SAndrew Jeffery
3013b93d09cSAndrew Jeffery### Changed
3023b93d09cSAndrew Jeffery
3033b93d09cSAndrew Jeffery1. pdr: Allow record_handle to be NULL for pldm_pdr_add_check()
3043380a6c6SAndrew Jeffery2. transport: pldm_transport_poll(): Adjust return value semantics
305f56e4dcdSThu Nguyen3. transport: free un-wanted responses in pldm_transport_send_recv_msg()
3063b93d09cSAndrew Jeffery
3078bcbe251SAndrew Jeffery### Deprecated
3088bcbe251SAndrew Jeffery
3098bcbe251SAndrew Jeffery1. state-set: Enum pldm_state_set_operational_fault_status_values
3108bcbe251SAndrew Jeffery
3118bcbe251SAndrew Jeffery   The enum operational_fault_status is defined with wrong members and will
3128bcbe251SAndrew Jeffery   eventually be replaced with the correct members. Any uses of
3138bcbe251SAndrew Jeffery   pldm_state_set_operational_fault_status_values members should move to
3148bcbe251SAndrew Jeffery   equivalent pldm_state_set_operational_stress_status_values members if needed.
3158bcbe251SAndrew Jeffery
3168bcbe251SAndrew Jeffery2. platform: Struct field name in fru_record_set PDR
3178bcbe251SAndrew Jeffery
3188bcbe251SAndrew Jeffery   References to entity_instance_num should be changed to entity_instance
3198bcbe251SAndrew Jeffery
3208bcbe251SAndrew Jeffery3. platform: Struct field name in numeric sensor value PDR
3218bcbe251SAndrew Jeffery
3228bcbe251SAndrew Jeffery   References to entity_instance_num should be changed to entity_instance
3238bcbe251SAndrew Jeffery
3240ecf6bcfSAndrew Jeffery### Removed
3250ecf6bcfSAndrew Jeffery
3260ecf6bcfSAndrew Jeffery1. bios_table: Remove pldm_bios_table_attr_entry_integer_encode_length()
3278b1c0340SAndrew Jeffery2. bios_table: Remove pldm_bios_table_attr_value_entry_encode_enum()
32846d07685SAndrew Jeffery3. bios_table: Remove pldm_bios_table_attr_value_entry_encode_string()
3294e1f131cSAndrew Jeffery4. bios_table: Remove pldm_bios_table_attr_value_entry_encode_integer()
33050dd159eSAndrew Jeffery5. bios_table: Remove pldm_bios_table_append_pad_checksum()
3318810feceSAndrew Jeffery6. fru: Remove get_fru_record_by_option()
332d09b1af0SAndrew Jeffery7. pdr: Make is_present() static
333c79a5df5SAndrew Jeffery8. pdr: Remove pldm_pdr_add()
33414d2984bSAndrew Jeffery9. pdr: Remove pldm_pdr_add_fru_record_set()
3358985dfd1SAndrew Jeffery10. pdr: Remove pldm_entity_association_pdr_add_from_node()
336643c443bSAndrew Jeffery11. pdr: Make find_entity_ref_in_tree() static
33754d91e81SAndrew Jeffery12. pdr: Make entity_association_tree_find() static
3380ecf6bcfSAndrew Jeffery
33943a7985dSThu Nguyen### Fixed
34043a7985dSThu Nguyen
34143a7985dSThu Nguyen1. requester: Fix response buffer cast in pldm_send_recv()
342c6cc028fSAndrew Jeffery2. pdr: Hoist record handle overflow test to avoid memory leak
343ef485068SThu Nguyen3. transport: Correct comparison in while loop condition
34443a7985dSThu Nguyen
3458a4b5336SAndrew Jeffery## [0.4.0] - 2023-07-14
3468a4b5336SAndrew Jeffery
347044ee19aSAndrew Jeffery### Added
348044ee19aSAndrew Jeffery
349044ee19aSAndrew Jeffery1. bios_table: Introduce pldm_bios_table_append_pad_checksum_check()
3507cd16ff8SAndrew Jeffery2. fru: Introduce get_fru_record_by_option_check()
351cc394529SAndrew Jeffery3. pdr: Introduce pldm_entity_association_pdr_add_from_node_check()
352572a3950SAndrew Jeffery4. pdr: Introduce pldm_pdr_add_check()
353c821a700SAndrew Jeffery5. pdr: Introduce pldm_pdr_add_fru_record_set_check()
354044ee19aSAndrew Jeffery
355986df2a1SAndrew Jeffery### Changed
356986df2a1SAndrew Jeffery
357986df2a1SAndrew Jeffery1. requester: Mark pldm_close() as LIBPLDM_ABI_TESTING
3585fb9680bSAndrew Jeffery2. requester: Expose pldm_close() in header
359a873eca0SAndrew Jeffery3. bios_table: pldm_bios_table_string_entry_encode_check(): Handle overflow
360757e81a1SAndrew Jeffery4. bios_table: pldm_bios_table_iter_create(): Return NULL on failed alloc
36173d9176aSAndrew Jeffery5. bios_table: pldm_bios_table_iter_next(): Invalid entry halts iteration
362a8bb22edSAndrew Jeffery6. pdr: pldm_pdr_init(): Return NULL on allocation failure
363fca1b60fSAndrew Jeffery7. pdr: pldm_pdr_destroy(): Exit early if repo is NULL
3645565fcdeSAndrew Jeffery8. pdr: Document preconditions for trivial accessor functions
3655565fcdeSAndrew Jeffery
3665565fcdeSAndrew Jeffery   A trivial accessor function is one that exposes properties of an object in a
3675565fcdeSAndrew Jeffery   way can't result in an error, beyond passing an invalid argument to the
3685565fcdeSAndrew Jeffery   function. For APIs meeting this definition we define a precondition that
3695565fcdeSAndrew Jeffery   struct pointers must point to valid objects to avoid polluting the function
3705565fcdeSAndrew Jeffery   prototypes. The following APIs now have this precondition explicitly defined:
3715565fcdeSAndrew Jeffery
3725565fcdeSAndrew Jeffery   - pldm_entity_extract()
3735565fcdeSAndrew Jeffery   - pldm_entity_get_parent()
3745565fcdeSAndrew Jeffery   - pldm_entity_is_exist_parent()
3755565fcdeSAndrew Jeffery   - pldm_entity_is_node_parent()
3765565fcdeSAndrew Jeffery   - pldm_is_current_parent_child
3775565fcdeSAndrew Jeffery   - pldm_is_empty_entity_assoc_tree()
3785565fcdeSAndrew Jeffery   - pldm_pdr_get_record_count()
3795565fcdeSAndrew Jeffery   - pldm_pdr_get_record_handle()
3805565fcdeSAndrew Jeffery   - pldm_pdr_get_repo_size()
3815565fcdeSAndrew Jeffery   - pldm_pdr_record_is_remote()
382986df2a1SAndrew Jeffery
38315b8818cSAndrew Jeffery9. pdr: pldm_entity_node_get_remote_container_id() is a trivial accessor
38401425e96SAndrew Jeffery10. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Exit early on NULL arguments
385c40037d5SAndrew Jeffery11. pdr: pldm_entity_association_tree_init(): Return NULL on failed alloc
3868e9b0de8SAndrew Jeffery12. pdr: pldm_entity_association_tree_visit(): Document preconditions
387cd17e5ccSAndrew Jeffery13. pdr: pldm_entity_association_tree_visit(): Exit early on failure
388a89e015cSAndrew Jeffery14. pdr: pldm_entity_association_tree_destroy(): Exit early on bad argument
3896e8a2617SAndrew Jeffery15. pdr: pldm_entity_get_num_children(): Return zero for invalid arguments
390375d9fc1SAndrew Jeffery16. pdr: pldm_is_current_parent_child(): Return false for invalid arguments
391c788348eSAndrew Jeffery17. pdr: pldm_entity_association_pdr_add(): Exit early on bad arguments
392ba47e83eSAndrew Jeffery18. pdr: pldm_find_entity_ref_in_tree(): Exit early on bad arguments
39394e364dbSAndrew Jeffery19. pdr: pldm_entity_association_tree_find(): Early exit on bad arguments
39485d7a056SAndrew Jeffery20. pdr: pldm_entity_association_tree_destroy_root(): Exit early on bad arg
3953a5c46b4SAndrew Jeffery21. pdr: pldm_entity_association_pdr_extract(): Early exit on bad arguments
3960dbaa70fSAndrew Jeffery22. pdr: pldm_entity_association_pdr_extract(): Assign out params at exit
397c83ef86dSAndrew Jeffery23. pdr: pldm_entity_get_num_children(): Don't return invalid values
3988526892fSAndrew Jeffery24. libpldm: Lift or remove asserts where a subsequent check exists
39915b8818cSAndrew Jeffery
400fe0f01d8SAndrew Jeffery### Deprecated
401fe0f01d8SAndrew Jeffery
402fe0f01d8SAndrew Jeffery1. pldm_bios_table_attr_entry_integer_encode()
403fe0f01d8SAndrew Jeffery
404fe0f01d8SAndrew Jeffery   Migrate to pldm_bios_table_attr_entry_integer_encode_check()
405fe0f01d8SAndrew Jeffery
4067aeb7edbSAndrew Jeffery2. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_enum()
4077aeb7edbSAndrew Jeffery
4087aeb7edbSAndrew Jeffery   Migrate to pldm_bios_table_attr_value_entry_encode_enum_check()
4097aeb7edbSAndrew Jeffery
4102d66393fSAndrew Jeffery3. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_string()
4112d66393fSAndrew Jeffery
4122d66393fSAndrew Jeffery   Migrate to pldm_bios_table_attr_value_entry_encode_string_check()
4132d66393fSAndrew Jeffery
4140088a6aeSAndrew Jeffery4. bios_table: Deprecate pldm_bios_table_attr_value_entry_encode_integer()
4150088a6aeSAndrew Jeffery
4160088a6aeSAndrew Jeffery   Migrate to pldm_bios_table_attr_value_entry_encode_integer_check()
4170088a6aeSAndrew Jeffery
418d11bf9f7SAndrew Jeffery5. pdr: Deprecate is_present()
419d11bf9f7SAndrew Jeffery
420d11bf9f7SAndrew Jeffery   There should be no users of this symbol. If you are a user, you should figure
421d11bf9f7SAndrew Jeffery   out how to stop, or get in touch. This symbol will be marked static the
422d11bf9f7SAndrew Jeffery   release after deprecation.
423d11bf9f7SAndrew Jeffery
424bfeb65ebSAndrew Jeffery6. pdr: Deprecate find_entity_ref_in_tree()
425bfeb65ebSAndrew Jeffery
426bfeb65ebSAndrew Jeffery   There should be no users of this symbol. If you are a user, you should figure
427bfeb65ebSAndrew Jeffery   out how to stop, or get in touch. This symbol will be marked static the
428bfeb65ebSAndrew Jeffery   release after deprecation.
429bfeb65ebSAndrew Jeffery
4307f589313SAndrew Jeffery7. pdr: Deprecate entity_association_tree_find()
4317f589313SAndrew Jeffery
4327f589313SAndrew Jeffery   There should be no users of this symbol. If you are a user, you should figure
4337f589313SAndrew Jeffery   out how to stop, or get in touch. This symbol will be marked static the
4347f589313SAndrew Jeffery   release after deprecation.
4357f589313SAndrew Jeffery
4361264fbd9SAndrew Jeffery8. bios_table: Stabilise pldm_bios_table_append_pad_checksum_check()
4371264fbd9SAndrew Jeffery
4381264fbd9SAndrew Jeffery   pldm_bios_table_append_pad_checksum() is deprecated by this change. Users of
4391264fbd9SAndrew Jeffery   pldm_bios_table_append_pad_checksum() should migrate to
4401264fbd9SAndrew Jeffery   pldm_bios_table_append_pad_checksum_check()
4411264fbd9SAndrew Jeffery
442962fcec7SAndrew Jeffery9. fru: Stabilise get_fru_record_by_option_check()
443962fcec7SAndrew Jeffery
444962fcec7SAndrew Jeffery   get_fru_record_by_option() is deprecated by this change. Users of
445962fcec7SAndrew Jeffery   get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
446962fcec7SAndrew Jeffery
4471354a6eeSAndrew Jeffery10. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
4481354a6eeSAndrew Jeffery
4491354a6eeSAndrew Jeffery    pldm_entity_association_pdr_add_from_node() is deprecated by this change.
4501354a6eeSAndrew Jeffery    Users of pldm_entity_association_pdr_add_from_node() should migrate to
4511354a6eeSAndrew Jeffery    pldm_entity_association_pdr_add_from_node_check()
4521354a6eeSAndrew Jeffery
453ca248ce3SAndrew Jeffery11. pdr: Stabilise pldm_pdr_add_check()
454ca248ce3SAndrew Jeffery
455ca248ce3SAndrew Jeffery    pldm_pdr_add() is deprecated by this change. Users of pldm_pdr_add() should
456ca248ce3SAndrew Jeffery    migrate to pldm_pdr_add_check()
457ca248ce3SAndrew Jeffery
458a2c69117SAndrew Jeffery12. pdr: Stabilise pldm_pdr_add_fru_record_set_check()
459a2c69117SAndrew Jeffery
460a2c69117SAndrew Jeffery    pldm_pdr_add_fru_record_set() is deprecated by this change. Users of
461a2c69117SAndrew Jeffery    pldm_pdr_add_fru_record_set() should migrate to
462a2c69117SAndrew Jeffery    pldm_pdr_add_fru_record_set_check()
463a2c69117SAndrew Jeffery
4646409c8a0SAndrew Jeffery### Removed
4656409c8a0SAndrew Jeffery
4666409c8a0SAndrew Jeffery1. bios_table: Remove deprecated APIs sanitized by assert():
4676409c8a0SAndrew Jeffery
4686409c8a0SAndrew Jeffery   - pldm_bios_table_string_entry_encode()
4696409c8a0SAndrew Jeffery   - pldm_bios_table_string_entry_decode_string()
4706409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_encode()
4716409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_pv_num()
4726409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_def_num()
4736409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
4746409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_string_encode()
4756409c8a0SAndrew Jeffery   - pldm_bios_table_attr_entry_string_decode_def_string_length()
4766409c8a0SAndrew Jeffery
47709778a82SAndrew Jeffery### Fixed
478ffd5342cSPavithra Barithaya
479ffd5342cSPavithra Barithaya1. pdr: Return success for pldm_pdr_find_child_container_id_range_exclude() API
4808cf70456SPavithra Barithaya2. pdr: Rework pldm_pdr_find_container_id_range_exclude() API
481a4da6858SAndrew Jeffery3. transport: mctp-demux: Don't test socket for non-zero value
4824e1ba8a7SAndrew Jeffery4. requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
483af7a4d82SAndrew Jeffery5. pdr: pldm_pdr_fru_record_set_find_by_rsi(): Document reality of return
484178531a0SRashmica Gupta6. transport: Fix possible NULL ptr deref in pldm_socket_sndbuf_init()
485cd732d14SAndrew Jeffery7. abi: Update to remove pldm_close() from reference dumps
4869e33be96SAndrew Jeffery8. bios_table: Annotate pldm_bios_table_attr_value_entry_encode_integer()
487ffd5342cSPavithra Barithaya
488291da195SAndrew Jeffery## [0.3.0] - 2023-06-23
489291da195SAndrew Jeffery
4907c250340SDung Cao### Added
4917c250340SDung Cao
4927c250340SDung Cao1. Add encode/decode pldmMessagePollEvent data
49383841fb5SAndrew Jeffery2. README: Add a section on working with libpldm
49439bd2ea5SArchanaKakani3. pdr: Introduce remote_container_id and associated APIs
4959947f9d6SPavithra Barithaya4. pdr: Add APIs for creating and locating remote PDRs
4964d694346SPavithra Barithaya5. pdr: Add pldm_pdr_find_last_in_range()
49725ddbccfSPavithra Barithaya6. pdr: Add pldm_entity_association_pdr_add_from_node_with_record_handle()
4985dc02571SPavithra Barithaya7. pdr: Add pldm_pdr_find_container_id_range_exclude()
4997c250340SDung Cao
500b443b487SRashmica Gupta### Changed
501b443b487SRashmica Gupta
502b443b487SRashmica Gupta1. include: Move installed transport.h under libpldm/
50383841fb5SAndrew Jeffery2. libpldm: Explicit deprecated, stable and testing ABI classes
5048de8e1ecSAndrew Jeffery3. meson: Reduce strength of oem-ibm requirements from enabled to allowed
5058de8e1ecSAndrew Jeffery
5068de8e1ecSAndrew Jeffery   The `oem-ibm` feature is now enabled by the default meson configuration, for
5078de8e1ecSAndrew Jeffery   CI purposes. `oem-ibm` is still disabled by default in the `libpldm` bitbake
5088de8e1ecSAndrew Jeffery   recipe:
5098de8e1ecSAndrew Jeffery
5100f7218cdSGeorge Liu   <https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/libpldm/libpldm_git.bb#L10>
5118de8e1ecSAndrew Jeffery
5128de8e1ecSAndrew Jeffery   To disable `oem-ibm` in your development builds, pass `-Doem-ibm=disabled`
5138de8e1ecSAndrew Jeffery   when invoking `meson setup`
514b443b487SRashmica Gupta
51598c1e69dSAndrew Jeffery4. bios_table: Relax pldm_bios_table_string_entry_decode_string_check()
5160c9f5a8aSAndrew Jeffery5. bios_table: Relax pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()
51798c1e69dSAndrew Jeffery
518d47e8ab8SAndrew Jeffery### Deprecated
519d47e8ab8SAndrew Jeffery
520d47e8ab8SAndrew Jeffery1. bios_table: Deprecate APIs with arguments sanitized using assert()
521d47e8ab8SAndrew Jeffery
522d47e8ab8SAndrew Jeffery   C provides enough foot-guns without us encoding them into library APIs.
523d47e8ab8SAndrew Jeffery   Specifically, deprecate the following in favour of their `*_check()` variants
524d47e8ab8SAndrew Jeffery   which ensure assertions won't fail or otherwise invoke UB:
525d47e8ab8SAndrew Jeffery
526d47e8ab8SAndrew Jeffery   - pldm_bios_table_string_entry_encode()
527d47e8ab8SAndrew Jeffery   - pldm_bios_table_string_entry_decode_string()
528d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_encode()
529d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_pv_num()
530d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_def_num()
531d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_enum_decode_pv_hdls()
532d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_string_encode()
533d47e8ab8SAndrew Jeffery   - pldm_bios_table_attr_entry_string_decode_def_string_length()
534d47e8ab8SAndrew Jeffery
5354b4603b3SAndrew Jeffery### Removed
5364b4603b3SAndrew Jeffery
5374b4603b3SAndrew Jeffery1. libpldm: Remove the requester-api option
5384b4603b3SAndrew Jeffery
53939f88325SRashmica Gupta### Fixed
54039f88325SRashmica Gupta
54139f88325SRashmica Gupta1. requester: Make pldm_open() return existing fd
542abaf61f4SDung Cao2. transport: Prevent sticking in waiting for response
543b01fb1ccSThu Nguyen3. transport: Match on response in pldm_transport_send_recv_msg()
544a3035938SRashmica Gupta4. requester: Add check before accessing hdr in pldm_recv()
545df02e360SAndrew Jeffery5. bios_table: pldm_bios_table_attr_entry_string_info_check() NULL deref
546