blob: f4ee4251eb871d5fe449bcea8289d003596192df [file] [log] [blame]
// Copyright 2021 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 fuchsia.acpi.chromeos;
using zx;
/// Maximum length of the HWID.
const MAX_HWID_LEN uint32 = 256;
/// Maximum length of a firmware version.
const MAX_FW_VERSION_LEN uint32 = 256;
/// Firmware boot slot.
type BootSlot = flexible enum {
/// R/O recovery firmware.
RECOVERY = 0;
/// Slot A.
A = 1;
/// Slot B.
B = 2;
};
closed protocol Device {
/// Get the ChromeOS HWID for this device, which identifies a device's model
/// and configuration.
strict GetHardwareId() -> (struct {
hwid string:MAX_HWID_LEN;
}) error zx.Status;
/// Get the version of the active RW firmware.
strict GetRwFirmwareVersion() -> (struct {
version string:MAX_FW_VERSION_LEN;
}) error zx.Status;
/// Get the version of the RO firmware.
strict GetRoFirmwareVersion() -> (struct {
version string:MAX_FW_VERSION_LEN;
}) error zx.Status;
/// Get the offset and size of the VBoot configuration in the CMOS nvram.
strict GetNvramMetadataLocation() -> (struct {
offset uint32;
size uint32;
}) error zx.Status;
/// Get the address of the flashmap in physical memory.
strict GetFlashmapAddress() -> (struct {
address uint64;
}) error zx.Status;
/// Get the nvdata version.
strict GetNvdataVersion() -> (struct {
version uint32;
}) error zx.Status;
/// Get the currently booted firmware slot.
strict GetActiveApFirmware() -> (struct {
slot BootSlot;
}) error zx.Status;
};