Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.acpi

PROTOCOLS

Acpi

Defined in fuchsia.hardware.acpi/acpi.fidl

ConnectServer

Tells the ACPI driver to start listening for fuchsia.hardware.acpi messages on server. See //sdk/fidl/fuchsia.hardware.acpi/device.fidl.

Request

NameType
server handle<channel>

Response

NameType

ConnectSysmem

Request

NameType
connection handle<channel>

Response

NameType
s zx/status

GetBti

Request

NameType
bdf uint32
index uint32

Response

NameType
s zx/status
bti handle<bti>

GetMmio

Request

NameType
index uint32

Response

NameType
s zx/status
mmio AcpiMmio

GetPio

Request

NameType
index uint32

Response

NameType
s zx/status
pio handle<resource>

RegisterSysmemHeap

Request

NameType
heap uint64
connection handle<channel>

Response

NameType
s zx/status

Acpi

Defined in fuchsia.hardware.acpi/acpi.fidl

Defines access to raw system ACPI data.

This interface is intended only for low-level debugging tools.

ListTableEntries

Return the list of ACPI tables present in the system.

Request

NameType

Response

NameType
result Acpi_ListTableEntries_Result

ReadNamedTable

Write the raw content of the named ACPI table into the given VMO.

Some systems may have multiple ACPI tables with the same name ("SSDT" is a commonly repeated table, for example). |instance| is used to specify which instance of the named table to return. A value of |n| returns the |n|'th occurence. If only one table with the given name is present, |instance| should be 0.

On success, returns the number of bytes written into result.

Request

NameType
name AcpiTableSignature
instance uint32
result handle<vmo>

Response

NameType
result Acpi_ReadNamedTable_Result

AcpiDevice

Defined in fuchsia.hardware.acpi/acpi.fidl

A generic ACPI device. This will allow devices to query information directly from ACPI, removing the need for them to be implemented directly in the board driver.

Stub

For now, this has a single stub method, since banjo protocols require at least one method, but we will add methods as the requirements become clearer.

Request

NameType

Response

NameType

Device

Defined in fuchsia.hardware.acpi/device.fidl

Provides access to an ACPI device.

EvaluateObject

Evaluate the object at the given |path|, relative to this device, with |parameters| as arguments. |mode| determines how the return value is treated. Paths cannot be absolute, and must only refer to children of this device. |result| is the result of the evaluation. See |fuchsia.acpi/EncodedObject| for more information.

Request

NameType
path string
mode EvaluateObjectMode
parameters vector<Object>[7]?

Response

NameType
result Device_EvaluateObject_Result

GetBusId

If ACPI has determined this device is a bus, returns the bus ID. Otherwise returns ZX_ERR_BAD_STATE.

Request

NameType

Response

NameType
result Device_GetBusId_Result

MapInterrupt

Get the "index"th interrupt for this device.

Request

NameType
index uint64

Response

NameType
result Device_MapInterrupt_Result

STRUCTS

AcpiMmio resource

Defined in fuchsia.hardware.acpi/acpi.fidl

NameTypeDescriptionDefault
offset zx/off

Offset from beginning of VMO where the mmio region begins.

No default
size uint64

Size of mmio region.

No default
vmo handle<vmo> No default

Acpi_ListTableEntries_Response

Defined in fuchsia.hardware.acpi/acpi.fidl

NameTypeDescriptionDefault
entries vector<TableInfo>[512] No default

Acpi_ReadNamedTable_Response

Defined in fuchsia.hardware.acpi/acpi.fidl

NameTypeDescriptionDefault
size uint32 No default

Device_EvaluateObject_Response resource

Defined in fuchsia.hardware.acpi/device.fidl

NameTypeDescriptionDefault
result EncodedObject No default

Device_GetBusId_Response

Defined in fuchsia.hardware.acpi/device.fidl

NameTypeDescriptionDefault
bus_id uint32 No default

Device_MapInterrupt_Response resource

Defined in fuchsia.hardware.acpi/device.fidl

NameTypeDescriptionDefault
irq handle<interrupt> No default

Handle

Defined in fuchsia.hardware.acpi/device.fidl

A handle to an arbitrary path in the ACPI tree.

NameTypeDescriptionDefault
object_type ObjectType

Type of the object this handle refers to.

No default
path string

Relative path to the object this handle refers to.

No default

ObjectList

Defined in fuchsia.hardware.acpi/device.fidl

NameTypeDescriptionDefault
value vector<Object>? No default

PowerResource

Defined in fuchsia.hardware.acpi/device.fidl

Represents a PowerResource.

NameTypeDescriptionDefault
system_level uint32

Deepest system sleep level that must be maintained to keep this resource on.

No default
resource_order uint32

Resource order that this power resource belongs to.

No default

Processor

Defined in fuchsia.hardware.acpi/device.fidl

Represents a Processor declaration.

NameTypeDescriptionDefault
id uint32 No default
pblk_address uint64 No default
pblk_length uint32 No default

