| // Copyright 2022 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 fuchsia.hardware.sysmem; |
| |
| using fuchsia.sysmem; |
| using fuchsia.sysmem2; |
| using zx; |
| |
| /// This interface is for driver-to-driver connection to sysmem. This includes |
| /// both connection to both sysmem/sysmem2 `Allocator`, and special-purpose |
| /// connection for custom heaps and secure memory. |
| @discoverable |
| closed protocol Sysmem { |
| /// Takes the client end of a FIDL connection that'll serve |
| /// fuchsia.sysmem2.Heap. |
| strict RegisterHeap(resource struct { |
| heap uint64; |
| heap_connection client_end:Heap; |
| }); |
| |
| /// Takes the client end of a FIDL connection that'll serve |
| /// fuchsia.sysmem.SecureMem, which is a protocol that's specific to |
| /// sysmem<->securemem concerns. |
| strict RegisterSecureMem(resource struct { |
| secure_mem_connection client_end:fuchsia.sysmem.SecureMem; |
| }); |
| |
| /// Informs sysmem that the channel previously passed to RegisterSecureMem() |
| /// will be closing soon, and that this channel closure should not be |
| /// considered an error. |
| strict UnregisterSecureMem() -> () error zx.Status; |
| }; |
| |
| service Service { |
| sysmem client_end:Sysmem; |
| allocator_v1 client_end:fuchsia.sysmem.Allocator; |
| allocator_v2 client_end:fuchsia.sysmem2.Allocator; |
| }; |