History log of /openbmc/libcper/include/ (Results 1 – 25 of 32)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
043d5f4b17-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 ...

a5cc9a9203-Sep-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat with clang-21

Copy the latest format file from the docs repository and apply using
clang-format-21.

See I795e88ada8e676c242b5a18888ce9c08afdedc93 for c

clang-format: update latest spec and reformat with clang-21

Copy the latest format file from the docs repository and apply using
clang-format-21.

See I795e88ada8e676c242b5a18888ce9c08afdedc93 for clang-21 enablement.

Change-Id: I46846988a94b2362ab1cccf3817976c422d0d646
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

398899a025-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 ...

ad6c880f18-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 ...


/openbmc/libcper/cper-parse.c
/openbmc/libcper/examples/arm.cperhex
/openbmc/libcper/examples/arm.json
/openbmc/libcper/examples/ccixper.cperhex
/openbmc/libcper/examples/ccixper.json
/openbmc/libcper/examples/cxlcomponent-media.cperhex
/openbmc/libcper/examples/cxlcomponent-media.json
/openbmc/libcper/examples/cxlprotocol.cperhex
/openbmc/libcper/examples/cxlprotocol.json
/openbmc/libcper/examples/dmargeneric.cperhex
/openbmc/libcper/examples/dmargeneric.json
/openbmc/libcper/examples/dmariommu.cperhex
/openbmc/libcper/examples/dmariommu.json
/openbmc/libcper/examples/dmarvtd.cperhex
/openbmc/libcper/examples/dmarvtd.json
/openbmc/libcper/examples/firmware.cperhex
/openbmc/libcper/examples/firmware.json
/openbmc/libcper/examples/generic.cperhex
/openbmc/libcper/examples/generic.json
/openbmc/libcper/examples/ia32x64.cperhex
/openbmc/libcper/examples/ia32x64.json
/openbmc/libcper/examples/memory.cperhex
/openbmc/libcper/examples/memory.json
/openbmc/libcper/examples/memory2.cperhex
/openbmc/libcper/examples/memory2.json
/openbmc/libcper/examples/nvidia.cperhex
/openbmc/libcper/examples/nvidia.json
/openbmc/libcper/examples/nvidia_cmet_info.json
/openbmc/libcper/examples/pcibus.cperhex
/openbmc/libcper/examples/pcibus.json
/openbmc/libcper/examples/pcidev.cperhex
/openbmc/libcper/examples/pcidev.json
/openbmc/libcper/examples/pcie.json
/openbmc/libcper/examples/unknown.cperhex
/openbmc/libcper/examples/unknown.json
libcper/Cper.h
libcper/sections/cper-section-ampere.h
libcper/sections/cper-section-arm.h
libcper/sections/cper-section-ccix-per.h
libcper/sections/cper-section-cxl-component.h
libcper/sections/cper-section-cxl-protocol.h
libcper/sections/cper-section-dmar-generic.h
libcper/sections/cper-section-dmar-iommu.h
libcper/sections/cper-section-dmar-vtd.h
libcper/sections/cper-section-firmware.h
libcper/sections/cper-section-generic.h
libcper/sections/cper-section-ia32x64.h
libcper/sections/cper-section-ipf.h
libcper/sections/cper-section-memory.h
libcper/sections/cper-section-nvidia.h
libcper/sections/cper-section-pci-bus.h
libcper/sections/cper-section-pci-dev.h
libcper/sections/cper-section-pcie.h
libcper/sections/cper-section.h
/openbmc/libcper/sections/cper-section-ampere.c
/openbmc/libcper/sections/cper-section-arm.c
/openbmc/libcper/sections/cper-section-ccix-per.c
/openbmc/libcper/sections/cper-section-cxl-component.c
/openbmc/libcper/sections/cper-section-cxl-protocol.c
/openbmc/libcper/sections/cper-section-dmar-generic.c
/openbmc/libcper/sections/cper-section-dmar-iommu.c
/openbmc/libcper/sections/cper-section-dmar-vtd.c
/openbmc/libcper/sections/cper-section-firmware.c
/openbmc/libcper/sections/cper-section-generic.c
/openbmc/libcper/sections/cper-section-ia32x64.c
/openbmc/libcper/sections/cper-section-ipf.c
/openbmc/libcper/sections/cper-section-memory.c
/openbmc/libcper/sections/cper-section-nvidia.c
/openbmc/libcper/sections/cper-section-pci-bus.c
/openbmc/libcper/sections/cper-section-pci-dev.c
/openbmc/libcper/sections/cper-section-pcie.c
/openbmc/libcper/specification/json/cper-json-full-log.json
/openbmc/libcper/specification/json/cper-json-section-log.json
/openbmc/libcper/tests/ir-tests.c
/openbmc/libcper/tests/test-utils.c
eda19ff010-Jun-2025 Aushim Nagarkatti <anagarkatti@nvidia.com>

