xref: /openbmc/qemu/qapi/acpi.json (revision a6caeee8)
1# -*- Mode: Python -*-
2# vim: filetype=python
3#
4# This work is licensed under the terms of the GNU GPL, version 2 or later.
5# See the COPYING file in the top-level directory.
6# SPDX-License-Identifier: GPL-2.0-or-later
7
8##
9# = ACPI
10##
11
12##
13# @AcpiTableOptions:
14#
15# Specify an ACPI table on the command line to load.
16#
17# At most one of @file and @data can be specified. The list of files specified
18# by any one of them is loaded and concatenated in order. If both are omitted,
19# @data is implied.
20#
21# Other fields / optargs can be used to override fields of the generic ACPI
22# table header; refer to the ACPI specification 5.0, section 5.2.6 System
23# Description Table Header. If a header field is not overridden, then the
24# corresponding value from the concatenated blob is used (in case of @file), or
25# it is filled in with a hard-coded value (in case of @data).
26#
27# String fields are copied into the matching ACPI member from lowest address
28# upwards, and silently truncated / NUL-padded to length.
29#
30# @sig: table signature / identifier (4 bytes)
31#
32# @rev: table revision number (dependent on signature, 1 byte)
33#
34# @oem_id: OEM identifier (6 bytes)
35#
36# @oem_table_id: OEM table identifier (8 bytes)
37#
38# @oem_rev: OEM-supplied revision number (4 bytes)
39#
40# @asl_compiler_id: identifier of the utility that created the table
41#                   (4 bytes)
42#
43# @asl_compiler_rev: revision number of the utility that created the
44#                    table (4 bytes)
45#
46# @file: colon (:) separated list of pathnames to load and
47#        concatenate as table data. The resultant binary blob is expected to
48#        have an ACPI table header. At least one file is required. This field
49#        excludes @data.
50#
51# @data: colon (:) separated list of pathnames to load and
52#        concatenate as table data. The resultant binary blob must not have an
53#        ACPI table header. At least one file is required. This field excludes
54#        @file.
55#
56# Since: 1.5
57##
58{ 'struct': 'AcpiTableOptions',
59  'data': {
60    '*sig':               'str',
61    '*rev':               'uint8',
62    '*oem_id':            'str',
63    '*oem_table_id':      'str',
64    '*oem_rev':           'uint32',
65    '*asl_compiler_id':   'str',
66    '*asl_compiler_rev':  'uint32',
67    '*file':              'str',
68    '*data':              'str' }}
69
70##
71# @ACPISlotType:
72#
73# @DIMM: memory slot
74# @CPU: logical CPU slot (since 2.7)
75##
76{ 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
77
78##
79# @ACPIOSTInfo:
80#
81# OSPM Status Indication for a device
82# For description of possible values of @source and @status fields
83# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
84#
85# @device: device ID associated with slot
86#
87# @slot: slot ID, unique per slot of a given @slot-type
88#
89# @slot-type: type of the slot
90#
91# @source: an integer containing the source event
92#
93# @status: an integer containing the status code
94#
95# Since: 2.1
96##
97{ 'struct': 'ACPIOSTInfo',
98  'data'  : { '*device': 'str',
99              'slot': 'str',
100              'slot-type': 'ACPISlotType',
101              'source': 'int',
102              'status': 'int' } }
103
104##
105# @query-acpi-ospm-status:
106#
107# Return a list of ACPIOSTInfo for devices that support status
108# reporting via ACPI _OST method.
109#
110# Since: 2.1
111#
112# Example:
113#
114# -> { "execute": "query-acpi-ospm-status" }
115# <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
116#                  { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
117#                  { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
118#                  { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
119#    ]}
120#
121##
122{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
123
124##
125# @ACPI_DEVICE_OST:
126#
127# Emitted when guest executes ACPI _OST method.
128#
129# @info: OSPM Status Indication
130#
131# Since: 2.1
132#
133# Example:
134#
135# <- { "event": "ACPI_DEVICE_OST",
136#      "data": { "info": { "device": "d1", "slot": "0",
137#                          "slot-type": "DIMM", "source": 1, "status": 0 } },
138#      "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
139#
140##
141{ 'event': 'ACPI_DEVICE_OST',
142     'data': { 'info': 'ACPIOSTInfo' } }
143