blob: dc135c79337d890a4fe368f259f586ed7a233658 [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 ddk.protocol.platform.proxy;
using zx;
const uint32 PLATFORM_PROXY_MAX_DATA = 4096;
/// Header for RPC requests.
struct PlatformProxyReq {
uint32 txid;
uint32 device_id;
uint32 proto_id;
uint32 op;
};
/// Header for RPC responses.
struct PlatformProxyRsp {
uint32 txid;
zx.status status;
};
[Layout = "ddk-protocol"]
interface PlatformProxy {
/// Used by protocol client drivers to register their local protocol implementation
/// with the platform proxy driver.
RegisterProtocol(uint32 proto_id, vector<voidptr> protocol) -> (zx.status s);
/// Used by protocol client drivers to proxy a protocol call to the protocol implementation
/// driver in the platform bus driver's devhost.
Proxy(vector<voidptr> req, vector<handle> req_handle) -> (zx.status s, vector<voidptr> resp,
vector<handle> resp_handle);
};