arch/x86: PCIE MSI address and data may be out of remapping
In fact, in case of VT-D being enabled, it will require to get an address and data for its own MSI based interrupts which cannot be remapped (i.e.: will directly go to the relevant APIC). This is necessary to get the Fault event supported in VT-D. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
2efd874dcc
commit
1012e254cc
1 changed files with 13 additions and 9 deletions
|
@ -187,15 +187,17 @@ uint32_t pcie_msi_map(unsigned int irq,
|
||||||
ARG_UNUSED(irq);
|
ARG_UNUSED(irq);
|
||||||
|
|
||||||
#if defined(CONFIG_INTEL_VTD_ICTL)
|
#if defined(CONFIG_INTEL_VTD_ICTL)
|
||||||
|
if (vector != NULL && n_vector > 0) {
|
||||||
return vtd_remap_msi(vtd, vector, n_vector);
|
return vtd_remap_msi(vtd, vector, n_vector);
|
||||||
#else
|
}
|
||||||
return 0xFEE00000U; /* standard delivery to BSP local APIC */
|
|
||||||
#endif
|
#endif
|
||||||
|
return 0xFEE00000U; /* standard delivery to BSP local APIC */
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t pcie_msi_mdr(unsigned int irq,
|
uint16_t pcie_msi_mdr(unsigned int irq,
|
||||||
msi_vector_t *vector)
|
msi_vector_t *vector)
|
||||||
{
|
{
|
||||||
|
if (vector != NULL) {
|
||||||
if (IS_ENABLED(CONFIG_INTEL_VTD_ICTL)) {
|
if (IS_ENABLED(CONFIG_INTEL_VTD_ICTL)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -205,6 +207,8 @@ uint16_t pcie_msi_mdr(unsigned int irq,
|
||||||
return 0x4000U | vector->arch.vector;
|
return 0x4000U | vector->arch.vector;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
return 0x4000U | Z_IRQ_TO_INTERRUPT_VECTOR(irq);
|
return 0x4000U | Z_IRQ_TO_INTERRUPT_VECTOR(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue