67655e83 | 27-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Add astlpc_test_undefined_command()
Any undefined commands recieved should be discarded without affecting channel state.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I631
test_astlpc: Add astlpc_test_undefined_command()
Any undefined commands recieved should be discarded without affecting channel state.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I63122307a18d02683084951abe6127944de756e0
show more ...
|
f3d94dcf | 27-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Add astlpc_test_poll_not_ready()
Ensure we don't fail or block the poll operation if there's no data.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iadb63155bf94bf837b215c
test_astlpc: Add astlpc_test_poll_not_ready()
Ensure we don't fail or block the poll operation if there's no data.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iadb63155bf94bf837b215c957fa75a866dcff9f0
show more ...
|
f13cb971 | 27-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
astlpc: Introduce KCS accessors
Introducing mctp_astlpc_kcs_{read,write}() results in a minor reduction of boilerplate and tidying of formatting.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Cha
astlpc: Introduce KCS accessors
Introducing mctp_astlpc_kcs_{read,write}() results in a minor reduction of boilerplate and tidying of formatting.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I416592491197d419b7418f1ad33abbff2697119d
show more ...
|
3f32507e | 27-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
astlpc: Remove redundant KCS register name enumeration
Seems we grew two separate enums for the registers at some point.
Change-Id: I87eca646a93ca65c783ea6276cbc33b577dcd721 Signed-off-by: Andrew J
astlpc: Remove redundant KCS register name enumeration
Seems we grew two separate enums for the registers at some point.
Change-Id: I87eca646a93ca65c783ea6276cbc33b577dcd721 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
d0f5da0d | 27-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
astlpc: Handle loss of bmc-ready state
Up until now the host implementation assumed the BMC was always present. This may not be the case, so implement the facility to manage the Tx queue state acros
astlpc: Handle loss of bmc-ready state
Up until now the host implementation assumed the BMC was always present. This may not be the case, so implement the facility to manage the Tx queue state across BMC reboots.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I6e4c5270bc2e2bca10fed102e93cec13f763667e
show more ...
|
55fb90be | 11-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
astlpc: Consolidate direct vs indirect LPC access
Use helpers to wrap up LPC accessors so we're not littering the code with conditional checks for direct or indirect access. As a result, drop the pr
astlpc: Consolidate direct vs indirect LPC access
Use helpers to wrap up LPC accessors so we're not littering the code with conditional checks for direct or indirect access. As a result, drop the priv_hdr pointer from struct mctp_binding_astlpc as we're utilising the buffers provided by the caller, which in turn removes a heap allocation.
Change-Id: Iab9ca4295879a3f3a0209fb23163c0383476c223 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
f1cdb165 | 23-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Add test initialising the device before the bus owner
This is an invalid initialisation sequence, so ensure the device start-up routine bails out if it detects that data in the control
test_astlpc: Add test initialising the device before the bus owner
This is an invalid initialisation sequence, so ensure the device start-up routine bails out if it detects that data in the control area is invalid.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I9575bf6d34439212fe27cd56271c16f38d7b2faa
show more ...
|
ec9a0065 | 22-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Add test for a simple message from host to BMC
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ia763f4704fe0d406ca873b6a58cfd85d2408f5ee |
91f09edb | 22-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Improve readability of test output
Add descriptions of which test is running and break up the output between tests.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ibdc43d7e
test_astlpc: Improve readability of test output
Add descriptions of which test is running and break up the output between tests.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ibdc43d7e4162a4cf58659adc428ee093f73ce3e1
show more ...
|
8f3eb72a | 22-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Test simple message from BMC to host
Remove the corresponding assertions from the packetized message test.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ifd0d857e4e955e57b
test_astlpc: Test simple message from BMC to host
Remove the corresponding assertions from the packetized message test.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ifd0d857e4e955e57b0fb4a4cd2dc0a655b3c9508
show more ...
|
d3c0bf08 | 28-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Clean up debugging in KCS callbacks
This makes the file clang-format clean.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ie13c2c131ed1e00a8b527f27481cda22a824e8e6 |
5a7c2dbc | 22-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Assert message expectations in rx_message()
Confirm that we receive the packet that was sent.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I485fda9646af63ceba69e3da78c2d2
test_astlpc: Assert message expectations in rx_message()
Confirm that we receive the packet that was sent.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I485fda9646af63ceba69e3da78c2d214d5c09ff8
show more ...
|
129ef93c | 22-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Introduce astlpc_assert_tx_packet()
astlpc_assert_tx_packet() is a quick test to ensure the expected packet has been enqueued on the interface.
Signed-off-by: Andrew Jeffery <andrew@aj
test_astlpc: Introduce astlpc_assert_tx_packet()
astlpc_assert_tx_packet() is a quick test to ensure the expected packet has been enqueued on the interface.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I5ef818bcfc4537329a590e0c3023eb3d22db2c05
show more ...
|
cb5d55cc | 21-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Add network_{init,destroy}() helpers
Make it easy to set up two endpoints that have completed the binding initialisation sequence and a ready to send messages.
Signed-off-by: Andrew Je
test_astlpc: Add network_{init,destroy}() helpers
Make it easy to set up two endpoints that have completed the binding initialisation sequence and a ready to send messages.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I0efa8fdd69e1635adfa84823ba0402023b643216
show more ...
|
f1a21310 | 21-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Add astlpc_test_simple_init
Separate out testing of the basic transport initialisation sequence to reduce use of asserts in other more extensive tests.
Signed-off-by: Andrew Jeffery <a
test_astlpc: Add astlpc_test_simple_init
Separate out testing of the basic transport initialisation sequence to reduce use of asserts in other more extensive tests.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iad84d9fdb54ce0e895c1648206085f6d04e42c9b
show more ...
|
e756de86 | 21-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Extract single test case to dedicated function
There will be additional test cases, so lets prepare for their addition.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I0c7f
test_astlpc: Extract single test case to dedicated function
There will be additional test cases, so lets prepare for their addition.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I0c7f1812f672e36e1fbc6122b75c224b8a681be8
show more ...
|
d5e3cd76 | 12-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Instantiate a binding for each endpoint
Implement the test as we do for the serial binding where we instantiate an MCTP context for each endpoint and glue them together with shared reso
test_astlpc: Instantiate a binding for each endpoint
Implement the test as we do for the serial binding where we instantiate an MCTP context for each endpoint and glue them together with shared resources (memory in the case of the astlpc binding, pipes for the serial binding). The test scenario then executes the actions of each side in-turn, exercising binding initialisation for both sides as well as both of the binding's read and write paths.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Ie51fafcdb35ea8c86d872c5fef9066d6d50028b2
show more ...
|
7cceebab | 12-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Fix OBF flag behaviour in emulated KCS status byte
The implementation wasn't properly respecting the RW0C (read, write-zero-clear) behaviour of the OBF bit on the BMC side. Maintain the
test_astlpc: Fix OBF flag behaviour in emulated KCS status byte
The implementation wasn't properly respecting the RW0C (read, write-zero-clear) behaviour of the OBF bit on the BMC side. Maintain the set state of the bit if the new status value has its bit set and clear it otherwise, but don't blindly apply the bit state of the new status value to OBF.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: If16570dd0f35f27187fc9f9edb73ba5e48c4949f
show more ...
|
df5f6b95 | 12-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Include astlpc.c for internal structures
Remove the copied structure as this will be modified in the future and we want to stay in sync.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
test_astlpc: Include astlpc.c for internal structures
Remove the copied structure as this will be modified in the future and we want to stay in sync.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I151881ad7010963f16f79535139450bd2c19fa8a
show more ...
|
53ea147b | 23-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
test_astlpc: Make more functions static
Nothing besides main() should be exposed.
Change-Id: Ie17cecae424d0d8c11f19f669e3fd47e1e67ecd3 Signed-off-by: Andrew Jeffery <andrew@aj.id.au> |
9101a2ab | 22-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
astlpc: Introduce astlpc_pr{err,warn,info,debug}()
Wrap the generic mctp_pr*() macros to provide information on whether the binding was instantiated for the BMC or the host.
Signed-off-by: Andrew J
astlpc: Introduce astlpc_pr{err,warn,info,debug}()
Wrap the generic mctp_pr*() macros to provide information on whether the binding was instantiated for the BMC or the host.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I7749b4a4b7044d8804b2e986ab1d8ff62f69171b
show more ...
|
7cd72f14 | 12-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
astlpc: Support the host-side binding interface
The host-side KCS interface differs to the BMC that we need to mirror the use of the IBF/OBF bits and the location of the Tx/Rx buffers.
The device (
astlpc: Support the host-side binding interface
The host-side KCS interface differs to the BMC that we need to mirror the use of the IBF/OBF bits and the location of the Tx/Rx buffers.
The device (currently restricted to the host) also needs to use a different initialisation sequence to the bus-owner (currently restricted to the BMC), in that it must not write to regions of the control space that the bus-owner owns. Concretely, the device is to write its supported version range and then send the channel-init command via the KCS interface.
Change-Id: I715b83d82119ebbdce6ef8176ea0a9facf9bb555 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
3e8a12a4 | 05-Jun-2020 |
Andrew Jeffery <andrew@aj.id.au> |
core: Cleanup after failing to start binding
Previously we changed mctp_register_bus() to return the error if the binding failed to start. That change was broken in that ignored resources that had b
core: Cleanup after failing to start binding
Previously we changed mctp_register_bus() to return the error if the binding failed to start. That change was broken in that ignored resources that had been allocated on the path to invoking the binding start function. Add the necessary cleanup.
Fixes: 0dc1375dbc41 ("core: Propagate binding start-up errors in mctp_register_bus()") Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I232242b3be76db9d0c7de60262779cb768173416
show more ...
|
b93b6112 | 04-Jun-2020 |
Andrew Jeffery <andrew@aj.id.au> |
bootstrap: Ratchet up compiler strictness
Replace the specific warning flags with -Wall -Wextra and turn on -Werror.
Covered by -Wall:
* -Wformat * -Warray-bounds * -Wimplicit-function-declaration
bootstrap: Ratchet up compiler strictness
Replace the specific warning flags with -Wall -Wextra and turn on -Werror.
Covered by -Wall:
* -Wformat * -Warray-bounds * -Wimplicit-function-declaration
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: Iab21e67026d2453648aa6ebe4c299e1162fc5ebf
show more ...
|
8d53b1c3 | 28-May-2020 |
Andrew Jeffery <andrew@aj.id.au> |
configure: Enable valgrind support
I've caught some issues with valgrind that were missed by the compiler sanitizers (though were interestingly picked up by the cmake build of the test suites).
Sig
configure: Enable valgrind support
I've caught some issues with valgrind that were missed by the compiler sanitizers (though were interestingly picked up by the cmake build of the test suites).
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I96ac0a331c2d7466ee66a7ce2e8d8b2b8d497d5d
show more ...
|