| f4d88103 | 19-Nov-2025 |
Roger G. Coscojuela <roger.gili-coscojuela@sipearl.com> |
msgbuf: Add pldm_msgbuf_insert_real32
Support from extracting real32_t data is already present, but the insert functionality is missing.
This change is required for encoding platform sensor data in
msgbuf: Add pldm_msgbuf_insert_real32
Support from extracting real32_t data is already present, but the insert functionality is missing.
This change is required for encoding platform sensor data in the msgbuf.
Change-Id: Iff397116d15f23e51c472b8e478b4a2511ce0692 Signed-off-by: Roger G. Coscojuela <roger.gili-coscojuela@sipearl.com>
show more ...
|
| 06dcea74 | 29-Oct-2025 |
Chau Ly <chaul@amperecomputing.com> |
msgbuf: platform: Correct pldm_msgbuf_extract_effecter_data
`pldm_msgbuf_extract_effecter_data` should call to `pldm__msgbuf_extract_effecter_data` instead of `pldm__msgbuf_extract_range_field_forma
msgbuf: platform: Correct pldm_msgbuf_extract_effecter_data
`pldm_msgbuf_extract_effecter_data` should call to `pldm__msgbuf_extract_effecter_data` instead of `pldm__msgbuf_extract_range_field_format`. This commit corrects the function to call to the designated one.
Fixes: d4878cd ("pdr: Add decode_numeric_effecter_pdr_data()") Change-Id: I1bc9ed88eb291368c4fd96560bf089e597d75b55 Signed-off-by: Chau Ly <chaul@amperecomputing.com>
show more ...
|
| 7a8d932b | 27-Aug-2025 |
John Chung <john.chung@arm.com> |
msgbuf: Define a separate msgbuf structure for encode/decode function
Define separate msgbuf structures to avoid casting away const-qualifiers in the msgbuf constructor function:
* pldm_msgbuf_rw:
msgbuf: Define a separate msgbuf structure for encode/decode function
Define separate msgbuf structures to avoid casting away const-qualifiers in the msgbuf constructor function:
* pldm_msgbuf_rw: for encode functions with non const-qualified buffer * pldm_msgbuf_ro: for decode functions with const-qualified buffer
Further, use _Generic() to keep the API ergonomic while still yielding a compile error when wrong msgbuf type is passed.
Change-Id: I71dbcb7996e9fb402b49870fce539a939c1497e5 Signed-off-by: John Chung <john.chung@arm.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
| 329176a8 | 26-Sep-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: platform: Merge PDR header extraction and validation
These two functions were tightly coupled, in the sense that in all invocations of either were proximal to the other.
Merge them to avoid th
dsp: platform: Merge PDR header extraction and validation
These two functions were tightly coupled, in the sense that in all invocations of either were proximal to the other.
Merge them to avoid the spatial separation and improve both our own and the compiler's ability to reason about the relationships.
Change-Id: I098afac06fea56a26762879a620e74539f6e6d52 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
| cb569bc5 | 01-Sep-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
compiler: Provide LIBPLDM_CC_ALWAYS_INLINE
Using it through the code-base reduces some of the source noise, and gives us a way to control the definition going forward.
Change-Id: I27e76cbae5c45f0ef
compiler: Provide LIBPLDM_CC_ALWAYS_INLINE
Using it through the code-base reduces some of the source noise, and gives us a way to control the definition going forward.
Change-Id: I27e76cbae5c45f0efd64b01fb9a8b243a6c8e65d Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
| d4878cdf | 08-Nov-2023 |
Thu Nguyen <thu@os.amperecomputing.com> |
pdr: Add decode_numeric_effecter_pdr_data()
Add `decode_numeric_effecter_pdr_data` API to decode the numeric effecter PDR data in DSP0248_1.2.2 table 87. The API will be used to retrieve the data fi
pdr: Add decode_numeric_effecter_pdr_data()
Add `decode_numeric_effecter_pdr_data` API to decode the numeric effecter PDR data in DSP0248_1.2.2 table 87. The API will be used to retrieve the data fields of numeric effecter from the PDRs in `pldmd`.
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com> Change-Id: I323a1288cb0262bd39f4f28701ddc7dbb70c33c8
show more ...
|
| 66c7723a | 23-Apr-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
msgbuf: Enable pldm_msgbuf_extract() into packed members
`pldm_msgbuf_extract()` should work correctly regardless of whether the `dst` argument is a member of a packed or padded struct.
To get ther
msgbuf: Enable pldm_msgbuf_extract() into packed members
`pldm_msgbuf_extract()` should work correctly regardless of whether the `dst` argument is a member of a packed or padded struct.
To get there while still achieving type safety we have to jump through some hoops. Commentary in the patch hopefully captures many of them, but a side-effect of the hoop-jumping is a couple of changes to ergonomics of the msgbuf API:
1. `pldm_msgbuf_extract()` no-longer requires that the `dst` argument be a pointer. Instead, it must be an lvalue, removing all the `&<lvalue>` noise from the call-sites.
2. However, unfortunately the generic extraction macro has been split in two. We now have:
2.1 `pldm_msgbuf_extract()`, and 2.2 `pldm_msgbuf_extract_p()`, for when the reference we already have for the `dst` object is a pointer and not an lvalue.
The split was necessary because I couldn't get GCC and Clang to play nice with differences required in the assignment expression for lvalue and pointer type-names in the one macro. Whilst it causes a bunch of churn it isn't a great concern as the APIs are purely internal to the library implementation.
Change-Id: Ifc5440a5b838a48bb84c881ec334d9e145365edb Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
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 ...
|
| 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 |
| 840b140a | 13-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_get_sensor_reading_resp()
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ib059858cdec0e02acccffe93c50629d610aa5ada |
| 3884c44d | 11-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
platform: pldm_msgbuf for decode_set_numeric_effecter_value_req()
Also, make it at least possible to detect incorrect use of the API by declaring `effecter_value` as a fixed-size array of 4. Misuse
platform: pldm_msgbuf for decode_set_numeric_effecter_value_req()
Also, make it at least possible to detect incorrect use of the API by declaring `effecter_value` as a fixed-size array of 4. Misuse is detected by -Wstringop-overflow with `gcc`, however failure to uphold the requirement is ignored by `g++`, and both `clang` and `clang++`.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I5769db4d3c812d7feef994de836a8621fb4bf3cf
show more ...
|
| 7992eb84 | 06-Apr-2023 |
Andrew Jeffery <andrew@aj.id.au> |
Add numeric sensor PDR and sensor aux names PDR
1. Added struct for numeric sensor PDR in DSP0248_1.2.2 table78 and decode_numeric_sensor_pdr_data API to unpack pdr data to struct 2. Added struct fo
Add numeric sensor PDR and sensor aux names PDR
1. Added struct for numeric sensor PDR in DSP0248_1.2.2 table78 and decode_numeric_sensor_pdr_data API to unpack pdr data to struct 2. Added struct for sensor auxiliary names PDR in DSP0248_1.2.2 table83
Signed-off-by: Gilbert Chen <gilbertc@nvidia.com> Change-Id: I11d25ee7da8326a5f5fe2c8a237ac014882e436e
show more ...
|