1 /* SPDX-License-Identifier: GPL-2.0 */
4 #include <asm/hw_irq.h>
5 #include <asm/irqdomain.h>
7 typedef struct irq_alloc_info msi_alloc_info_t;
9 int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec,
10 msi_alloc_info_t *arg);
12 /* Structs and defines for the X86 specific MSI message format */
14 typedef struct x86_msi_data {
19 dest_mode_logical : 1,
26 } __attribute__ ((packed)) arch_msi_msg_data_t;
27 #define arch_msi_msg_data x86_msi_data
29 typedef struct x86_msi_addr_lo {
33 dest_mode_logical : 1,
41 u32 dmar_reserved_0 : 2,
43 dmar_subhandle_valid : 1,
46 dmar_base_address : 12;
49 } __attribute__ ((packed)) arch_msi_msg_addr_lo_t;
50 #define arch_msi_msg_addr_lo x86_msi_addr_lo
52 #define X86_MSI_BASE_ADDRESS_LOW (0xfee00000 >> 20)
54 typedef struct x86_msi_addr_hi {
57 } __attribute__ ((packed)) arch_msi_msg_addr_hi_t;
58 #define arch_msi_msg_addr_hi x86_msi_addr_hi
60 #define X86_MSI_BASE_ADDRESS_HIGH (0)
63 u32 x86_msi_msg_get_destid(struct msi_msg *msg, bool extid);
65 #define X86_VECTOR_MSI_FLAGS_SUPPORTED \
66 (MSI_GENERIC_FLAGS_MASK | MSI_FLAG_PCI_MSIX | MSI_FLAG_PCI_MSIX_ALLOC_DYN)
68 #define X86_VECTOR_MSI_FLAGS_REQUIRED \
69 (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS)
71 #endif /* _ASM_X86_MSI_H */