Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The PortIndex field must contain the PortIndex field value from the corresponding QUERY. #291

Closed
longlongyang opened this issue Oct 13, 2023 · 0 comments · Fixed by #292
Closed

Comments

@longlongyang
Copy link
Contributor

in QUERY_RESP, the port_index is always 0,
PCIe spce 6.1 says, The PortIndex field must contain the PortIndex field value from the corresponding QUERY.

LIBSPDM_ASSERT (*response_size >= sizeof(pci_ide_km_query_resp_mine_t));
*response_size = sizeof(pci_ide_km_query_resp_mine_t);
libspdm_zero_mem (response, *response_size);
ide_km_response->header.object_id = PCI_IDE_KM_OBJECT_ID_QUERY_RESP;
status = pci_ide_km_device_query (pci_doe_context, spdm_context, session_id,
ide_km_request->port_index,
&ide_km_response->dev_func_num,
&ide_km_response->bus_num,
&ide_km_response->segment,
&ide_km_response->max_port_index,
&ide_reg_buffer, &ide_reg_buffer_count);
if (LIBSPDM_STATUS_IS_ERROR(status)) {
return status;
}
LIBSPDM_ASSERT (ide_reg_buffer_count <= PCI_IDE_KM_IDE_REG_BLOCK_SUPPORTED_COUNT);
libspdm_copy_mem (ide_km_response->ide_reg_block,
sizeof(ide_km_response->ide_reg_block),
ide_reg_buffer,
ide_reg_buffer_count * sizeof(uint32_t));
*response_size = sizeof(pci_ide_km_query_resp_t) + ide_reg_buffer_count * sizeof(uint32_t);
return LIBSPDM_STATUS_SUCCESS;

longlongyang added a commit to longlongyang/spdm-emu that referenced this issue Oct 13, 2023
fix DMTF#291

Signed-off-by: Yang, Longlong <longlong.yang@intel.com>
longlongyang added a commit to longlongyang/spdm-emu that referenced this issue Oct 13, 2023
fix DMTF#291

Signed-off-by: Yang, Longlong <longlong.yang@intel.com>
longlongyang added a commit to longlongyang/spdm-emu that referenced this issue Oct 13, 2023
fix DMTF#291

Signed-off-by: Yang, Longlong <longlong.yang@intel.com>
jyao1 pushed a commit that referenced this issue Oct 13, 2023
fix #291

Signed-off-by: Yang, Longlong <longlong.yang@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant