HomeFreeBSD

Enable memory and I/O decoding in PCI devices on demand.

Description

Enable memory and I/O decoding in PCI devices on demand.

Rather than uncoditionally setting the MEMEN and PORTEN bits in
PCIR_COMMAND for PCI devices, set the respective bit when the first
BAR of a given type is added to the device. This more closely matches
what firmware does on bare metal.

BUSMASTEREN is still set unconditionally. Eventually this bit should
move into the device models as not all device models need this set.

Reviewed by: rgrimes
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20530

Details

Provenance
jhbAuthored on
Reviewer
rgrimes
Differential Revision
D20530: Enable memory and I/O decoding in PCI devices on demand.
Parents
rS348777: Add a basic clang-format configuration file
Branches
Unknown
Tags
Unknown