blob: 5d6c12fd7c7c60adc2298785f85a8470aa04cd48 [file] [log] [blame] [edit]
// 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;
@available(removed=12)
type InterruptControllerType = strict enum {
UNKNOWN = 0;
APIC = 1;
GIC_V2 = 2;
GIC_V3 = 3;
};
@available(added=12)
type InterruptControllerType = flexible enum {
UNKNOWN = 0;
APIC = 1;
GIC_V2 = 2;
GIC_V3 = 3;
PLIC = 4;
};
type InterruptControllerInfo = struct {
type InterruptControllerType;
};
@discoverable
closed protocol SysInfo {
/// Return the board name for the platform we are running on.
strict 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")
strict GetBoardRevision() -> (struct {
status zx.Status;
revision uint32;
});
/// Return the bootloader vendor for the platform we are running on.
strict GetBootloaderVendor() -> (struct {
status zx.Status;
vendor string:<BOOTLOADER_VENDOR_LEN, optional>;
});
/// Return interrupt controller information.
strict GetInterruptControllerInfo() -> (struct {
status zx.Status;
info box<InterruptControllerInfo>;
});
};