| da75128c | 28-Jul-2025 |
Peter Benitez <pbenitez@nvidia.com> |
cper-section-memory: Fix validation dependency for Extended field bits
Fixed incorrect dependency between validation bits 16, 17, and 18 for the Extended field. Previously, cardSmbiosHandle (validat
cper-section-memory: Fix validation dependency for Extended field bits
Fixed incorrect dependency between validation bits 16, 17, and 18 for the Extended field. Previously, cardSmbiosHandle (validation bit 16) and moduleSmbiosHandle (validation bit 17) were incorrectly made dependent on the Extended field validation (bit 18), but these are independent components.
Validation bit 18 controls the Extended field containing row address bits 16 and 17, while validation bits 16 and 17 control SMBIOS handle fields. These SMBIOS handle fields are independent components that should be validated separately from the Extended field's row address bits.
Tested: Added memory-validation-bits unit test
Change-Id: I9461c71bf0b782bda74ed24c95b63c080f913b19 Signed-off-by: Peter Benitez <pbenitez@nvidia.com>
show more ...
|
| fa6c53ae | 28-Jul-2025 |
John Chung <john.chung@arm.com> |
Fix parsing single section CPER error
Single section CPER logs do not contain a Record Header. The check for a valid header is now performed only if the content includes a Record Header. Additionall
Fix parsing single section CPER error
Single section CPER logs do not contain a Record Header. The check for a valid header is now performed only if the content includes a Record Header. Additionally, this update fixes an issue with the size calculation for single-section logs.
Tested : $> ./cper-generate --out single-cper.file --single-section firmware $> ./cper-convert to-json-section single-cper.file
Change-Id: Id7efec20df3e5b53c6f90330e0770c1f682a8d87 Signed-off-by: John Chung <john.chung@arm.com>
show more ...
|
| a11dbaba | 25-Jul-2025 |
Ed Tanous <etanous@nvidia.com> |
Build jsondac with lower warning levels
json-c uses some macros that result in warnings that get thrown in jsondacor. We don't really care about warnings in the test library, so set the warning lev
Build jsondac with lower warning levels
json-c uses some macros that result in warnings that get thrown in jsondacor. We don't really care about warnings in the test library, so set the warning level to 2.
Change-Id: I9bcb828d2545b51488f17a8545898c98d1164d09 Signed-off-by: Ed Tanous <etanous@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 ...
|
| ad6c880f | 18-Jun-2025 |
Aushim Nagarkatti <anagarkatti@nvidia.com> |
Support to stringify CPER output
Initial commit to add a "message" property that provides a single line description of some important properties. This makes it easier to parse multiple CPERs in crow
Support to stringify CPER output
Initial commit to add a "message" property that provides a single line description of some important properties. This makes it easier to parse multiple CPERs in crowded logs.
For now, "message" is supported for nvidia, arm processor and memory types. The other types contain generic messages.
Example output:
``` "sections":[ { "message":"A Corrected CCPLEXSCF NVIDIA Error occurred on CPU 0", "Nvidia":{ "signature":"CCPLEXSC",
"sections":[ { "message":"An ARM Processor Error occurred on CPU 0; Error Type(s): {Cache Error at Virtual Addr=0x41D6AA12D528 Physical Addr=0x80003A198DDA10}", "ArmProcessor":{ "errorInfoNum":1,
"sections":[ { "message":"A Multi-bit ECC Memory Error occurred at address 0x0000000080000000 at node 0", ```
Change-Id: I395d0370ec60579b8f7fede825b45a3ced8ff18f Signed-off-by: Aushim Nagarkatti <anagarkatti@nvidia.com>
show more ...
|
| c1e38a1a | 26-Jun-2025 |
Aushim Nagarkatti <anagarkatti@nvidia.com> |
Fix ir-test example generation
The hex output file storing examples was being closed multiple times due to an error.
To repro without this patch, set GEN_EXAMPLES=1 and rerun ir-tests
Error: free(
Fix ir-test example generation
The hex output file storing examples was being closed multiple times due to an error.
To repro without this patch, set GEN_EXAMPLES=1 and rerun ir-tests
Error: free(): double free detected in tcache 2 Aborted (core dumped)
Change-Id: I977d693a185ee31ab6387fbdf2abbd115d106ea3 Signed-off-by: Aushim Nagarkatti <anagarkatti@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> |
| 9f260e5e | 24-Apr-2025 |
Ed Tanous <etanous@nvidia.com> |
Add decode of pcie device class
This commit makes two major changes. First, the device class tables were being decoded incorrectly as LSB-first. This changes them to MSB-first.
Second, once this v
Add decode of pcie device class
This commit makes two major changes. First, the device class tables were being decoded incorrectly as LSB-first. This changes them to MSB-first.
Second, once this value is correct decode the tables to a string name making it much easier for users to identify a specific device that caused a PCIe error.
Note: The majority of the mode lookup table was created by LLM. The entries have been manually reviewed for correctness and completeness.
Change-Id: I61bc813dbab39ca6116046e302dafca9fbbb0893 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 3e728065 | 17-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Allow parsing base64 files
Redfish outputs base64 strings. It would be useful if the CLI app could read those strings in directly.
This commit breaks out a new method "header_valid" to allow tooli
Allow parsing base64 files
Redfish outputs base64 strings. It would be useful if the CLI app could read those strings in directly.
This commit breaks out a new method "header_valid" to allow tooling to do an initial reading of a buffer to determine if it appears to be correct before going further. This allows the CLI app to attempt to parse as a buffer, if that fails, attempt to parse as base64.
To support as many inputs as possible, this commit makes padding optional. It also allows a trailing \n as is present in many files.
Change-Id: I4fb759ecefc8ce1c757f1a9e7c4a2b2d220105d0 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 54640298 | 17-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Remove gtest
It would be useful to be able to run libcper decoding unit tests without needing a C compiler, as would be required if this were compiled to a python module.
Change-Id: I183bc9ef048c33
Remove gtest
It would be useful to be able to run libcper decoding unit tests without needing a C compiler, as would be required if this were compiled to a python module.
Change-Id: I183bc9ef048c336205186ea449e15b7766b19990 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| edee0a37 | 16-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Use less c++
As a design, it would be better if we didn't need to have a dependency on c++ in a c library. Moving things to C will reduce both dependencies and compile times.
Reduced dependencies
Use less c++
As a design, it would be better if we didn't need to have a dependency on c++ in a c library. Moving things to C will reduce both dependencies and compile times.
Reduced dependencies makes the library itself easier to use in more environments.
libmctp Is a library that doesn't take a dependency on gtest for its tests libpldm Is an example that does take a dependency on gtest.
Change-Id: If1dc638f87b75b28181a0baf67f5a18d389cff81 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| a3663051 | 16-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Json daccor
json daccor is a json-schema validation library that accepts json-c objects as input, and seems to be designed for openwrt, a system with very similar requirements to BMCs.
Using this l
Json daccor
json daccor is a json-schema validation library that accepts json-c objects as input, and seems to be designed for openwrt, a system with very similar requirements to BMCs.
Using this library has several motivations. First, it keeps libcper as a C application so integrations aren't required to provide a c++ toolchain to be able to run unit tests. Next, it means that we avoid an "expensive" conversion in unit tests from json-c -> nlohmann just so we can use a third library, valijson In terms of dependency count, it drops one dependency. (nlohmann+valijson) to (json daccor) Finally, it means that in the future versions of the library, we can allow json-schema verification as an option in the library itself, which would allow us to give a CLI option for verifying schema on any arbitrary output (helping in debugging).
Testing to see if it will work and what improvements it makes
Change-Id: I1c00bf2ef9b898b2e5decd90b749c784fb4de109 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 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 ...
|
| 2c4d7b6d | 16-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Remove required field
At some point our examples picked up this change. Minimize the list of hacks.
Change-Id: I0d87899c3a7f7b4ca1f88be1e905c3f546dce18d |
| d6b62637 | 14-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Fix some json schema validation bugs
There were a couple of places where we would add null objects when they were not allowed. Fix them.
Change-Id: I7c4c12ea1fa2913014e79603995267a9e560e288 Signed
Fix some json schema validation bugs
There were a couple of places where we would add null objects when they were not allowed. Fix them.
Change-Id: I7c4c12ea1fa2913014e79603995267a9e560e288 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 7a531ff4 | 14-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Add additionalProperties=false
Change-Id: Iaec16b61ae8ec24c2013a310bf6a8d3a10e1f571 Signed-off-by: Ed Tanous <etanous@nvidia.com> |
| 6070e1b8 | 14-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Remove fuzzer for osx
Against all odds, all of this code compiles on osx.... except fuzzing. Disable fuzzing temporarily if we're on darwin, given there's some subtleties around detecting whether or
Remove fuzzer for osx
Against all odds, all of this code compiles on osx.... except fuzzing. Disable fuzzing temporarily if we're on darwin, given there's some subtleties around detecting whether or not fuzzing is allowed.
[1] https://stackoverflow.com/questions/76115746/libclang-rt-fuzzer-osx-a-is-not-found-on-macos
Change-Id: I4ec0ee76c703cbe1cb0a1cda5da3565d02d457d9 Signed-off-by: Ed Tanous <etanous@nvidia.com>
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 ...
|
| badae112 | 10-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Simplify string concat code
We don't need iterators here to do a simple concat. Change to a range based loop.
Change-Id: I7d4e785363fe41937f18ae1ba0e927a970d939b6 Signed-off-by: Ed Tanous <etanous
Simplify string concat code
We don't need iterators here to do a simple concat. Change to a range based loop.
Change-Id: I7d4e785363fe41937f18ae1ba0e927a970d939b6 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 8121f7e9 | 06-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Add fuzz targets
Fuzzing is something that's good to do for a general purpose library and can find bugs relatively quickly.
Enable fuzzing with libfuzzer (selected only because it was the easiest t
Add fuzz targets
Fuzzing is something that's good to do for a general purpose library and can find bugs relatively quickly.
Enable fuzzing with libfuzzer (selected only because it was the easiest to set up) and enable fuzz targets for 3 of our buffer-based interfaces.
Change-Id: I695a3a60ba09bea92cd462566bf2c46337eabd4b Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| a2dce4bc | 05-Mar-2025 |
Ed Tanous <etanous@nvidia.com> |
Convert files to hex
It was pointed out in code review these files would be easier to review diffs on if they were in hex format on disk. This commit converts all the existing files to "cperhex" wh
Convert files to hex
It was pointed out in code review these files would be easier to review diffs on if they were in hex format on disk. This commit converts all the existing files to "cperhex" which is cper in hex hexadecimal format using the command 'xxd -p -l 64'
Change-Id: I5e762ec27a02b3d918b926a966074da8178d73b8 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 517282ff | 03-Mar-2025 |
Aushim Nagarkatti <anagarkatti@nvidia.com> |
Fix required properties in schemas
With invalid properties not showing up in the output, they are not required in the schema anymore.
Note: UTs test with all properties enabled in the cper-generato
Fix required properties in schemas
With invalid properties not showing up in the output, they are not required in the schema anymore.
Note: UTs test with all properties enabled in the cper-generator.
Tested by running example cpers against schemas
Change-Id: I54dcda2ae00587e4a7d59e0365eb41ac1669ba46 Signed-off-by: Aushim Nagarkatti <anagarkatti@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 ...
|
| c97c041e | 04-Feb-2025 |
Ed Tanous <etanous@nvidia.com> |
Apply tidy updates
Change-Id: I8ae5fd206723c8657547ee1edd0d2c4cc6940824 Signed-off-by: Ed Tanous <etanous@nvidia.com> |
| 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 ...
|