HomeFreeBSD

MFC 348778,348998: Enable memory and I/O decoding in PCI devices on demand.

Description

MFC 348778,348998: Enable memory and I/O decoding in PCI devices on demand.

348778:
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.

348998:
Remove a spurious break when setting up a 64-bit memory BAR.

This was causing 'enbit' to not be initialized in this case.

Details

Provenance
jhbAuthored on
Parents
rS353704: MFC 348253: Add initial support for 'qSupported' to the debug server.
Branches
Unknown
Tags
Unknown