| // Copyright 2020 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library zx; |
| |
| @transport("Syscall") |
| protocol msi { |
| /// Allocate Message-Signaled Interrupts (MSIs). |
| /// Rights: handle must have resource kind ZX_RSRC_KIND_ROOT. |
| msi_allocate(resource struct { |
| handle handle:RESOURCE; |
| count uint32; |
| }) -> (resource struct { |
| status status; |
| out_allocation handle; |
| }); |
| |
| /// Create an Interrupt object from a Messaged-Signaled Interrupt (MSI) allocation. |
| /// Rights: handle must be of type ZX_OBJ_TYPE_MSI. |
| /// Rights: vmo must be of type ZX_OBJ_TYPE_VMO. |
| /// Rights: vmo must have ZX_RIGHT_MAP. |
| msi_create(resource struct { |
| handle handle; |
| options uint32; |
| msi_id uint32; |
| vmo handle:VMO; |
| vmo_offset usize; |
| }) -> (resource struct { |
| status status; |
| out_interrupt handle; |
| }); |
| }; |