Skip to content

Commit

Permalink
Fix hardcode when set LIBSPDM_DATA_LOCAL_SUPPORTED_SLOT_MASK
Browse files Browse the repository at this point in the history
Fix the issue: DMTF#333

Signed-off-by: Wenxing Hou <[email protected]>
  • Loading branch information
Wenxing-hou authored and jyao1 committed Feb 1, 2024
1 parent 25a446f commit 93baf2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion spdm_emu/spdm_requester_emu/spdm_requester_spdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,10 @@ void *spdm_client_init(void)

libspdm_zero_mem(&parameter, sizeof(parameter));
parameter.location = LIBSPDM_DATA_LOCATION_LOCAL;
data8 = 0x3F;
data8 = 0;
for (index = 0; index < m_use_slot_count; index++) {
data8 |= (1 << index);
}
libspdm_set_data(spdm_context, LIBSPDM_DATA_LOCAL_SUPPORTED_SLOT_MASK, &parameter,
&data8, sizeof(data8));

Expand Down
5 changes: 4 additions & 1 deletion spdm_emu/spdm_responder_emu/spdm_responder_spdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,10 @@ void spdm_server_connection_state_callback(

libspdm_zero_mem(&parameter, sizeof(parameter));
parameter.location = LIBSPDM_DATA_LOCATION_LOCAL;
data8 = 0x3F;
data8 = 0;
for (index = 0; index < m_use_slot_count; index++) {
data8 |= (1 << index);
}
libspdm_set_data(spdm_context, LIBSPDM_DATA_LOCAL_SUPPORTED_SLOT_MASK, &parameter,
&data8, sizeof(data8));

Expand Down

0 comments on commit 93baf2a

Please sign in to comment.