TableInfo

Defined in fuchsia.hardware.acpi/acpi.fidl

Metadata about an ACPI table entry.

NameTypeDescriptionDefault
name AcpiTableSignature

Name of the table. There may be multiple tables with the same name.

No default
size uint32

The size of the table, in bytes.

No default

ENUMS

EvaluateObjectMode flexible

Type: uint32

Defined in fuchsia.hardware.acpi/device.fidl

Type that should be returned by |Device.EvaluateObject|.

NameValueDescription
PLAIN_OBJECT 0

Return an Object.

PARSE_RESOURCES 1

Treat the returned buffer as a resource template. Parse it and return any resources that are found.

ObjectType flexible

Type: uint32

Defined in fuchsia.hardware.acpi/device.fidl

ACPI Object Types. See ACPI spec v6.4, 19.6.96 - ObjectType (Get Object Type).

NameValueDescription
ANY 0
INTEGER 1
STRING 2
BUFFER 3
PACKAGE 4
FIELD_UNIT 5
DEVICE 6
EVENT 7
METHOD 8
MUTEX 9
OPERATION_REGION 10
POWER_RESOURCE 11
THERMAL_ZONE 13
BUFFER_FIELD 14
DEBUG_OBJECT 16

Status flexible

Type: uint32

Defined in fuchsia.hardware.acpi/device.fidl

ACPI status codes.

NameValueDescription
OK 0

Success.

ERROR 1

Unknown error occurred.

NO_ACPI_TABLES 2

Couldn't find ACPI tables.

NO_NAMESPACE 3

No namespace loaded.

NO_MEMORY 4

Ran out of memory.

NOT_FOUND 5

Requested entity not found.

NOT_EXIST 6

Required entity does not exist.

ALREADY_EXISTS 7

Entity already exists.

TYPE 8

Incorrect object type.

NULL_OBJECT 9

Required object is missing.

NULL_ENTRY 10

Requested object does not exist.

BUFFER_OVERFLOW 11

Provided buffer was too small.

STACK_OVERFLOW 12

Internal stack overflow.

STACK_UNDERFLOW 13

Internal stack underflow.

NOT_IMPLEMENTED 14

Not implemented.

NOT_SUPPORTED 15

Not supported.

LIMIT 16

A predefined limit was exceeded.

TIME 17

A timeout expired.

ACQUIRE_DEADLOCK 18

A mutex was acquired in improper order.

RELEASE_DEADLOCK 19

A mutex was released in improper order.

NOT_ACQUIRED 20

Attempted to release a mutex without acquiring it.

ALREADY_ACQUIRED 21

Attempted to acquire a mutex twice.

NO_HARDWARE_RESPONSE 22

Hardware did not respond to an I/O operation.

NO_GLOBAL_LOCK 23

There is no global lock.

ABORT_METHOD 24

A control method was aborted.

SAME_HANDLER 25

Attempt was made to install a handler that is already installed.

NO_HANDLER 26

A handler for this operation is not installed.

OWNER_ID_LIMIT 27

There are no more Owner IDs available for ACPI tables or control methods.

NOT_CONFIGURED 28

The interface is not part of the current subsystem configuration.

ACCESS 29

Permission denied for the requested operation.

IO_ERROR 30

An I/O error occurred.

NUMERIC_OVERFLOW 31

Overflow during string-to-integer conversion.

HEX_OVERFLOW 32

Overflow during ASCII hex-to-binary conversion.

DECIMAL_OVERFLOW 33

Overflow during ASCII decimal-to-binary conversion.

OCTAL_OVERFLOW 34

Overflow during ASCII octal-to-binary conversion.

END_OF_TABLE 35

Reached the end of the table.

BAD_PARAMETER 4097

Invalid paramter supplied.

BAD_CHARACTER 4098

Invalid character in a name.

BAD_PATHNAME 4099

Invalid character in a pathname.

BAD_DATA 4100

Package or buffer contained incorrect data.

BAD_HEX_CONSTANT 4101

Invalid character in a hex constant.

BAD_OCTAL_CONSTANT 4102

Invalid character in an octal constant.

BAD_DECIMAL_CONSTANT 4103

Invalid character in a decimal constant.

MISSING_ARGUMENTS 4104

Too few arguments passed to a method.

BAD_ADDRESS 4105

Illegal null I/O addres.

BAD_TABLE_SIGNATURE 8193

Bad ACPI table signature.

BAD_TABLE_HEADER 8194

Invalid field in ACPI table header.

BAD_TABLE_CHECKSUM 8195

ACPI table checksum is incorrect.

BAD_TABLE_VALUE 8196

Invalid value found in an ACPI table.

INVALID_TABLE_LENGTH 8197

The FADT or FACS has an improper length.

AML_BAD_OPCODE 12289

Invalid AML opcode.

AML_NO_OPERAND 12290

Missing operand.

AML_OPERAND_TYPE 12291

