blob: a4b2a439f0efa95f45cbf99ad9468cef856942a3 [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.acpi;
using zx;
struct AcpiMmio {
/// Offset from beginning of VMO where the mmio region begins.
zx.off offset;
/// Size of mmio region.
usize size;
handle<vmo> vmo;
};
[Layout = "ddk-protocol"]
protocol Acpi {
GetPio(uint32 index) -> (zx.status s, handle<resource> pio);
GetMmio(uint32 index) -> (zx.status s, AcpiMmio mmio);
MapInterrupt(int64 index) -> (zx.status s, handle<interrupt> @handle);
GetBti(uint32 bdf, uint32 index) -> (zx.status s, handle<bti> bti);
ConnectSysmem(handle<channel> connection) -> (zx.status s);
RegisterSysmemHeap(uint64 heap, handle<channel> connection) -> (zx.status s);
};
/// A generic ACPI device. This will allow devices to query information directly
/// from ACPI, removing the need for them to be implemented directly in the
/// board driver.
[Layout = "ddk-protocol"]
protocol AcpiDevice {
/// For now, this has a single stub method, since banjo protocols require
/// at least one method, but we will add methods as the requirements become
/// clearer.
Stub() -> ();
};