1# zx_bti_create
2
3## NAME
4
5<!-- Updated by update-docs-from-abigen, do not edit. -->
6
7bti_create - create a new bus transaction initiator
8
9## SYNOPSIS
10
11<!-- Updated by update-docs-from-abigen, do not edit. -->
12
13```
14#include <zircon/syscalls.h>
15
16zx_status_t zx_bti_create(zx_handle_t iommu,
17                          uint32_t options,
18                          uint64_t bti_id,
19                          zx_handle_t* out);
20```
21
22## DESCRIPTION
23
24`zx_bti_create()` creates a new [bus transaction initiator](../objects/bus_transaction_initiator.md)
25given a handle to an IOMMU and a hardware transaction identifier for a device
26downstream of that IOMMU.
27
28*options* must be 0 (reserved for future definition of creation flags).
29
30Upon success a handle for the new BTI is returned.  This handle will have rights
31**ZX_RIGHT_READ**, **ZX_RIGHT_WRITE**, **ZX_RIGHT_MAP**, **ZX_RIGHT_INSPECT**,
32**ZX_RIGHT_DUPLICATE**, and **ZX_RIGHT_TRANSFER**.
33
34## RIGHTS
35
36<!-- Updated by update-docs-from-abigen, do not edit. -->
37
38*iommu* must be of type **ZX_OBJ_TYPE_IOMMU** and have **ZX_RIGHT_NONE**.
39
40## RETURN VALUE
41
42`zx_bti_create()` returns **ZX_OK** and a handle to the new BTI
43(via *out*) on success.  In the event of failure, a negative error value
44is returned.
45
46## ERRORS
47
48**ZX_ERR_BAD_HANDLE**  *iommu* is not a valid handle.
49
50**ZX_ERR_WRONG_TYPE**  *iommu* is not an iommu handle.
51
52**ZX_ERR_ACCESS_DENIED**  *iommu* handle does not have sufficient privileges.
53
54**ZX_ERR_INVALID_ARGS**  *bti_id* is invalid on the given IOMMU,
55*out* is an invalid pointer, or *options* is non-zero.
56
57**ZX_ERR_NO_MEMORY**  Failure due to lack of memory.
58There is no good way for userspace to handle this (unlikely) error.
59In a future build this error will no longer occur.
60
61## SEE ALSO
62
63 - [`zx_bti_pin()`]
64 - [`zx_bti_release_quarantine()`]
65 - [`zx_pmt_unpin()`]
66
67<!-- References updated by update-docs-from-abigen, do not edit. -->
68
69[`zx_bti_pin()`]: bti_pin.md
70[`zx_bti_release_quarantine()`]: bti_release_quarantine.md
71[`zx_pmt_unpin()`]: pmt_unpin.md
72