blob: 0fd3b31e1b963412219dc4df0104af919afac331 [file] [log] [blame]
// 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.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.sysmem2.SecureMem, which is a protocol that's specific to
/// sysmem<->securemem concerns.
strict RegisterSecureMem(resource struct {
secure_mem_connection client_end:fuchsia.sysmem2.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;
};