History log of /openbmc/libpldm/tools/ (Results 1 – 4 of 4)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
72442dea12-Aug-2025 Andrew Jeffery <andrew@codeconstruct.com.au>

dsp: firmware_update: Flags for decode_pldm_firmware_update_package()

Allow influencing the parser behavior down the track.

Change-Id: If63284f5c67b7a8e40d5b3176f5b8367038eb98e
Signed-off-by: Andre

dsp: firmware_update: Flags for decode_pldm_firmware_update_package()

Allow influencing the parser behavior down the track.

Change-Id: If63284f5c67b7a8e40d5b3176f5b8367038eb98e
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

c53c6fe911-Aug-2025 Andrew Jeffery <andrew@codeconstruct.com.au>

dsp: firmware_update: Run-time state machine for package parsing

Encoding the necessary sequence of calls with an approximation of linear
types is hampered by DSP0267's introduction of entirely new

dsp: firmware_update: Run-time state machine for package parsing

Encoding the necessary sequence of calls with an approximation of linear
types is hampered by DSP0267's introduction of entirely new sections
into the package format across revisions. The existing design enforced a
sequence that precluded _not_ calling the decoder for downstream device
records in the case of pinning to format revision 1. The choice had the
further effect of stunting the API to future expansion of the spec.

Switch from linear types to tracking parse state at runtime based on the
provided pin and the extracted package header.

The state machine implementation is modeled on the TLA+ specification
below, with NR_FORMATS set to 4 in the model:

```tla
---- MODULE pldm_package_parser ----
EXTENDS Integers, Sequences

\* pin and format have non-deterministic init, but are then constant
VARIABLE state, pin, format

vars == << state, pin, format >>

States == {
"Init",
"Header",
"FirmwareDevices",
"DownstreamDevices",
"ComponentImageInfos",
"Complete",
"Unsupported",
"Error"
}

Formats == 1..4

DecodeHeader ==
/\ state = "Init"
/\ state' = IF format <= pin THEN "Header" ELSE "Unsupported"
/\ UNCHANGED << pin, format >>

DecodeFirmwareDevices ==
/\ state = "Header"
/\ state' = "FirmwareDevices"
/\ UNCHANGED << pin, format >>

DecodeDownstreamDevices ==
/\ state = "FirmwareDevices"
/\ state' = IF pin = 1 THEN "Error" ELSE "DownstreamDevices"
/\ UNCHANGED << pin, format >>

DecodeComponentImageInfos ==
/\ \/ /\ state = "FirmwareDevices"
/\ pin = 1
\/ /\ state = "DownstreamDevices"
/\ pin \in ( Formats \ { 1 } )
/\ state' = "Complete"
/\ UNCHANGED << pin, format >>

Done == state \in { "Complete", "Unsupported", "Error" } /\ UNCHANGED vars

Init ==
/\ state = "Init"
/\ pin \in Formats
/\ format \in Formats

Next ==
\/ DecodeHeader
\/ DecodeFirmwareDevices
\/ DecodeDownstreamDevices
\/ DecodeComponentImageInfos
\/ Done

Spec == Init /\ [][Next]_vars /\ WF_state(Next)

TypeInvariant ==
/\ state \in States
/\ pin \in Formats
/\ format \in Formats

Safety ==
/\ TypeInvariant
/\ state \in States \ { "Init", "Unsupported" } => format <= pin

Liveness ==
/\ [][(state \in { "Complete", "Unsupported", "Error" } => UNCHANGED state)]_vars
/\ [][UNCHANGED <<pin, format>>]_vars

====
```

For an introduction to TLA+ see https://www.learntla.com/

Note that the implemented state machine does not exactly replicate that
specified in the model. Specifically:

- No "Unsupported" state is defined. Instead, the APIs return -ENOTSUP
- No "Error" state is defined. Instead, the APIs return -EPROTO

It is expected that callers perform appropriate error handling.

Change-Id: Id8780c1f5f130b77e6eea2519b5d5734aa79040e
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...

c127a01220-Jun-2025 Matt Johnston <matt@codeconstruct.com.au>

tools: Make pd-tool build optional

pd-tool is only for posix-like systems, let it be disabled for other
platforms.

Change-Id: Idaa1b07882ff1c8143f6c71209240793f6e7f802
Signed-off-by: Matt Johnston

tools: Make pd-tool build optional

pd-tool is only for posix-like systems, let it be disabled for other
platforms.

Change-Id: Idaa1b07882ff1c8143f6c71209240793f6e7f802
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

f363bdab12-Mar-2025 Andrew Jeffery <andrew@codeconstruct.com.au>

tools: Add pd, a test tool for libpldm

As per the comment in the implementation:

