- HT 2.00b added a new flag to the MSI mapping HT capability to indicate
that the MSI mapping window is fixed at 0xfee00000 and the capability does not include two more dwords used to program the address. Supporting this mostly results in quieting spurious warnings during boot about non-default MSI mapping windows. - HT 2.00b also added a new HT capability type, so support that in pciconf. MFC after: 3 days Tested by: jmg
This commit is contained in:
parent
e5b725c271
commit
d68b1825b7
@ -533,15 +533,19 @@ pci_read_extcap(device_t pcib, pcicfgregs *cfg)
|
||||
val = REG(ptr + PCIR_HT_COMMAND, 2);
|
||||
switch (val & PCIM_HTCMD_CAP_MASK) {
|
||||
case PCIM_HTCAP_MSI_MAPPING:
|
||||
/* Sanity check the mapping window. */
|
||||
addr = REG(ptr + PCIR_HTMSI_ADDRESS_HI, 4);
|
||||
addr <<= 32;
|
||||
addr = REG(ptr + PCIR_HTMSI_ADDRESS_LO, 4);
|
||||
if (addr != MSI_INTEL_ADDR_BASE)
|
||||
device_printf(pcib,
|
||||
if (!(val & PCIM_HTCMD_MSI_FIXED)) {
|
||||
/* Sanity check the mapping window. */
|
||||
addr = REG(ptr + PCIR_HTMSI_ADDRESS_HI,
|
||||
4);
|
||||
addr <<= 32;
|
||||
addr = REG(ptr + PCIR_HTMSI_ADDRESS_LO,
|
||||
4);
|
||||
if (addr != MSI_INTEL_ADDR_BASE)
|
||||
device_printf(pcib,
|
||||
"HT Bridge at %d:%d:%d has non-default MSI window 0x%llx\n",
|
||||
cfg->bus, cfg->slot, cfg->func,
|
||||
(long long)addr);
|
||||
cfg->bus, cfg->slot,
|
||||
cfg->func, (long long)addr);
|
||||
}
|
||||
|
||||
/* Enable MSI -> HT mapping. */
|
||||
val |= PCIM_HTCMD_MSI_ENABLE;
|
||||
|
@ -553,9 +553,11 @@
|
||||
#define PCIM_HTCAP_DIRECT_ROUTE 0xb000 /* 10110 */
|
||||
#define PCIM_HTCAP_VCSET 0xb800 /* 10111 */
|
||||
#define PCIM_HTCAP_RETRY_MODE 0xc000 /* 11000 */
|
||||
#define PCIM_HTCAP_X86_ENCODING 0xc800 /* 11001 */
|
||||
|
||||
/* HT MSI Mapping Capability definitions. */
|
||||
#define PCIM_HTCMD_MSI_ENABLE 0x0001
|
||||
#define PCIM_HTCMD_MSI_FIXED 0x0002
|
||||
#define PCIR_HTMSI_ADDRESS_LO 0x4
|
||||
#define PCIR_HTMSI_ADDRESS_HI 0x8
|
||||
|
||||
|
@ -243,16 +243,21 @@ cap_ht(int fd, struct pci_conf *p, uint8_t ptr)
|
||||
printf("address mapping");
|
||||
break;
|
||||
case PCIM_HTCAP_MSI_MAPPING:
|
||||
printf("MSI address window %s at 0x",
|
||||
printf("MSI %saddress window %s at 0x",
|
||||
command & PCIM_HTCMD_MSI_FIXED ? "fixed " : "",
|
||||
command & PCIM_HTCMD_MSI_ENABLE ? "enabled" :
|
||||
"disabled");
|
||||
reg = read_config(fd, &p->pc_sel,
|
||||
ptr + PCIR_HTMSI_ADDRESS_HI, 4);
|
||||
if (reg != 0)
|
||||
if (command & PCIM_HTCMD_MSI_FIXED)
|
||||
printf("fee00000");
|
||||
else {
|
||||
reg = read_config(fd, &p->pc_sel,
|
||||
ptr + PCIR_HTMSI_ADDRESS_HI, 4);
|
||||
if (reg != 0)
|
||||
printf("%08x", reg);
|
||||
reg = read_config(fd, &p->pc_sel,
|
||||
ptr + PCIR_HTMSI_ADDRESS_LO, 4);
|
||||
printf("%08x", reg);
|
||||
reg = read_config(fd, &p->pc_sel,
|
||||
ptr + PCIR_HTMSI_ADDRESS_LO, 4);
|
||||
printf("%08x", reg);
|
||||
}
|
||||
break;
|
||||
case PCIM_HTCAP_DIRECT_ROUTE:
|
||||
printf("direct route");
|
||||
|
Loading…
Reference in New Issue
Block a user