-
Takuya ASADA authored
On VMware, pci_readw(PCI_CFG_DEVICE_ID) returns the *vendor ID*. pci_readw(PCI_CFG_VENDOR_ID) returns vendor ID as well. Compare to FreeBSD implementation of read/write PCI config space, FreeBSD masks lower bit of offset when write to PCI_CONFIG_ADDRESS, and adds lower bit of offset to PCI_CONFIG_DATA. http://fxr.watson.org/fxr/source/amd64/pci/pci_cfgreg.c#L206 This patch changes accessing method in OSv to the FreeBSD way. Tested on QEMU/KVM and VMware. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Takuya ASADA <syuu@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
Takuya ASADA authoredOn VMware, pci_readw(PCI_CFG_DEVICE_ID) returns the *vendor ID*. pci_readw(PCI_CFG_VENDOR_ID) returns vendor ID as well. Compare to FreeBSD implementation of read/write PCI config space, FreeBSD masks lower bit of offset when write to PCI_CONFIG_ADDRESS, and adds lower bit of offset to PCI_CONFIG_DATA. http://fxr.watson.org/fxr/source/amd64/pci/pci_cfgreg.c#L206 This patch changes accessing method in OSv to the FreeBSD way. Tested on QEMU/KVM and VMware. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Takuya ASADA <syuu@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>