1// Copyright 2018 The Fuchsia Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5library fuchsia.sysinfo; 6 7using zx; 8 9const uint8 SYSINFO_BOARD_NAME_LEN = 32; 10 11enum InterruptControllerType { 12 UNKNOWN = 0; 13 APIC = 1; 14 GIC_V2 = 2; 15 GIC_V3 = 3; 16}; 17 18struct InterruptControllerInfo { 19 InterruptControllerType type; 20}; 21 22[Layout = "Simple"] 23interface Device { 24 // Return the root job handle. 25 1: GetRootJob() -> (zx.status status, handle<job>? job); 26 27 // Return the root resource (with only ZX_RIGHT_ENUMERATE and ZX_RIGHT_TRANSFER). 28 2: GetRootResource() -> (zx.status status, handle<resource>? resource); 29 30 // Return the hypervisor resource (with only ZX_RIGHT_TRANSFER). 31 3: GetHypervisorResource() -> (zx.status status, handle<resource>? resource); 32 33 // Return the board name for the platform we are running on. 34 4: GetBoardName() -> (zx.status status, string:SYSINFO_BOARD_NAME_LEN? name); 35 36 // Return interrupt controller information. 37 5: GetInterruptControllerInfo() -> (zx.status status, InterruptControllerInfo? info); 38}; 39