blob: e03e76b470303650e084854c93f8f64bf9d80041 [file] [log] [blame]
// Copyright 2018 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.mailbox;
using zx;
// Mailboxes
type MailboxType = strict enum : uint8 {
SCP_SECURE_MAILBOX = 0x0;
SCP_NS_LOW_PRIORITY_MAILBOX = 0x1;
SCP_NS_HIGH_PRIORITY_MAILBOX = 0x2;
AP_SECURE_MAILBOX = 0x3;
AP_NS_LOW_PRIORITY_MAILBOX = 0x4;
AP_NS_HIGH_PRIORITY_MAILBOX = 0x5;
INVALID_MAILBOX = 0x6;
};
type MailboxDataBuf = struct {
cmd uint32;
@buffer
tx vector<uint8>:MAX;
};
type MailboxChannel = struct {
mailbox MailboxType;
@buffer
rx vector<uint8>:MAX;
};
@transport("Banjo")
@banjo_layout("ddk-protocol")
closed protocol Mailbox {
strict SendCommand(struct {
channel MailboxChannel;
mdata MailboxDataBuf;
}) -> (struct {
s zx.Status;
});
};