mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
RISC-V IO Mapping Table (RIMT) is a static ACPI table to communicate IOMMU information to the OS. The spec is available at [1]. The changes at high level are, a) Initialize data structures required for IOMMU/device configuration using the data from RIMT. Provide APIs required for device configuration. b) Provide an API for IOMMU drivers to register the fwnode with RIMT data structures. This API will create a fwnode for PCIe IOMMU. [1] - https://github.com/riscv-non-isa/riscv-acpi-rimt Signed-off-by: Sunil V L <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
29 lines
628 B
C
29 lines
628 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2024-2025, Ventana Micro Systems Inc.
|
|
* Author: Sunil V L <[email protected]>
|
|
*/
|
|
|
|
#ifndef _ACPI_RIMT_H
|
|
#define _ACPI_RIMT_H
|
|
|
|
#ifdef CONFIG_ACPI_RIMT
|
|
int rimt_iommu_register(struct device *dev);
|
|
#else
|
|
static inline int rimt_iommu_register(struct device *dev)
|
|
{
|
|
return -ENODEV;
|
|
}
|
|
#endif
|
|
|
|
#if defined(CONFIG_IOMMU_API) && defined(CONFIG_ACPI_RIMT)
|
|
int rimt_iommu_configure_id(struct device *dev, const u32 *id_in);
|
|
#else
|
|
static inline int rimt_iommu_configure_id(struct device *dev, const u32 *id_in)
|
|
{
|
|
return -ENODEV;
|
|
}
|
|
#endif
|
|
|
|
#endif /* _ACPI_RIMT_H */
|