Rename PCIe properties

For CSDL compatibility property names shouldn't begin with underscores
or digits. Fix PCIe names.

Change-Id: I6a801e26550320f808a2cac2d91f8bd913a0eabf
Signed-off-by: Aushim N

Rename PCIe properties

For CSDL compatibility property names shouldn't begin with underscores
or digits. Fix PCIe names.

Change-Id: I6a801e26550320f808a2cac2d91f8bd913a0eabf
Signed-off-by: Aushim Nagarkatti <anagarkatti@nvidia.com>

show more ...

55968b1206-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>

9f260e5e24-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 ...

3e72806517-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 ...

edee0a3716-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 ...

8870c07428-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 ...


/openbmc/libcper/cper-parse.c
/openbmc/libcper/cper-utils.c
/openbmc/libcper/examples/arm.cperhex
/openbmc/libcper/examples/arm.json
/openbmc/libcper/examples/ccixper.cperhex
/openbmc/libcper/examples/ccixper.json
/openbmc/libcper/examples/cxlcomponent-media.cperhex
/openbmc/libcper/examples/cxlcomponent-media.json
/openbmc/libcper/examples/cxlprotocol.json
/openbmc/libcper/examples/dmargeneric.cperhex
/openbmc/libcper/examples/dmargeneric.json
/openbmc/libcper/examples/dmariommu.cperhex
/openbmc/libcper/examples/dmariommu.json
/openbmc/libcper/examples/dmarvtd.cperhex
/openbmc/libcper/examples/dmarvtd.json
/openbmc/libcper/examples/firmware.cperhex
/openbmc/libcper/examples/firmware.json
/openbmc/libcper/examples/generic.cperhex
/openbmc/libcper/examples/generic.json
/openbmc/libcper/examples/ia32x64.cperhex
/openbmc/libcper/examples/ia32x64.json
/openbmc/libcper/examples/memory.cperhex
/openbmc/libcper/examples/memory.json
/openbmc/libcper/examples/memory2.cperhex
/openbmc/libcper/examples/memory2.json
/openbmc/libcper/examples/nvidia.cperhex
/openbmc/libcper/examples/nvidia.json
/openbmc/libcper/examples/pcibus.cperhex
/openbmc/libcper/examples/pcibus.json
/openbmc/libcper/examples/pcidev.json
/openbmc/libcper/examples/pcie.cperhex
/openbmc/libcper/examples/pcie.json
/openbmc/libcper/examples/unknown.cperhex
/openbmc/libcper/examples/unknown.json
/openbmc/libcper/generator/cper-generate.c
/openbmc/libcper/generator/sections/gen-section-arm.c
/openbmc/libcper/generator/sections/gen-section-generic.c
/openbmc/libcper/generator/sections/gen-section-pcie.c
libcper/cper-utils.h
libcper/sections/cper-section-pcie.h
/openbmc/libcper/ir-parse.c
/openbmc/libcper/meson.build
/openbmc/libcper/sections/cper-section-arm.c
/openbmc/libcper/sections/cper-section-cxl-protocol.c
/openbmc/libcper/sections/cper-section-ia32x64.c
/openbmc/libcper/sections/cper-section-pcie.c
/openbmc/libcper/specification/json/common/cper-json-error-status.json
/openbmc/libcper/specification/json/common/cper-json-nvp.json
/openbmc/libcper/specification/json/cper-json-full-log.json
/openbmc/libcper/specification/json/cper-json-header.json
/openbmc/libcper/specification/json/cper-json-section-descriptor.json
/openbmc/libcper/specification/json/cper-json-section-log.json
/openbmc/libcper/specification/json/sections/cper-ampere.json
/openbmc/libcper/specification/json/sections/cper-arm-processor.json
/openbmc/libcper/specification/json/sections/cper-ccix-per.json
/openbmc/libcper/specification/json/sections/cper-cxl-component.json
/openbmc/libcper/specification/json/sections/cper-cxl-protocol.json
/openbmc/libcper/specification/json/sections/cper-generic-dmar.json
/openbmc/libcper/specification/json/sections/cper-generic-processor.json
/openbmc/libcper/specification/json/sections/cper-ia32x64-processor.json
/openbmc/libcper/specification/json/sections/cper-iommu-dmar.json
/openbmc/libcper/specification/json/sections/cper-memory.json
/openbmc/libcper/specification/json/sections/cper-memory2.json
/openbmc/libcper/specification/json/sections/cper-nvidia.json
/openbmc/libcper/specification/json/sections/cper-pci-bus.json
/openbmc/libcper/specification/json/sections/cper-pci-component.json
/openbmc/libcper/specification/json/sections/cper-pcie-aerInfo.json
/openbmc/libcper/specification/json/sections/cper-pcie-capabilityStructure.json
/openbmc/libcper/specification/json/sections/cper-pcie.json
/openbmc/libcper/specification/json/sections/cper-vtd-dmar.json
/openbmc/libcper/tests/fuzz_cper_buf_to_ir.cpp
/openbmc/libcper/tests/ir-tests.cpp
/openbmc/libcper/tests/meson.build
/openbmc/libcper/tests/test-utils.cpp
/openbmc/libcper/tests/test-utils.hpp
2d4d3b6511-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 ...

