18b9a37b | 22-Nov-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
core: Drop packets with broadcast source EID
That has no valid use case, so should be disallowed to avoid unforeseen problems.
Change-Id: I514e5d910fb3b92606aae86aee282a97e6166a15 Signed-off-by: Ma
core: Drop packets with broadcast source EID
That has no valid use case, so should be disallowed to avoid unforeseen problems.
Change-Id: I514e5d910fb3b92606aae86aee282a97e6166a15 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
4058b2cb | 07-Nov-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
control: Add basic MCTP Control Protocol handler
This will respond to the 4 mandatory MCTP Control Protocol commands. Applications can register supported types using mctp_control_add_type().
Change
control: Add basic MCTP Control Protocol handler
This will respond to the 4 mandatory MCTP Control Protocol commands. Applications can register supported types using mctp_control_add_type().
Change-Id: Ia904bcbe118626adf9254ffa71dd8e17fbdfc9b7 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
f7749dc3 | 06-Nov-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
core: Remove completion_code field from mctp_ctrl_msg_hdr
That field is only applicable for response messages, not request messages.
Change-Id: I74d0cc206c78d162e5cd210a45d398334e1cdf52 Signed-off-
core: Remove completion_code field from mctp_ctrl_msg_hdr
That field is only applicable for response messages, not request messages.
Change-Id: I74d0cc206c78d162e5cd210a45d398334e1cdf52 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
e5b941d9 | 17-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
i2c: Add binding for MCTP over I2C transport
Implements DSP0237. This has a fixed neighbor table (currently 4 entries), with neighbors learned on reception, or set with mctp_i2c_set_neighbour().
Ch
i2c: Add binding for MCTP over I2C transport
Implements DSP0237. This has a fixed neighbor table (currently 4 entries), with neighbors learned on reception, or set with mctp_i2c_set_neighbour().
Change-Id: I9b1e2c3673149cd0b9fee0d8113f3cac0e336bc7 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
44e64dfa | 05-Nov-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
core: Add allocated tag expiry, mctp_set_now_op()
Allocated tags expire after 6 seconds, requiring a time source. The default will use clock_gettime(), though implementations can set MCTP_DEFAULT_CL
core: Add allocated tag expiry, mctp_set_now_op()
Allocated tags expire after 6 seconds, requiring a time source. The default will use clock_gettime(), though implementations can set MCTP_DEFAULT_CLOCK_GETTIME=0 and use mctp_set_now_op() for custom behavior.
Change-Id: Iaacf500bcd458c987f4b79c698bac9ae5ad5a73e Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
f9b99f1f | 17-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
build: Generate libmctp-sizes.h
This can be used to allocate static storage for a struct mctp used with heapless mctp_setup().
core.c internal data structures are moved to core-internal.h so that s
build: Generate libmctp-sizes.h
This can be used to allocate static storage for a struct mctp used with heapless mctp_setup().
core.c internal data structures are moved to core-internal.h so that sizeof(struct mctp) can be compiled without linking other objects.
Change-Id: I72dcd46ef11d6f4b4f5ba1c9ae6c95e40dda40f8 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
1250727f | 30-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
build/core: Add 'nolog' build option to omit logging entirely
This can be used to avoid dereferencing the global `log_type` which may be inaccessible on platforms with memory protection.
Change-Id:
build/core: Add 'nolog' build option to omit logging entirely
This can be used to avoid dereferencing the global `log_type` which may be inaccessible on platforms with memory protection.
Change-Id: Ib48468018e3afaf05978018199a9a2022cb49fdf Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
bbfcc6e1 | 17-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
build/core: Add MCTP_CUSTOM_ALLOC option
This avoids storing the allocator function pointers in mutable memory, which is a problem when building on platforms with memory protection. Instead the appl
build/core: Add MCTP_CUSTOM_ALLOC option
This avoids storing the allocator function pointers in mutable memory, which is a problem when building on platforms with memory protection. Instead the application/platform defines custom functions that are linked with libmctp.
Change-Id: Icaf88968b50c88bbd2305d325f9530658465e21f Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
61c95992 | 16-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
core: Add mctp_message_tx_request() function
This allocates a tag for messages sent with TO bit set.
Change-Id: Ia8403a06aa449e0218a30edf5ad69781c70d7c52 Signed-off-by: Matt Johnston <matt@codecons
core: Add mctp_message_tx_request() function
This allocates a tag for messages sent with TO bit set.
Change-Id: Ia8403a06aa449e0218a30edf5ad69781c70d7c52 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
0a96544a | 16-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
tests: Allow tx packets in mctp_binding_test
This requires setting src==dest for routing.
Change-Id: I098b67071b111e328cbcc8bb20656638d7baca39 Signed-off-by: Matt Johnston <matt@codeconstruct.com.a
tests: Allow tx packets in mctp_binding_test
This requires setting src==dest for routing.
Change-Id: I098b67071b111e328cbcc8bb20656638d7baca39 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
722d0db2 | 13-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
core: Allow running without heap allocations
Replace buses with a static array, and add mctp_setup/mctp_cleanup to use an existing struct.
__mctp_alloc() and __mctp_free() no longer need to be func
core: Allow running without heap allocations
Replace buses with a static array, and add mctp_setup/mctp_cleanup to use an existing struct.
__mctp_alloc() and __mctp_free() no longer need to be functional, though are used as defaults if m_msg_alloc/m_msg_free are not provided.
Change-Id: Ib5826836efb59e416410b25f138cbaf5931278f3 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
4a09e1dc | 13-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
core: Reuse buffers for tx, allow message pools
Use new m_msg_alloc/m_msg_free operations for whole-message MCTP buffers. m_realloc is no longer used, instead the maximum sized buffer is allocated f
core: Reuse buffers for tx, allow message pools
Use new m_msg_alloc/m_msg_free operations for whole-message MCTP buffers. m_realloc is no longer used, instead the maximum sized buffer is allocated for each reassembly. This allows applications to keep a pool of MCTP message buffers.
Don't create a queue of packets to transmit, instead reuse a single binding-provided tx_storage buffer for each transmitted packet, which can be static for bindings that have a known maximum packet size.
Asynchronous users/bindings can no longer rely on the core for queueing TX packets, instead they should test mctp_is_tx_ready() prior to calling mctp_message_tx(). The stack will return -EBUSY from mctp_message_tx() if there is already a message pending to send.
Bindings must be updated to add the tx_storage member, and the core will no longer free packets passed to mctp_bus_rx().
Change-Id: I2598bb91026ccef01b268c52b06c0f8e20bebb1e Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
ba5f7477 | 11-Dec-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
tests: astlpc: Change high-to-low MTU test for txq
The test relies on internal packet queue state, which is going to change in a future commit (packets generated as required). Instead test that upda
tests: astlpc: Change high-to-low MTU test for txq
The test relies on internal packet queue state, which is going to change in a future commit (packets generated as required). Instead test that updating a host from high to low MTU works correctly, without relying on specific buffering.
Change-Id: Id33c1d0e5bb0b8cc0ac2a8cc964e3c694643ac02 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
63338a2e | 10-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
build: Better fileio test, required for utils
The existing fileio configure test only tests for unistd/fcntl header existence, which isn't sufficient. This change instead tests for linking poll().
build: Better fileio test, required for utils
The existing fileio configure test only tests for unistd/fcntl header existence, which isn't sufficient. This change instead tests for linking poll().
The utils programs need fileio so the meson build is made conditional for those.
Change-Id: I7edf632cf81ed3e78f2f02488e95c28d78edfc31 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
6586fc10 | 10-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
build: Add meson build
This replicates most of the current autotools build.
Code coverage is omitted, it should be possible to use built-in Meson functionality.
Valgrind for tests has not been add
build: Add meson build
This replicates most of the current autotools build.
Code coverage is omitted, it should be possible to use built-in Meson functionality.
Valgrind for tests has not been added, instead it can run as meson test --wrap='valgrind --leak-check=full --error-exitcode=1'
Change-Id: I5566a6c30630c486d22390e126899dbe4a6331ce Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
6e0c5d6d | 10-Sep-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
serial: Fix const correctness of write stub
Change-Id: If76a2f81cdd120c93a4b9bcc1bb08da573d3a755 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> |
7c51d831 | 10-Dec-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
serial: Fix attribute for mctp_serial_tx_fn
cppcheck complains about the function attribute previously at the end.
Change-Id: I781af654e56b062040ae6f553d9ba3a5148ce1b9 Signed-off-by: Matt Johnston
serial: Fix attribute for mctp_serial_tx_fn
cppcheck complains about the function attribute previously at the end.
Change-Id: I781af654e56b062040ae6f553d9ba3a5148ce1b9 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
e79ac010 | 10-Dec-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
serial: Replace mctp_write_all with a function
Brace grouped expressions are a GNU extension so don't work with -Wpedantic
Change-Id: I9ec2b0542251c59856be0e7470e117c76e210b95 Signed-off-by: Matt J
serial: Replace mctp_write_all with a function
Brace grouped expressions are a GNU extension so don't work with -Wpedantic
Change-Id: I9ec2b0542251c59856be0e7470e117c76e210b95 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
3ef47785 | 11-Dec-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
Fix warnings reported by -Wpedantic
Previously CI hasn't been running with -Wpedantic (using autoconf), so these haven't been reported previously.
- replace BUILD_ASSERT with static_assert() - don'
Fix warnings reported by -Wpedantic
Previously CI hasn't been running with -Wpedantic (using autoconf), so these haven't been reported previously.
- replace BUILD_ASSERT with static_assert() - don't use %m GNU extension for printf - don't use arithmetic on void* - remove unused variables
Change-Id: I97d1acc908f06773b8b1ee95bfee80760fdc7a63 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
20f38623 | 11-Dec-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
core: range: Make simpler for -Wpedantic
Replace MIN and MAX with simple conditionals. These evaluate multiple times, but all uses in libmctp have been audited to be side-effect free.
Using brace g
core: range: Make simpler for -Wpedantic
Replace MIN and MAX with simple conditionals. These evaluate multiple times, but all uses in libmctp have been audited to be side-effect free.
Using brace grouped expressions is non-portable so -Wpedantic doesn't support it. A #pragma can't be used to disable the warning since it occurs at the MAX() macro "callsite", not in the header file.
../serial.c:39:9: warning: ISO C forbids braced-groups within expressions [-Wpedantic] 39 | ({
Change-Id: I099a3aa8cbd6730129b9da0fd723342ccb1f7e64 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
dfbf0fd0 | 28-Oct-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
core: const input arg for mctp_pktbuf_push()
Change-Id: I321c81ba86bf4d4dcd8f242d25ce4c9c2487b736 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> |
86e9a97a | 28-Oct-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
core: Fix size check to match comment
Change-Id: I924e5dac387c2dee078bc0fac4bdbebda242c997 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> |
2f1a1f66 | 08-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
vendor-ibm-astlpc.md: Remove extra trailing spaces
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ibe64b5c1974b332f456683679900c94bab25e1a3 |
a0798298 | 04-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
vendor-ibm-astlpc.md: Fix MD036 warnings
The following warnings are generated by using markdownlint analysis: ``` docs/bindings/vendor-ibm-astlpc.md:26 MD036/no-emphasis-as-heading Emphasis used ins
vendor-ibm-astlpc.md: Fix MD036 warnings
The following warnings are generated by using markdownlint analysis: ``` docs/bindings/vendor-ibm-astlpc.md:26 MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "BTU: Baseline Transmission Uni..."] docs/bindings/vendor-ibm-astlpc.md:31 MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "IBF: Input Buffer Full"] docs/bindings/vendor-ibm-astlpc.md:37 MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "IDR: Input Data Register"] docs/bindings/vendor-ibm-astlpc.md:42 MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "KCS: Keyboard-Controller-Style"] docs/bindings/vendor-ibm-astlpc.md:52 MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "LPC Bus: Low Pin Count Bus"] docs/bindings/vendor-ibm-astlpc.md:57 MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "LPC FW: LPC Firmware Cycles"] docs/bindings/vendor-ibm-astlpc.md:64 MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "MTU: Maximum Transmission Unit"] docs/bindings/vendor-ibm-astlpc.md:70 MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "OBF: Output Buffer Full"] docs/bindings/vendor-ibm-astlpc.md:76 MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "ODR: Output Data Register"] docs/bindings/vendor-ibm-astlpc.md:81 MD036/no-emphasis-as-heading Emphasis used instead of a heading [Context: "STR: Status Register"] ``` Refer to markdown-lint [1] to fix MD036 [1]: https://github.com/updownpress/markdown-lint/blob/master/rules/036-no-emphasis-as-header.md
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Id56964b7edff73c060215d27b55e558304b83269
show more ...
|
d65b7d30 | 04-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
vendor-ibm-astlpc.md: Fix MD034 warnings
The following warnings are generated by using markdownlint analysis: ``` docs/bindings/vendor-ibm-astlpc.md:15:4 MD034/no-bare-urls Bare URL used [Context: "
vendor-ibm-astlpc.md: Fix MD034 warnings
The following warnings are generated by using markdownlint analysis: ``` docs/bindings/vendor-ibm-astlpc.md:15:4 MD034/no-bare-urls Bare URL used [Context: "http://www.dmtf.org/standards/..."] docs/bindings/vendor-ibm-astlpc.md:18:4 MD034/no-bare-urls Bare URL used [Context: "https://www.intel.com/content/..."] docs/bindings/vendor-ibm-astlpc.md:22:4 MD034/no-bare-urls Bare URL used [Context: "http://download.intel.com/desi..."] ``` Refer to markdown-lint [1] to fix MD034 [1]: https://github.com/updownpress/markdown-lint/blob/master/rules/034-no-bare-urls.md
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I6a25ee9610678378e50ff5d2d6c953f1084d80ae
show more ...
|