Add agent info for fw and sdma ucode

Add two new agent info fields:
HSA_AMD_AGENT_INFO_UCODE_VERSION
HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION

Change-Id: I51cb853724b23a26e945e5c1ac32c16d0cb3bc31


[ROCm/ROCR-Runtime commit: ecdebef0b9]
Cette révision appartient à :
David Yat Sin
2022-12-07 03:11:24 +00:00
Parent 2b666f57fa
révision 652a617846
3 fichiers modifiés avec 23 ajouts et 1 suppressions
+6
Voir le fichier
@@ -370,6 +370,12 @@ hsa_status_t CpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
case HSA_AMD_AGENT_INFO_ASIC_FAMILY_ID:
*((uint32_t*)value) = static_cast<uint32_t>(properties_.FamilyID);
break;
case HSA_AMD_AGENT_INFO_UCODE_VERSION:
*((uint32_t*)value) = 0;
break;
case HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION:
*((uint32_t*)value) = 0;
break;
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
break;
+6
Voir le fichier
@@ -1105,6 +1105,12 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
case HSA_AMD_AGENT_INFO_ASIC_FAMILY_ID:
*((uint32_t*)value) = static_cast<uint32_t>(properties_.FamilyID);
break;
case HSA_AMD_AGENT_INFO_UCODE_VERSION:
*((uint32_t*)value) = static_cast<uint32_t>(properties_.EngineId.ui32.uCode);
break;
case HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION:
*((uint32_t*)value) = static_cast<uint32_t>(properties_.uCodeEngineVersions.uCodeSDMA);
break;
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
break;
+11 -1
Voir le fichier
@@ -335,7 +335,17 @@ typedef enum hsa_amd_agent_info_s {
* Queries for the ASIC family ID of an agent.
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_ASIC_FAMILY_ID = 0xA107
HSA_AMD_AGENT_INFO_ASIC_FAMILY_ID = 0xA107,
/**
* Queries for the Packet Processor(CP Firmware) ucode version of an agent.
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_UCODE_VERSION = 0xA108,
/**
* Queries for the SDMA engine ucode of an agent.
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION = 0xA109
} hsa_amd_agent_info_t;