1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00

Fix bus numbering in ThunderX ITS quirk

Internal busses (thus ECAM access) should be mapped to
all values from 0 to 143.

Obtained from: Semihalf
Sponsored by:  The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D3753
This commit is contained in:
Zbigniew Bodek 2015-10-25 23:27:08 +00:00
parent 71e2c1d4c0
commit db94e32ba7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=289967

View File

@ -59,6 +59,8 @@ __FBSDID("$FreeBSD$");
#include "gic_v3_reg.h"
#include "gic_v3_var.h"
#define GIC_V3_ITS_QUIRK_THUNDERX_PEM_BUS_OFFSET 144
#include "pic_if.h"
/* Device and PIC methods */
@ -1475,8 +1477,8 @@ its_get_devid_thunder(device_t pci_dev)
bsf = PCI_RID(pci_get_bus(pci_dev), pci_get_slot(pci_dev),
pci_get_function(pci_dev));
/* ECAM is on bus=0 */
if (bus == 0) {
/* Check if accessing internal PCIe (low bus numbers) */
if (bus < GIC_V3_ITS_QUIRK_THUNDERX_PEM_BUS_OFFSET) {
return ((pci_get_domain(pci_dev) << PCI_RID_DOMAIN_SHIFT) |
bsf);
/* PEM otherwise */