50b966f711-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 ...

4bdb226110-Mar-2025 Ed Tanous <etanous@nvidia.com>

Remove json schema validation

libcper is a cper parsing library. It is not a json schema validation
library. If we want to add support for this in the CLI, we should use a
relevant library. The j

Remove json schema validation

libcper is a cper parsing library. It is not a json schema validation
library. If we want to add support for this in the CLI, we should use a
relevant library. The json schema validation that's here isn't correct
to the json spec, to the point where it needed to be replaced in unit
tests. Adding internal json schema validation doesn't add value here.
It is trivial to run jsonschema as a cli app, there's not a lot of
reason to keep it here and take up the binary space.

Change-Id: I076c8eb9f81c34cdfc40525fe940e8fba0f945b3
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

1a64856910-Mar-2025 Ed Tanous <etanous@nvidia.com>

Rework guid for fuzzing

There's a lot of places we do guid comparisons against lists of known
guids. Break these out into helper functions to help not duplicate the
fuzzing logic in a lot of places

Rework guid for fuzzing

There's a lot of places we do guid comparisons against lists of known
guids. Break these out into helper functions to help not duplicate the
fuzzing logic in a lot of places, and allow us to fuzz these places
appropriately.

Change-Id: I76c79cd62ccc95feb2609d5098db546f740711e1
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

c2ebdddb09-Mar-2025 Ed Tanous <ed@tanous.net>

Fix up guid

GUIDs have some cases where they might not be representable as a string,
due to an overflow. To handle this previously, the existing
implementation just allocated extra space.

To ensur

Fix up guid

GUIDs have some cases where they might not be representable as a string,
due to an overflow. To handle this previously, the existing
implementation just allocated extra space.

To ensure that we are always publishing correct guids, break this
function down into an add_guid method that we can call anytime we add a
guid to json. This function can use the appropriate guid string length,
and if we go over, we can make sure that we don't publish the string at
all, by handling the appropriate error codes.

Change-Id: I98239b7d5ba7567cea1b016579d7566e292b6e81
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...

5e2164a009-Mar-2025 Ed Tanous <ed@tanous.net>

More range checks

This is a second patch adding more range checks where appropriate.

Change-Id: Ie169efe8924153c9cc11e4472a1b07b8d04efb3b
Signed-off-by: Ed Tanous <ed@tanous.net>

12dbd4fd08-Mar-2025 Ed Tanous <etanous@nvidia.com>

Fix range check bugs

This is a patch hunting for fuzzing failures and adding
appropriate range checks.


Change-Id: Ieae02b7e461b9a6c5e25de6c663a768f7a0d5e10
Signed-off-by: Ed Tanous <etanous@nvidia

Fix range check bugs

This is a patch hunting for fuzzing failures and adding
appropriate range checks.


Change-Id: Ieae02b7e461b9a6c5e25de6c663a768f7a0d5e10
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