> `grep 'p.*l.*d.*m' /usr/share/dict/words` found 'palladium', which has
> element symbol Pd.

Change-Id: Idbfb15e33

tools: Add pd, a test tool for libpldm

As per the comment in the implementation:

> `grep 'p.*l.*d.*m' /usr/share/dict/words` found 'palladium', which has
> element symbol Pd.

Change-Id: Idbfb15e3382cccb0fde48dc2d5ee8de14fc30816
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>

show more ...


/openbmc/libpldm/.clang-format
/openbmc/libpldm/.clang-tidy
/openbmc/libpldm/CHANGELOG.md
/openbmc/libpldm/Doxyfile.in
/openbmc/libpldm/LICENSE
/openbmc/libpldm/OWNERS
/openbmc/libpldm/README.md
/openbmc/libpldm/abi/x86_64/gcc.dump
/openbmc/libpldm/docs/checklists/changes.md
/openbmc/libpldm/docs/checklists/releases.md
/openbmc/libpldm/docs/fuzzing.md
/openbmc/libpldm/docs/oem/meta/file-io.md
/openbmc/libpldm/evolutions/current/crc32.yaml
/openbmc/libpldm/evolutions/current/crc8.yaml
/openbmc/libpldm/evolutions/v0.9.1/get_fru_record_by_option_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/oem-ibm-header-compat.cocci
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_append_pad_checksum_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_attr_entry_enum_decode_def_num_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_attr_entry_enum_decode_pv_hdls_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_attr_entry_enum_decode_pv_num_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_attr_entry_enum_encode_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_attr_entry_integer_encode_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_attr_entry_string_decode_def_string_length_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_attr_entry_string_encode_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_attr_value_entry_encode_enum_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_attr_value_entry_encode_integer_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_attr_value_entry_encode_string_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_string_entry_decode_string_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_bios_table_string_entry_encode_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_entity_association_pdr_add_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_entity_association_pdr_add_from_node_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_pdr_add_check.yaml
/openbmc/libpldm/evolutions/v0.9.1/pldm_pdr_add_fru_record_set_check.yaml
/openbmc/libpldm/include/libpldm/api.h
/openbmc/libpldm/include/libpldm/base.h
/openbmc/libpldm/include/libpldm/bios.h
/openbmc/libpldm/include/libpldm/bios_table.h
/openbmc/libpldm/include/libpldm/compiler.h
/openbmc/libpldm/include/libpldm/control.h
/openbmc/libpldm/include/libpldm/entity.h
/openbmc/libpldm/include/libpldm/file.h
/openbmc/libpldm/include/libpldm/firmware_fd.h
/openbmc/libpldm/include/libpldm/firmware_update.h
/openbmc/libpldm/include/libpldm/fru.h
/openbmc/libpldm/include/libpldm/instance-id.h
/openbmc/libpldm/include/libpldm/meson.build
/openbmc/libpldm/include/libpldm/oem/ibm/entity.h
/openbmc/libpldm/include/libpldm/oem/ibm/file_io.h
/openbmc/libpldm/include/libpldm/oem/ibm/fru.h
/openbmc/libpldm/include/libpldm/oem/ibm/host.h
/openbmc/libpldm/include/libpldm/oem/ibm/platform.h
/openbmc/libpldm/include/libpldm/oem/ibm/state_set.h
/openbmc/libpldm/include/libpldm/oem/meta/file_io.h
/openbmc/libpldm/include/libpldm/pdr.h
/openbmc/libpldm/include/libpldm/platform.h
/openbmc/libpldm/include/libpldm/pldm.h
/openbmc/libpldm/include/libpldm/pldm_types.h
/openbmc/libpldm/include/libpldm/sizes.h.in
/openbmc/libpldm/include/libpldm/state_set.h
/openbmc/libpldm/include/libpldm/states.h
/openbmc/libpldm/include/libpldm/transport.h
/openbmc/libpldm/include/libpldm/transport/af-mctp.h
/openbmc/libpldm/include/libpldm/transport/mctp-demux.h
/openbmc/libpldm/include/libpldm/utils.h
/openbmc/libpldm/include/meson.build
/openbmc/libpldm/instance-db/default
/openbmc/libpldm/meson.build
/openbmc/libpldm/meson.options
/openbmc/libpldm/scripts/abi-dump-formatter
/openbmc/libpldm/scripts/abi-dump-updater
/openbmc/libpldm/scripts/apply-renames
/openbmc/libpldm/scripts/changelog.awk
/openbmc/libpldm/scripts/pre-submit
/openbmc/libpldm/scripts/run-ci
/openbmc/libpldm/src/api.h
/openbmc/libpldm/src/array.h
/openbmc/libpldm/src/compiler.h
/openbmc/libpldm/src/control-internal.h
/openbmc/libpldm/src/control.c
/openbmc/libpldm/src/dsp/base.c
/openbmc/libpldm/src/dsp/base.h
/openbmc/libpldm/src/dsp/bios.c
/openbmc/libpldm/src/dsp/bios_table.c
/openbmc/libpldm/src/dsp/file.c
/openbmc/libpldm/src/dsp/firmware_update.c
/openbmc/libpldm/src/dsp/fru.c
/openbmc/libpldm/src/dsp/meson.build
/openbmc/libpldm/src/dsp/pdr.c
/openbmc/libpldm/src/dsp/platform.c
/openbmc/libpldm/src/firmware_device/fd-internal.h
/openbmc/libpldm/src/firmware_device/fd.c
/openbmc/libpldm/src/firmware_device/meson.build
/openbmc/libpldm/src/mctp-defines.h
/openbmc/libpldm/src/meson.build
/openbmc/libpldm/src/msgbuf.h
/openbmc/libpldm/src/msgbuf/platform.h
/openbmc/libpldm/src/oem/ibm/file_io.c
/openbmc/libpldm/src/oem/ibm/host.c
/openbmc/libpldm/src/oem/ibm/meson.build
/openbmc/libpldm/src/oem/ibm/platform.c
/openbmc/libpldm/src/oem/meta/file_io.c
/openbmc/libpldm/src/oem/meta/meson.build
/openbmc/libpldm/src/requester/instance-id.c
/openbmc/libpldm/src/requester/meson.build
/openbmc/libpldm/src/responder.c
/openbmc/libpldm/src/responder.h
/openbmc/libpldm/src/transport/af-mctp.c
/openbmc/libpldm/src/transport/container-of.h
/openbmc/libpldm/src/transport/mctp-demux.c
/openbmc/libpldm/src/transport/meson.build
/openbmc/libpldm/src/transport/socket.c
/openbmc/libpldm/src/transport/socket.h
/openbmc/libpldm/src/transport/test.c
/openbmc/libpldm/src/transport/test.h
/openbmc/libpldm/src/transport/transport.c
/openbmc/libpldm/src/transport/transport.h
/openbmc/libpldm/src/utils.c
/openbmc/libpldm/subprojects/googletest.wrap
/openbmc/libpldm/tests/.clang-format
/openbmc/libpldm/tests/data/test.hex
/openbmc/libpldm/tests/dsp/base.cpp
/openbmc/libpldm/tests/dsp/bios.cpp
/openbmc/libpldm/tests/dsp/bios_table.cpp
/openbmc/libpldm/tests/dsp/bios_table_iter.c
/openbmc/libpldm/tests/dsp/file.cpp
/openbmc/libpldm/tests/dsp/firmware_update.cpp
/openbmc/libpldm/tests/dsp/fru.cpp
/openbmc/libpldm/tests/dsp/meson.build
/openbmc/libpldm/tests/dsp/pdr.cpp
/openbmc/libpldm/tests/dsp/platform.cpp
/openbmc/libpldm/tests/fuzz/fd-fuzz-input1.dat
/openbmc/libpldm/tests/fuzz/fd-fuzz.cpp
/openbmc/libpldm/tests/fuzz/fd.dict
/openbmc/libpldm/tests/fuzz/fuzz-build.py
/openbmc/libpldm/tests/fuzz/fuzz-coverage.py
/openbmc/libpldm/tests/fuzz/meson.build
/openbmc/libpldm/tests/instance-id.cpp
/openbmc/libpldm/tests/meson.build
/openbmc/libpldm/tests/msgbuf.cpp
/openbmc/libpldm/tests/msgbuf_generic.c
/openbmc/libpldm/tests/oem/ibm/fileio.cpp
/openbmc/libpldm/tests/oem/ibm/host.cpp
/openbmc/libpldm/tests/oem/ibm/meson.build
/openbmc/libpldm/tests/oem/meta/fileio.cpp
/openbmc/libpldm/tests/oem/meta/meson.build
/openbmc/libpldm/tests/responder.cpp
/openbmc/libpldm/tests/transport/meson.build
/openbmc/libpldm/tests/transport/send_recv_one.cpp
/openbmc/libpldm/tests/transport/send_recv_timeout.cpp
/openbmc/libpldm/tests/transport/send_recv_unwanted.cpp
/openbmc/libpldm/tests/transport/send_recv_wrong_command_code.cpp
/openbmc/libpldm/tests/transport/send_recv_wrong_pldm_type.cpp
/openbmc/libpldm/tests/transport/transport.cpp
/openbmc/libpldm/tests/utils.cpp
meson.build
pd.c