mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 20:12:44 +00:00
amdiommu: Fix device table segment base register offsets
Segment base registers are at 8-byte intervals, while the register write helper takes a byte-aligned offset. This fixes DEV_TAB_HARDWARE_ERROR events and associated peripheral I/O failures on an Epyc-based system with 8-segment device tables. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D47752
This commit is contained in:
parent
501c4801ed
commit
5035db222e
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user