/openbmc/libcper/cper-parse.c
libcper/sections/cper-section-ampere.h
libcper/sections/cper-section-arm.h
libcper/sections/cper-section-ccix-per.h
libcper/sections/cper-section-cxl-component.h
libcper/sections/cper-section-cxl-protocol.h
libcper/sections/cper-section-dmar-generic.h
libcper/sections/cper-section-dmar-iommu.h
libcper/sections/cper-section-dmar-vtd.h
libcper/sections/cper-section-firmware.h
libcper/sections/cper-section-generic.h
libcper/sections/cper-section-ia32x64.h
libcper/sections/cper-section-ipf.h
libcper/sections/cper-section-memory.h
libcper/sections/cper-section-nvidia.h
libcper/sections/cper-section-pci-bus.h
libcper/sections/cper-section-pci-dev.h
libcper/sections/cper-section-pcie.h
libcper/sections/cper-section.h
/openbmc/libcper/sections/cper-section-ampere.c
/openbmc/libcper/sections/cper-section-arm.c
/openbmc/libcper/sections/cper-section-ccix-per.c
/openbmc/libcper/sections/cper-section-cxl-component.c
/openbmc/libcper/sections/cper-section-cxl-protocol.c
/openbmc/libcper/sections/cper-section-dmar-generic.c
/openbmc/libcper/sections/cper-section-dmar-iommu.c
/openbmc/libcper/sections/cper-section-dmar-vtd.c
/openbmc/libcper/sections/cper-section-firmware.c
/openbmc/libcper/sections/cper-section-generic.c
/openbmc/libcper/sections/cper-section-ia32x64.c
/openbmc/libcper/sections/cper-section-ipf.c
/openbmc/libcper/sections/cper-section-memory.c
/openbmc/libcper/sections/cper-section-nvidia.c
/openbmc/libcper/sections/cper-section-pci-bus.c
/openbmc/libcper/sections/cper-section-pci-dev.c
/openbmc/libcper/sections/cper-section-pcie.c
8121f7e906-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 ...

596c59e910-Mar-2025 Ed Tanous <etanous@nvidia.com>

Fix timestamp handling

timestamp_to_string can fail in unexpected ways. It attempts to do some
level of error checks, but doesn't return the result of those back to
the caller, which means that thi

Fix timestamp handling

timestamp_to_string can fail in unexpected ways. It attempts to do some
level of error checks, but doesn't return the result of those back to
the caller, which means that this can possibly read from unpopulated
memory.

Adjust the prototype and fix the issues in this helper function.

Change-Id: I9df2dc17142b1fd3a686fd852ac80f4691fd25be
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

73498f6605-Mar-2025 Ed Tanous <etanous@nvidia.com>

Invert buffer modes

Currently the libcper core operates on FILE objects, with a number of
seeks. Change this such that the internals rely on buffers and lengths
instead. This ensures that we are c

Invert buffer modes

Currently the libcper core operates on FILE objects, with a number of
seeks. Change this such that the internals rely on buffers and lengths
instead. This ensures that we are checking records lengths in a given
CPER header against ranged limits.

Change-Id: Id16902afbf53f091058c3206a473ddd725ec4bf1
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

5aedbb2605-Mar-2025 Ed Tanous <etanous@nvidia.com>

Make all section reads const

The way sections are read currently is unsafe in two ways, first,
buffers are completely unchecked for length, and section, buffers are
passed in as non-const void*.

St

Make all section reads const

The way sections are read currently is unsafe in two ways, first,
buffers are completely unchecked for length, and section, buffers are
passed in as non-const void*.

Start fixing things by making the sections const.

Change-Id: I02e9ded525e9710b56589a47a9cc4f3583c216df
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


