2d17acec | 27-Aug-2024 |
Ed Tanous <etanous@nvidia.com> |
Improve Nvidia CPER decode
Add decoding of registers to the structure. Note, this requires COUNTED_BY support which is borrowed from LIBPLDM.
Also add unit-tests for NVIDIA section, and update sch
Improve Nvidia CPER decode
Add decoding of registers to the structure. Note, this requires COUNTED_BY support which is borrowed from LIBPLDM.
Also add unit-tests for NVIDIA section, and update schema to match existing register decoding.
Change-Id: If1c9cae97de35ba6a5dad1f462d3989ec6ac6a90 Signed-off-by: Karthik Rajagopalan <krajagopalan@nvidia.com> Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
358c7e16 | 15-Jul-2024 |
Ed Tanous <ed@tanous.net> |
Remove json-schema install
This code just copies the json-schema from the source dir to the compile dir. It doesn't actually accomplish anything.
Move the source dir to a compile flag, and let uni
Remove json-schema install
This code just copies the json-schema from the source dir to the compile dir. It doesn't actually accomplish anything.
Move the source dir to a compile flag, and let unit tests read in the schema directly.
Note: Copy was actually done in two places.
Change-Id: I26aee9edbac5b253ca426d32118b71cc5f905e10 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
a7d2cddd | 15-Jul-2024 |
Ed Tanous <etanous@nvidia.com> |
Move to embedded base64
Base64 encode/decode is a relatively simple algorithm, and currently libcper takes a dependency on libb64 for this. libb64 does not have methods for determining the encoded
Move to embedded base64
Base64 encode/decode is a relatively simple algorithm, and currently libcper takes a dependency on libb64 for this. libb64 does not have methods for determining the encoded size or decoded size, and rely on the user to provide the right buffer sizes, which libcper currently approximates as 2X the input size (which is incorrect).
This commit removes the libb64 dependency entirely, and inlines a libcper specific base64 encoder and decoder, using EDK2-allowed types.
The implementation itself is unique to libcper and makes the following design decisions. 1. Malloc is performed within the base64_<> functions. This reduces the number of malloc calls total, and removes the need for separately determining the output size. 2. Arguments are passed in by EDK2-types under the assumption that this will keep compatibility with EDK2 implementations. 3. Incremental parsing is not supported. CPER records are expected to be algorithmically small, and buffered such that the entire value fits in memory. This was already an assumption, but dropping the support for incremental encoding significantly reduces the amount of code to support it. It could be added back in the future if needed.
Change-Id: Idb010db105067ea317dbee05c2663511ab3c6611 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|