Operand has incorrect type.

AML_OPERAND_VALUE 12292

Operand has inappropriate or invalid value.

AML_UNINITIALIZED_LOCAL 12293

Method tried to use uninitialized local variable.

AML_UNINITIALIZED_ARG 12294

Method tried to use uninitialized argument.

AML_UNINITIALIZED_ELEMENT 12295

Method tried to use an empty package element.

AML_NUMERIC_OVERFLOW 12296

Overflow during numeric conversion.

AML_REGION_LIMIT 12297

Tried to access beyond the end of an Operation Region.

AML_BUFFER_LIMIT 12298

Tried to access beyond the end of a buffer.

AML_PACKAGE_LIMIT 12299

Tried to access beyond the end of a package.

AML_DIVIDE_BY_ZERO 12300

Tried to divide by zero.

AML_BAD_NAME 12301

ACPI name contains invalid characters.

AML_NAME_NOT_FOUND 12302

Couldn't resolve a reference.

AML_INTERNAL 12303

Internal error within the AML interpreter.

AML_INVALID_SPACE_ID 12304

Operation Region SpaceID is invalid.

AML_STRING_LIMIT 12305

String is longer than 200 characters.

AML_NO_RETURN_VALUE 12306

Method did not return a required value.

AML_METHOD_LIMIT 12307

Method reached maximum reentrancy limit.

AML_NOT_OWNER 12308

A thread tried to release a mutex it doesn't own.

AML_MUTEX_ORDER 12309

Mutex SyncLevel release mismatch.

AML_MUTEX_NOT_ACQUIRED 12310

Attempt to release mutex that was not previously acquired.

AML_INVALID_RESOURCE_TYPE 12311

Invalid resource type in resource list.

AML_INVALID_INDEX 12312

Invalid Argx/Localx (x too large).

AML_REGISTER_LIMIT 12313

Bank value or Index value beyond the range of a register.

AML_NO_WHILE 12314

Break or Continue without a While.

AML_ALIGNMENT 12315

Unaligned memory transfer on platform that doesn't support this.

AML_NO_RESOURCE_END_TAG 12316

No End Tag in a resource list.

AML_BAD_RESOURCE_VALUE 12317

Invalid value in a resource.

AML_CIRCULAR_REFERENCE 12318

Two references refer to each other.

AML_BAD_RESOURCE_LENGTH 12319

The length of a resource descriptor in the AML is incorrect.

AML_ILLEGAL_ADDRESS 12320

A memory, I/O, or PCI configuration address is invalid.

AML_LOOP_TIMEOUT 12321

An AML While loop exceeded the maximum execution time.

AML_UNINITIALIZED_NODE 12322

A namespace node is uninitialized or unresolved.

AML_TARGET_TYPE 12323

A target operand of an incorrect type was encountered.

AML_PROTOCOL 12324

Violation of a fixed ACPI protocol.

AML_BUFFER_LENGTH 12325

The length of the buffer is invalid/incorrect.

UNIONS

Acpi_ListTableEntries_Result strict

Defined in fuchsia.hardware.acpi/acpi.fidl

NameTypeDescription
response Acpi_ListTableEntries_Response
err zx/status

Acpi_ReadNamedTable_Result strict

Defined in fuchsia.hardware.acpi/acpi.fidl

NameTypeDescription
response Acpi_ReadNamedTable_Response
err zx/status

Device_EvaluateObject_Result strict resource

Defined in fuchsia.hardware.acpi/device.fidl

NameTypeDescription
response Device_EvaluateObject_Response
err Status

Device_GetBusId_Result strict

Defined in fuchsia.hardware.acpi/device.fidl

NameTypeDescription
response Device_GetBusId_Response
err zx/status

Device_MapInterrupt_Result strict resource

Defined in fuchsia.hardware.acpi/device.fidl

NameTypeDescription
response Device_MapInterrupt_Response
err zx/status

EncodedObject flexible resource

Defined in fuchsia.hardware.acpi/device.fidl

This type will eventually include resource types returned by passing EvaluteObjectMode.PARSE_RESOURCES to Device.EvaluteObject().

NameTypeDescription
object Object

Object flexible

Defined in fuchsia.hardware.acpi/device.fidl

Represents an object passed to or returned by fuchsia.hardware.acpi/Device.EvaluateMethod().

NameTypeDescription
integer_val uint64
string_val string
buffer_val vector<uint8>
package_val ObjectList
reference_val Handle
processor_val Processor
power_resource_val PowerResource

CONSTANTS

NameValueTypeDescription
MAX_ACPI_TABLE_ENTRIES 512 uint32
MAX_METHOD_ARG 7 uint32

Maximum number of arguments that can be passed to a method. ACPI Spec 6.4, Section 19.6.84 "Method (Declare Control Method)".

TYPE ALIASES

NameValueDescription
AcpiTableSignature array[4]

An ACPI table name signature. This consists of four ASCII characters.