/openbmc/libcper/examples/arm.cperhex
/openbmc/libcper/examples/ccixper.cperhex
/openbmc/libcper/examples/cxlcomponent-media.cperhex
/openbmc/libcper/examples/cxlprotocol.cperhex
/openbmc/libcper/examples/dmargeneric.cperhex
/openbmc/libcper/examples/dmariommu.cperhex
/openbmc/libcper/examples/dmarvtd.cperhex
/openbmc/libcper/examples/firmware.cperhex
/openbmc/libcper/examples/generic.cperhex
/openbmc/libcper/examples/ia32x64.cperhex
/openbmc/libcper/examples/memory.cperhex
/openbmc/libcper/examples/memory2.cperhex
/openbmc/libcper/examples/nvidia.cperhex
/openbmc/libcper/examples/pcibus.cperhex
/openbmc/libcper/examples/pcidev.cperhex
/openbmc/libcper/examples/pcie.cperhex
/openbmc/libcper/examples/unknown.cperhex
libcper/sections/cper-section-ampere.h
libcper/sections/cper-section-arm.h
libcper/sections/cper-section-ccix-per.h
libcper/sections/cper-section-cxl-component.h
libcper/sections/cper-section-cxl-protocol.h
libcper/sections/cper-section-dmar-generic.h
libcper/sections/cper-section-dmar-iommu.h
libcper/sections/cper-section-dmar-vtd.h
libcper/sections/cper-section-firmware.h
libcper/sections/cper-section-generic.h
libcper/sections/cper-section-ia32x64.h
libcper/sections/cper-section-ipf.h
libcper/sections/cper-section-memory.h
libcper/sections/cper-section-nvidia.h
libcper/sections/cper-section-pci-bus.h
libcper/sections/cper-section-pci-dev.h
libcper/sections/cper-section-pcie.h
libcper/sections/cper-section.h
/openbmc/libcper/sections/cper-section-ampere.c
/openbmc/libcper/sections/cper-section-arm.c
/openbmc/libcper/sections/cper-section-ccix-per.c
/openbmc/libcper/sections/cper-section-cxl-component.c
/openbmc/libcper/sections/cper-section-cxl-protocol.c
/openbmc/libcper/sections/cper-section-dmar-generic.c
/openbmc/libcper/sections/cper-section-dmar-iommu.c
/openbmc/libcper/sections/cper-section-dmar-vtd.c
/openbmc/libcper/sections/cper-section-firmware.c
/openbmc/libcper/sections/cper-section-generic.c
/openbmc/libcper/sections/cper-section-ia32x64.c
/openbmc/libcper/sections/cper-section-ipf.c
/openbmc/libcper/sections/cper-section-memory.c
/openbmc/libcper/sections/cper-section-nvidia.c
/openbmc/libcper/sections/cper-section-pci-bus.c
/openbmc/libcper/sections/cper-section-pci-dev.c
/openbmc/libcper/sections/cper-section-pcie.c
/openbmc/libcper/tests/ir-tests.cpp
8d47a37f05-Mar-2025 Ed Tanous <etanous@nvidia.com>

Add buffer based decoders

libcper currently supports an API that reads from a FILE* type. This
is fine for some use cases, but in the majority of use cases where we're
embedding, libcper would pref

Add buffer based decoders

libcper currently supports an API that reads from a FILE* type. This
is fine for some use cases, but in the majority of use cases where we're
embedding, libcper would prefer to not be opinionated about how a file
came to be.

This patchset adds two new public methods, cper_buf_to_ir and
cper_buf_single_section_to_ir, which function like the existing non _buf
versions of these.

As a stepping stone, these are implemented as a fmemopen to get a FILE*
object to be passed to the underlying functions. This allows us in a
future commit to start removing the FILE* interfaces internally and pass
the buffer directly throughout libcper.

Change-Id: I9fb7ab46b8ba7bfef7bd71ec37f2b55054b09d72
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

ae8f6d9a29-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 ...


