blob: 1baabf9d176667942adc984e741e0ca03b16e2ec [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;
@available(added=HEAD)
const SERIAL_NUMBER_LEN uint8 = 32;
type InterruptControllerType = strict(removed=12) flexible(added=12) enum {
UNKNOWN = 0;
APIC = 1;
GIC_V2 = 2;
GIC_V3 = 3;
@available(added=12)
PLIC = 4;
};
type InterruptControllerInfo = struct {
type InterruptControllerType;
};
@discoverable(server="platform")
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>;
});
/// Return the board revision for the board we are running on.
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>;
});
@available(added=HEAD)
strict GetSerialNumber() -> (struct {
serial string:<SERIAL_NUMBER_LEN>;
}) error zx.Status;
};
service Service {
device client_end:SysInfo;
};