blob: a8e8a68f076fbeb7820a0e34df6aff504913c075 [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.
@available(added=7)
library fuchsia.sysinfo;
using zx;
const BOARD_NAME_LEN uint8 = 32;
const BOOTLOADER_VENDOR_LEN uint8 = 32;
type InterruptControllerType = strict enum {
UNKNOWN = 0;
APIC = 1;
GIC_V2 = 2;
GIC_V3 = 3;
};
type InterruptControllerInfo = struct {
type InterruptControllerType;
};
@discoverable
@for_deprecated_c_bindings
protocol SysInfo {
/// Return the board name for the platform we are running on.
GetBoardName() -> (struct {
status zx.status;
name string:<BOARD_NAME_LEN, optional>;
});
// TODO (nealo): Remove Transitional qualifier after all board bootloaders
// provide board serial number, mac address and revision.
/// Return the board revision for the board we are running on.
@transitional("Adding Board Revision")
GetBoardRevision() -> (struct {
status zx.status;
revision uint32;
});
/// Return the bootloader vendor for the platform we are running on.
GetBootloaderVendor() -> (struct {
status zx.status;
vendor string:<BOOTLOADER_VENDOR_LEN, optional>;
});
/// Return interrupt controller information.
GetInterruptControllerInfo() -> (struct {
status zx.status;
info box<InterruptControllerInfo>;
});
};