/openbmc/libcper/cper-parse.c
/openbmc/libcper/cper-utils.c
/openbmc/libcper/examples/arm.cper
/openbmc/libcper/examples/arm.json
/openbmc/libcper/examples/ccixper.cper
/openbmc/libcper/examples/ccixper.json
/openbmc/libcper/examples/cxlcomponent-media.cper
/openbmc/libcper/examples/cxlcomponent-media.json
/openbmc/libcper/examples/cxlprotocol.cper
/openbmc/libcper/examples/cxlprotocol.json
/openbmc/libcper/examples/dmargeneric.cper
/openbmc/libcper/examples/dmargeneric.json
/openbmc/libcper/examples/dmariommu.cper
/openbmc/libcper/examples/dmariommu.json
/openbmc/libcper/examples/dmarvtd.cper
/openbmc/libcper/examples/dmarvtd.json
/openbmc/libcper/examples/firmware.cper
/openbmc/libcper/examples/firmware.json
/openbmc/libcper/examples/generic.cper
/openbmc/libcper/examples/generic.json
/openbmc/libcper/examples/ia32x64.cper
/openbmc/libcper/examples/ia32x64.json
/openbmc/libcper/examples/memory.cper
/openbmc/libcper/examples/memory.json
/openbmc/libcper/examples/memory2.cper
/openbmc/libcper/examples/memory2.json
/openbmc/libcper/examples/nvidia.cper
/openbmc/libcper/examples/nvidia.json
/openbmc/libcper/examples/pcibus.cper
/openbmc/libcper/examples/pcibus.json
/openbmc/libcper/examples/pcidev.cper
/openbmc/libcper/examples/pcidev.json
/openbmc/libcper/examples/pcie.cper
/openbmc/libcper/examples/pcie.json
/openbmc/libcper/examples/unknown.cper
/openbmc/libcper/examples/unknown.json
/openbmc/libcper/generator/cper-generate-cli.c
/openbmc/libcper/generator/cper-generate.c
/openbmc/libcper/generator/gen-utils.c
/openbmc/libcper/generator/sections/gen-section-ampere.c
/openbmc/libcper/generator/sections/gen-section-arm.c
/openbmc/libcper/generator/sections/gen-section-ccix-per.c
/openbmc/libcper/generator/sections/gen-section-cxl-component.c
/openbmc/libcper/generator/sections/gen-section-cxl-protocol.c
/openbmc/libcper/generator/sections/gen-section-dmar.c
/openbmc/libcper/generator/sections/gen-section-firmware.c
/openbmc/libcper/generator/sections/gen-section-generic.c
/openbmc/libcper/generator/sections/gen-section-ia32x64.c
/openbmc/libcper/generator/sections/gen-section-memory.c
/openbmc/libcper/generator/sections/gen-section-nvidia.c
/openbmc/libcper/generator/sections/gen-section-pci-bus.c
/openbmc/libcper/generator/sections/gen-section-pci-dev.c
/openbmc/libcper/generator/sections/gen-section-pcie.c
libcper/Cper.h
libcper/cper-utils.h
libcper/generator/cper-generate.h
libcper/generator/sections/gen-section.h
/openbmc/libcper/ir-parse.c
/openbmc/libcper/meson.build
/openbmc/libcper/sections/cper-section-arm.c
/openbmc/libcper/sections/cper-section-ccix-per.c
/openbmc/libcper/sections/cper-section-cxl-component.c
/openbmc/libcper/sections/cper-section-cxl-protocol.c
/openbmc/libcper/sections/cper-section-generic.c
/openbmc/libcper/sections/cper-section-ia32x64.c
/openbmc/libcper/sections/cper-section-memory.c
/openbmc/libcper/sections/cper-section-pci-bus.c
/openbmc/libcper/sections/cper-section-pci-dev.c
/openbmc/libcper/sections/cper-section-pcie.c
/openbmc/libcper/specification/json/cper-json-header.json
/openbmc/libcper/specification/json/cper-json-section-descriptor.json
/openbmc/libcper/specification/json/sections/cper-arm-processor.json
/openbmc/libcper/specification/json/sections/cper-ccix-per.json
/openbmc/libcper/specification/json/sections/cper-cxl-component.json
/openbmc/libcper/specification/json/sections/cper-cxl-protocol.json
/openbmc/libcper/specification/json/sections/cper-generic-processor.json
/openbmc/libcper/specification/json/sections/cper-ia32x64-processor.json
/openbmc/libcper/specification/json/sections/cper-memory.json
/openbmc/libcper/specification/json/sections/cper-memory2.json
/openbmc/libcper/specification/json/sections/cper-pci-bus.json
/openbmc/libcper/specification/json/sections/cper-pci-component.json
/openbmc/libcper/specification/json/sections/cper-pcie.json
/openbmc/libcper/tests/ir-tests.cpp
/openbmc/libcper/tests/meson.build
/openbmc/libcper/tests/test-utils.cpp
/openbmc/libcper/tests/test-utils.hpp
1b92309713-Dec-2024 Milton D. Miller II <mdmii@outlook.com>

Change bits to digits in comment

The string holds hex digits each representing 4 bits for total space for
64 bits on the prior line.

Change-Id: I31be090682d96c6c4cb178b99d7c0f43f8afafc4
Signed-off-

Change bits to digits in comment

The string holds hex digits each representing 4 bits for total space for
64 bits on the prior line.

Change-Id: I31be090682d96c6c4cb178b99d7c0f43f8afafc4
Signed-off-by: Milton Miller <mdmii@outlook.com>

show more ...

c97c041e04-Feb-2025 Ed Tanous <etanous@nvidia.com>

Apply tidy updates

Change-Id: I8ae5fd206723c8657547ee1edd0d2c4cc6940824
Signed-off-by: Ed Tanous <etanous@nvidia.com>

12