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,24 +187,28 @@ uint32_t pcie_msi_map(unsigned int irq,
|
|||
ARG_UNUSED(irq);
|
||||
|
||||
#if defined(CONFIG_INTEL_VTD_ICTL)
|
||||
return vtd_remap_msi(vtd, vector, n_vector);
|
||||
#else
|
||||
return 0xFEE00000U; /* standard delivery to BSP local APIC */
|
||||
if (vector != NULL && n_vector > 0) {
|
||||
return vtd_remap_msi(vtd, vector, n_vector);
|
||||
}
|
||||
#endif
|
||||
return 0xFEE00000U; /* standard delivery to BSP local APIC */
|
||||
}
|
||||
|
||||
uint16_t pcie_msi_mdr(unsigned int irq,
|
||||
msi_vector_t *vector)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_INTEL_VTD_ICTL)) {
|
||||
return 0;
|
||||
}
|
||||
if (vector != NULL) {
|
||||
if (IS_ENABLED(CONFIG_INTEL_VTD_ICTL)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_PCIE_MSI_X)
|
||||
if (vector->msix) {
|
||||
return 0x4000U | vector->arch.vector;
|
||||
}
|
||||
if (vector->msix) {
|
||||
return 0x4000U | vector->arch.vector;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0x4000U | Z_IRQ_TO_INTERRUPT_VECTOR(irq);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue