git: 077cbcaefb25 - stable/14 - amdiommu: Fix device table segment base register offsets
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 03 Dec 2024 00:51:16 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=077cbcaefb252c6ca9b9e64a9b5cf76409d82586
commit 077cbcaefb252c6ca9b9e64a9b5cf76409d82586
Author: Jason A. Harmening <jah@FreeBSD.org>
AuthorDate: 2024-11-25 23:24:41 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-12-03 00:39:21 +0000
amdiommu: Fix device table segment base register offsets
(cherry picked from commit 5035db222e8fa77d0b40fcd5a92c073dd1c590c2)
---
sys/x86/iommu/amd_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/x86/iommu/amd_drv.c b/sys/x86/iommu/amd_drv.c
index 4373987ae24a..1d9d3b6b72ef 100644
--- a/sys/x86/iommu/amd_drv.c
+++ b/sys/x86/iommu/amd_drv.c
@@ -277,7 +277,7 @@ amdiommu_create_dev_tbl(struct amdiommu_unit *sc)
pmap_qenter(seg_vaddr, &m, 1);
}
reg = i == 0 ? AMDIOMMU_DEVTAB_BASE : AMDIOMMU_DEVTAB_S1_BASE +
- i - 1;
+ ((i - 1) << 3);
amdiommu_write8(sc, reg, rval);
}