| 51c18132 | 26-Nov-2025 |
Daniel Osawa <dosawa@nvidia.com> |
Add NVIDIA Event CPER section support
Add parsing and generation for NVIDIA Event error sections, including: - CPU and GPU device-specific event info - Multiple context data formats (key-value pairs
Add NVIDIA Event CPER section support
Add parsing and generation for NVIDIA Event error sections, including: - CPU and GPU device-specific event info - Multiple context data formats (key-value pairs, opaque, GPU metadata, legacy XID, recommended actions) - JSON schema specifications - Example files and tests
Change-Id: Ibf66e2e4263014c2157958acf2f6158361fc6866 Signed-off-by: Daniel Osawa <dosawa@nvidia.com> Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| e1cba52d | 18-Sep-2025 |
Prachotan Bathi <prachotan.bathi@arm.com> |
cper-section-arm-ras: Support Arm RAS System Architecture node CPER
The DEN0085 - Arm ACPI for the Armv8-A RAS Extension and RAS System Architecture v2.0 specification, section 4, defines additional
cper-section-arm-ras: Support Arm RAS System Architecture node CPER
The DEN0085 - Arm ACPI for the Armv8-A RAS Extension and RAS System Architecture v2.0 specification, section 4, defines additional standard CPER records for Arm RAS architecture. https://developer.arm.com/documentation/den0085/latest/
Added section definitions and generator to generate an example cper with one descriptor. Generate using: ./cper-generate --out cper.generated.dump --sections arm-ras-node
Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com> Signed-off-by: Ed Tanous <etanous@nvidia.com> Change-Id: Ic7fa68a6c584c537a3dc2c4b17795dd7ba3b3f8c
show more ...
|
| 84752233 | 21-Jan-2026 |
Ed Tanous <etanous@nvidia.com> |
Use size of buffer for copy
When using the untrusted functions, use the length of the buffer, rather than strlen to determine the correct size of the char array.
While we're there, change the gener
Use size of buffer for copy
When using the untrusted functions, use the length of the buffer, rather than strlen to determine the correct size of the char array.
While we're there, change the generation function to explicitly load all bytes of the signature with zeros.
Tested: Unit tests pass.
Change-Id: I588c7f03dec0f749dad76e776ae818b31351d45c Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 043d5f4b | 17-Oct-2025 |
Erwin Tsaur <etsaur@nvidia.com> |
ARM CPER: Decode ErrorType as bit values
ErrorInformation.ErrorType needs to be decoded as bit values instead of as an integer.
Change-Id: Iee09eb6e62561620d0903fea1ae4d6ed35898445 Signed-off-by: E
ARM CPER: Decode ErrorType as bit values
ErrorInformation.ErrorType needs to be decoded as bit values instead of as an integer.
Change-Id: Iee09eb6e62561620d0903fea1ae4d6ed35898445 Signed-off-by: Erwin Tsaur <etsaur@nvidia.com>
show more ...
|
| 398899a0 | 25-Jul-2025 |
Ed Tanous <etanous@nvidia.com> |
Fix pedantic warnings
With the latest build system, somehow -Wpedantic got turned on. This is reasonable given that we expect this code to compile against a number of targets. Fix void issues.
vo
Fix pedantic warnings
With the latest build system, somehow -Wpedantic got turned on. This is reasonable given that we expect this code to compile against a number of targets. Fix void issues.
void function() changes to void function(void)
Change-Id: I89a2dcbcd88c7d163ffdfb67927f71b39cb7aa6f Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 55968b12 | 06-May-2025 |
Ed Tanous <ed@tanous.net> |
Nvidia add cmet-info
Add decoding of more specific Error codes.
Unit tests pass.
Change-Id: Ia0ca0dfdf550381da435b0fb9041b664784f7476 Signed-off-by: Ed Tanous <etanous@nvidia.com> |
| 8870c074 | 28-Feb-2025 |
Erwin Tsaur <etsaur@nvidia.com> |
PCIe CPER Section Enhancement
This commit improves PCIe error reporting capabilities by: - Adding support for PCIe capability version detection and parsing - Expanding Advanced Error Reporting infor
PCIe CPER Section Enhancement
This commit improves PCIe error reporting capabilities by: - Adding support for PCIe capability version detection and parsing - Expanding Advanced Error Reporting information extraction
The changes include: - New capability_registers structure to decode PCIe capability registers - Updated PCIe JSON Schema to match - Support for PCIe 2.0+ extended registers when detected - Improved error source identification and root error status reporting - Fix typo for Advanced Error Reporting capabilit[i]es_control - Updated generate/gen-section-pcie.c and pcie.json example
In the future we could: - Implement TLP header log parsing with detailed descriptions - Add support for Flit mode in PCIe 2.0+ devices
Tested: - test/cper-tests passes - cper-convert to-json|to-cper on pcie.cper|json in example path - Tested "cper-convert to-json-section" using an extracted OS GHES PCIE CPER from error injection and compare against expected values
Note, schema validation is intentionally less restrictive than it could be for pcie advanced error reporting as it evolves.
Change-Id: Ifebb9d97d28a3a487a0aab53bf9e757afeedd64a Signed-off-by: Erwin Tsaur <etsaur@nvidia.com> Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| bd1814de | 31-Mar-2025 |
Khang D Nguyen <khangng@os.amperecomputing.com> |
Ensure FRU text is printable ASCII
Currently, libcper currently fails to compile on my machine (GCC 13):
../cper-utils.c: In function ‘add_untrusted_string’: ../cper-utils.c:467:23: error:
Ensure FRU text is printable ASCII
Currently, libcper currently fails to compile on my machine (GCC 13):
../cper-utils.c: In function ‘add_untrusted_string’: ../cper-utils.c:467:23: error: comparison is always false due to limited range of data type [-Werror=type-limits] 467 | if (c < 0) { | ^
The reason seems to be that char signedness is implementation-defined, we have to explicitly use unsigned char or signed char to get a portable char type. In our case, char is unsigned char, hence the warning.
Apparently we are trying to validate ASCII strings from the records. Those strings seem to be used for display purpose only, so I think replacing it with a more precise printable ASCII test, which also does not care about char signedness, is appropriate here.
This changes the JSON fruText property to appear only with printable ASCII FRU content. As a result, all of the examples have been changed where applicable. Some sections use FRU content with a predefined format (pcie, cxlprotocol) so fruText has been completely removed from those JSON objects like in the case of non-printable ASCII FRU content.
Tested: oompile successfully
Change-Id: I98c7c10a674c8817e0b2cbe82c26f6590d8d716a Signed-off-by: Khang D Nguyen <khangng@os.amperecomputing.com>
show more ...
|
| 2d4d3b65 | 11-Mar-2025 |
Ed Tanous <ed@tanous.net> |
Fix randomizer
Relying on the system randomizer for unit tests leads to cases where we don't get deterministic results, which causes inconsistent results. These random results don't need to be secur
Fix randomizer
Relying on the system randomizer for unit tests leads to cases where we don't get deterministic results, which causes inconsistent results. These random results don't need to be secure, so reimplement as a simple linear feedback shift register[1]. This makes our unit tests now produce the same output every time we call generate.
Note, this change showed a weakness in our testing, where timestamps relied on different rules for ir->cper versus cper->ir. hour 24 should be allowed.
[1] https://en.wikipedia.org/wiki/Linear-feedback_shift_register
Change-Id: I0756b086c8ea5fb934e450f5d33e3ae0036868b3 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
| 50b966f7 | 11-Mar-2025 |
Ed Tanous <ed@tanous.net> |
Implement common logging function
When used as a library, it's desirable to be able to suppress logging, or pipe logging through a different path. This commit changes behavior such that logging is
Implement common logging function
When used as a library, it's desirable to be able to suppress logging, or pipe logging through a different path. This commit changes behavior such that logging is disabled by default, and introduces 2 new methods, cper_set_log_stdio and cper_set_log_custom.
These allow library integrators to specify their logging mode. In practice, this also allows fuzzing to run faster by not printing errors to the log.
Change-Id: I941476627bc9b8261ba5f6c0b2b2338fdf931dd2 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| ae8f6d9a | 29-Jan-2025 |
Aushim Nagarkatti <anagarkatti@nvidia.com> |
Remove validation bits
Discard invalid properties from json decode. JSON output should only contain valid properties. This saves time in preventing post processing of output for valid fields.
Ensur
Remove validation bits
Discard invalid properties from json decode. JSON output should only contain valid properties. This saves time in preventing post processing of output for valid fields.
Ensure round trip validity with validation bits removed and required properties populated.
Fix bugs in json decode.
Overhaul unit tests to use valijson. Add tests with static examples to validate against schema. Use and nlohmann for better schema validation over intrinsic libcper validation.
Example json output before: { "ValidationBits": { "LevelValid": false, "CorrectedValid": true }, "Level": 1, "Corrected": true }
After: { "Corrected": true }
Change-Id: I188bdc2827a57d938c22a431238fadfcdc939ab8 Signed-off-by: Aushim Nagarkatti <anagarkatti@nvidia.com>
show more ...
|
| a6f070bb | 04-Feb-2025 |
Aushim Nagarkatti <anagarkatti@nvidia.com> |
Fix CPER generation of ASCII properties
If FRU string and CPU brand string are not ascii, they would be generated as non UTF-8 entities, causing json parsers like nlohmann to fail.
These properties
Fix CPER generation of ASCII properties
If FRU string and CPU brand string are not ascii, they would be generated as non UTF-8 entities, causing json parsers like nlohmann to fail.
These properties are defined as ASCII in the UEFI 2.10 spec.
Change-Id: Iba8056bf9855c5bcf07e0267efe47fb17da245a7 Signed-off-by: Aushim Nagarkatti <anagarkatti@nvidia.com>
show more ...
|
| 30cd66aa | 18-Dec-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have b
clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we need to reformat the code with the latest version. A few parameters in clang-tidy have been deprecated, so adjust the style file accordingly.
See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style. See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.
Change-Id: I32c52522ee18311ac09500950f82832102ccb5c0 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| e42fb487 | 15-Oct-2024 |
Thu Nguyen <thu@os.amperecomputing.com> |
Change include style to use system includes
The libcper header files in `libcper` are installed to `usr/include/libcper`. Use that system includes in `libcper` source instead of using the project in
Change include style to use system includes
The libcper header files in `libcper` are installed to `usr/include/libcper`. Use that system includes in `libcper` source instead of using the project includes.
Change-Id: I596edc2c754dae4829844f535a1e34caa246fb43 Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
show more ...
|
| a3b7f8a2 | 04-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Unflatten edk includes
Installing the edk headers into a folder requires us to do odd things with imports, and either include headers with "..", or otherwise get the include directories lined up.
M
Unflatten edk includes
Installing the edk headers into a folder requires us to do odd things with imports, and either include headers with "..", or otherwise get the include directories lined up.
Move the contents of edk/*.c/h up a level, and just simplify the include structure. This is done to fix the immediate change of the prior patch and make this build again. Happy to discuss other options.
Change-Id: I328f20bca6d23100993493445bee0e5e11d2866a Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 04f57716 | 29-Aug-2024 |
Dung Cao <dung@os.amperecomputing.com> |
Add support for AMPERE CPERs
Support Ampere CPER entries
Change-Id: I607a89209138fa53914c55c07aba8b7d6f382e5e Signed-off-by: Dung Cao <dung@os.amperecomputing.com> |
| 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 ...
|
| 255bd81a | 06-Sep-2024 |
Karthik Rajagopalan <krajagopalan@nvidia.com> |
Use extern C guards in all headers
The project uses a mix of C and C++ requiring extern "C" guards from C++ code both within the project & from C++ apps that use libcper. That won't be required with
Use extern C guards in all headers
The project uses a mix of C and C++ requiring extern "C" guards from C++ code both within the project & from C++ apps that use libcper. That won't be required with this change.
Change-Id: I835dd05166732ca213c72eae2904815a8769599b Signed-off-by: Karthik Rajagopalan <krajagopalan@nvidia.com>
show more ...
|
| 379e492a | 28-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
Adjust strncpy sizes
When building under bitbake with the latest openbmc, we get compile warnings such as these:
``` | ../git/sections/cper-section-nvidia.c: In function 'ir_section_nvidia_to_cper'
Adjust strncpy sizes
When building under bitbake with the latest openbmc, we get compile warnings such as these:
``` | ../git/sections/cper-section-nvidia.c: In function 'ir_section_nvidia_to_cper': | ../git/sections/cper-section-nvidia.c:67:9: error: '__builtin_strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation] | 67 | strncpy(section_cper->Signature, ```
Using `strncpy` on its own is unsafe because a string too long will end up in the destination buffer without NUL termination. Adjust the strncpy to be one shorter than the buffer and force the trailing byte to be a NUL.
Repeat this pattern for all `strncpy` calls.
Change-Id: I45c630733f0138d2b089a60f698d75e1c09de9e2 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| bf68fa15 | 04-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
generator/README.md: Fix MD040 warnings
The following warnings are generated by using markdownlint analysis: ``` MD040/fenced-code-language Fenced code blocks should have a language specified [Conte
generator/README.md: Fix MD040 warnings
The following warnings are generated by using markdownlint analysis: ``` MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] ``` Refer to markdown-lint [1] to fix MD040 [1]: https://github.com/updownpress/markdown-lint/blob/master/rules/040-fenced-code-language.md
Change-Id: I172710424721f2694c8eb5efb186db1f107279ec Signed-off-by: George Liu <liuxiwei@ieisystem.com>
show more ...
|
| 683e0550 | 07-Mar-2024 |
Karthik Rajagopalan <krajagopalan@nvidia.com> |
Add support for NVIDIA CPERs
Support Nvidia CPER entries.
Change-Id: Iea9bde181ead55ad99cdb2a341501bf48e1d82a8 Signed-off-by: Ed Tanous <etanous@nvidia.com> |
| fedd457d | 12-Jul-2024 |
Ed Tanous <ed@tanous.net> |
Remove trailing whitespace
clang-format won't remove trailing whitespace if that's the only change. Fix them all.
Change-Id: Ic6e14af43cdd11905d3b58430d49b9ec1484f812 Signed-off-by: Ed Tanous <ed@t
Remove trailing whitespace
clang-format won't remove trailing whitespace if that's the only change. Fix them all.
Change-Id: Ic6e14af43cdd11905d3b58430d49b9ec1484f812 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
| b35d957e | 18-Jun-2024 |
Ed Tanous <etanous@nvidia.com> |
Enforce const correctness
Clang enforces const correctness. Apply its fixes.
Change-Id: I93f6a6dcb11844003a3691292de721e3b72b4a47 Signed-off-by: Ed Tanous <etanous@nvidia.com> |
| f8fc7052 | 03-May-2024 |
John Chung <john.chung@arm.com> |
Formatting .c/.h files and fix memory leakage issues
Signed-off-by: John Chung <john.chung@arm.com> Change-Id: Id8328f412c2724992d80c0b3f895c8f85bc4ae68 |
| 044afd01 | 03-May-2024 |
John Chung <john.chung@arm.com> |
Formatting coding style
* .json files * .md files
Signed-off-by: John Chung <john.chung@arm.com> Change-Id: I5fec2bbc1e76ae68a29eb5610f567979cc794bc8 |