mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
pciconf: Use VM_MEMATTR_DEVICE on supported architectures
Some architectures - armv7, armv8 and riscv use VM_MEMATTR_DEVICE
when mapping device registers in kernel. Do the same in pciconf.
On armada8k SoC all reads from BARs mapped with hitherto attribute
(VM_MEMATTR_UNCACHEABLE) return 0xff's.
Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: kib
Obtained from: Semihalf
Sponsored by: Marvell
Differential revision: https://reviews.freebsd.org/D29603
(cherry picked from commit 1c1ead9b94)
This commit is contained in:
parent
b0c251b0de
commit
2a8921c5d1
1 changed files with 5 additions and 1 deletions
|
|
@ -1126,7 +1126,11 @@ dump_bar(const char *name, const char *reg, const char *bar_start,
|
|||
if (*reg == '\0' || *el != '\0')
|
||||
errx(1, "Invalid bar specification %s", reg);
|
||||
pbm.pbm_flags = 0;
|
||||
pbm.pbm_memattr = VM_MEMATTR_UNCACHEABLE; /* XXX */
|
||||
#ifdef VM_MEMATTR_DEVICE
|
||||
pbm.pbm_memattr = VM_MEMATTR_DEVICE;
|
||||
#else
|
||||
pbm.pbm_memattr = VM_MEMATTR_UNCACHEABLE;
|
||||
#endif
|
||||
|
||||
fd = open(_PATH_DEVPCI, O_RDWR, 0);
|
||||
if (fd < 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue