1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_IOMMU_H
3 #define _ASM_X86_IOMMU_H
5 #include <linux/acpi.h>
7 #include <asm/e820/api.h>
9 extern int force_iommu
, no_iommu
;
10 extern int iommu_detected
;
13 #define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000)
15 static inline int __init
16 arch_rmrr_sanity_check(struct acpi_dmar_reserved_memory
*rmrr
)
18 u64 start
= rmrr
->base_address
;
19 u64 end
= rmrr
->end_address
+ 1;
21 if (e820__mapped_all(start
, end
, E820_TYPE_RESERVED
))
24 pr_err(FW_BUG
"No firmware reserved region can cover this RMRR [%#018Lx-%#018Lx], contact BIOS vendor for fixes\n",
29 #endif /* _ASM_X86_IOMMU_H */