Add initial certificate bank support and allow selecting the bank#3629
Open
alistair23 wants to merge 2 commits into
Open
Add initial certificate bank support and allow selecting the bank#3629alistair23 wants to merge 2 commits into
alistair23 wants to merge 2 commits into
Conversation
e3e587a to
4e67910
Compare
Currently bank support can be handled by the implementer using the CONNECTION_STATE_NEGOTIATED callback registered with libspdm_register_connection_state_callback_func(). The problem with this is it pushes a lot of complexity back to the implementer and it makes supporting the Slot Management commands tricky, as the implementer will need to handle the commands as well. Instead let's move the bank support into libspdm. For step 1 we just convert the array of certificate information for the slots into a 2-D array of slots and banks. We hard code to use bank 0 at all times, so this is no functional change. At build time we allow users to specify their own bank count, allowing smaller bank counts on size reduced systems. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
cfa50b4 to
0484933
Compare
itsManjeet
reviewed
May 26, 2026
Allow the implementation to select the bank to use by setting the LIBSPDM_DATA_LOCAL_CURRENT_BANK property. This selects the current bank for all existing operations. Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
0484933 to
5a803e8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SPDM 1.4 add support for the banked architecture. Basically allowing a number of banks of certificate slots.
Currently bank support can be handled by the implementer using the CONNECTION_STATE_NEGOTIATED callback registered with
libspdm_register_connection_state_callback_func().The problem with this is it pushes a lot of complexity back to the implementer and it makes supporting the Slot Management commands tricky, as the implementer will need to handle the commands as well.
Instead let's move the bank support into libspdm. Currently we just allow at build time a 2-D array of certificates, for banks and slots. We then allow the implementation to select the bank to use, which defaults to zero.
Future patches will work on the Slot Management commands, which can then operate on specific banks.
At build time we allow users to specify their own bank count, allowing smaller bank counts on size reduced systems.