Create a new IOMMU object in the kernel.
#include <zircon/syscalls.h> zx_status_t zx_iommu_create(zx_handle_t resource, uint32_t type, const void* desc, size_t desc_size, zx_handle_t* out);
zx_iommu_create() creates a new object in the kernel representing an IOMMU device.
The value of type determines the interpretation of desc. See below for details about the values of type.
Upon success, a handle for the new IOMMU is returned. This handle will have rights ZX_RIGHT_DUPLICATE and ZX_RIGHT_TRANSFER.
type = ZX_IOMMU_TYPE_DUMMY
This type represents a no-op IOMMU. It provides no hardware-level protections against unauthorized access to memory. It does allow pinning of physical memory pages, to prevent the reuse of a page until the driver using the page says it is done with it.
desc must be a valid pointer to a value of type
desc_size must be
resource must have resource kind ZX_RSRC_KIND_ROOT.
zx_iommu_create() returns ZX_OK and a handle to the new IOMMU
(via out) on success. In the event of failure, a negative error value
ZX_ERR_BAD_HANDLE resource is not a valid handle.
ZX_ERR_WRONG_TYPE resource is not a resource handle.
ZX_ERR_ACCESS_DENIED resource handle does not have sufficient privileges.
ZX_ERR_NOT_SUPPORTED type is not a defined value or is not supported on this system.
ZX_ERR_INVALID_ARGS desc_size is larger than ZX_IOMMU_MAX_DESC_LEN, desc is an invalid pointer, out is an invalid pointer, or the contents of desc are not valid for the given type.
ZX_ERR_NO_MEMORY Failure due to lack of memory. There is no good way for userspace to handle this (unlikely) error. In a future build this error will no longer occur.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.