dev-amdgpu: Add PM4PP, VMID, Linux definitions
The PM4 packet processor is handling all non-HSA GPU packets such as packets for (un)mapping HSA queues. This commit pulls many Linux structs and defines out into their own files for clarity. Finally, it implements the VMID related functions in AMDGPU device. Change-Id: I5f0057209305404df58aff2c4cd07762d1a31690 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53068 Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Matt Sinclair <mattdsinclair@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -248,7 +248,7 @@ AMDGPUVM::AGPTranslationGen::translate(Range &range) const
|
||||
range.size = std::min(range.size, next - range.vaddr);
|
||||
range.paddr = range.vaddr - vm->getAGPBot() + vm->getAGPBase();
|
||||
|
||||
printf("AMDGPUVM: AGP translation %#lx -> %#lx\n",
|
||||
DPRINTF(AMDGPUDevice, "AMDGPUVM: AGP translation %#lx -> %#lx\n",
|
||||
range.vaddr, range.paddr);
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ AMDGPUVM::GARTTranslationGen::translate(Range &range) const
|
||||
range.paddr = (bits(pte, 47, 12) << 12) | lower_bits;
|
||||
}
|
||||
|
||||
printf("AMDGPUVM: GART translation %#lx -> %#lx\n",
|
||||
DPRINTF(AMDGPUDevice, "AMDGPUVM: GART translation %#lx -> %#lx\n",
|
||||
range.vaddr, range.paddr);
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ AMDGPUVM::MMHUBTranslationGen::translate(Range &range) const
|
||||
range.size = std::min(range.size, next - range.vaddr);
|
||||
range.paddr = range.vaddr - vm->getMMHUBBase();
|
||||
|
||||
printf("AMDGPUVM: MMHUB translation %#lx -> %#lx\n",
|
||||
DPRINTF(AMDGPUDevice, "AMDGPUVM: MMHUB translation %#lx -> %#lx\n",
|
||||
range.vaddr, range.paddr);
|
||||
}
|
||||
|
||||
@@ -310,7 +310,8 @@ AMDGPUVM::UserTranslationGen::translate(Range &range) const
|
||||
// Get base address of the page table for this vmid
|
||||
Addr base = vm->getPageTableBase(vmid);
|
||||
Addr start = vm->getPageTableStart(vmid);
|
||||
printf("User tl base %#lx start %#lx walker %p\n", base, start, walker);
|
||||
DPRINTF(AMDGPUDevice, "User tl base %#lx start %#lx walker %p\n",
|
||||
base, start, walker);
|
||||
|
||||
bool dummy;
|
||||
unsigned logBytes;
|
||||
|
||||
Reference in New Issue
Block a user