Matthew Poremba has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/70677?usp=email )
Change subject: dev-amdgpu: Fix nbio psp ring assert
......................................................................
dev-amdgpu: Fix nbio psp ring assert
The size of the packet changes between ROCm 4.x and ROCm 5.x. Change how
the address is set based on the incoming packet size so that both
versions continue to work for now.
Change-Id: I91694e4760198fd9129e60140df4e863666be2e2
---
M src/dev/amdgpu/amdgpu_nbio.cc
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/dev/amdgpu/amdgpu_nbio.cc b/src/dev/amdgpu/amdgpu_nbio.cc
index 8064fd2..8722c50 100644
--- a/src/dev/amdgpu/amdgpu_nbio.cc
+++ b/src/dev/amdgpu/amdgpu_nbio.cc
@@ -162,9 +162,18 @@
AMDGPUNbio::writeFrame(PacketPtr pkt, Addr offset)
{
if (offset == psp_ring_listen_addr) {
- assert(pkt->getSize() == 8);
- psp_ring_dev_addr = pkt->getLE<uint64_t>()
- - gpuDevice->getVM().getSysAddrRangeLow();
+ DPRINTF(AMDGPUDevice, "Saw psp_ring_listen_addr with size %ld
value "
+ "%ld\n", pkt->getSize(), pkt->getUintX(ByteOrder::little));
+
+ if (pkt->getSize() == 4) {
+ psp_ring_dev_addr = pkt->getLE<uint32_t>();
+ } else if (pkt->getSize() == 8) {
+ psp_ring_dev_addr = pkt->getUintX(ByteOrder::little)
+ - gpuDevice->getVM().getSysAddrRangeLow();
+ } else {
+ panic("Invalid write size to psp_ring_listen_addr\n");
+ }
+
DPRINTF(AMDGPUDevice, "Setting PSP ring device address to %#lx\n",
psp_ring_dev_addr);
}
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/70677?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I91694e4760198fd9129e60140df4e863666be2e2
Gerrit-Change-Number: 70677
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.com>
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org