blob: e652968d584d664e75d86ce2c61067bee9bd1834 [file] [log] [blame]
Simon Glass89b7c442021-12-01 09:03:07 -07001.. SPDX-License-Identifier: GPL-2.0+:
2
Heinrich Schuchardt1b0c3162024-01-14 14:53:13 +01003.. index::
4 single: acpi (command)
5
Simon Glass89b7c442021-12-01 09:03:07 -07006acpi command
7============
8
Heinrich Schuchardt44b09b32024-03-16 11:09:36 +01009Synopsis
10--------
Simon Glass89b7c442021-12-01 09:03:07 -070011
12::
13
Simon Glass654c7622025-03-15 14:26:05 +000014 acpi list [-c]
Simon Glass89b7c442021-12-01 09:03:07 -070015 acpi items [-d]
16 acpi dump <name>
Simon Glass2b943422023-07-15 21:38:45 -060017 acpi set <address>
Simon Glass89b7c442021-12-01 09:03:07 -070018
19Description
20-----------
21
Simon Glass2b943422023-07-15 21:38:45 -060022The *acpi* command is used to dump the ACPI tables generated by U-Boot for
23passing to the operating systems. It allows manually setting the address to take
24a look at existing ACPI tables.
Simon Glass89b7c442021-12-01 09:03:07 -070025
26ACPI tables can be generated by various output functions and even devices can
27output material to include in the Differentiated System Description Table (DSDT)
28and SSDT tables (Secondary System Description Table). U-Boot keeps track of
29which device or table-writer produced each piece of the ACPI tables.
30
31The ACPI tables are stored contiguously in memory.
32
33
34acpi list
35~~~~~~~~~
36
37List the ACPI tables that have been generated. Each table has a 4-character
38table name (e.g. SSDT, FACS) and has a format defined by the
39`ACPI specification`_.
40
Simon Glass654c7622025-03-15 14:26:05 +000041The `-c` flag tells U-Boot to verify the checksums and print 'OK' or 'BAD' next
42to each table.
43
Simon Glass89b7c442021-12-01 09:03:07 -070044U-Boot does not currently support decoding the tables. Unlike devicetree, ACPI
45tables have no regular schema and also some include bytecode, so decoding the
46tables requires a lot of code.
47
48The table shows the following information:
49
50Name
51 Table name, e.g. `MCFG`
52
53Base
54 Base address of table in memory
55
56Size
57 Size of table in bytes
58
59Detail
60 More information depending on the table type
61
62 Revision
63 Table revision number (two decimal digits)
64
65 OEM ID
66 ID for the Original Equipment Manufacturer. Typically this is "U-BOOT".
67
68 OEM Table ID
69 Table ID for the Original Equipment Manufacturer. Typically this is
70 "U-BOOTBL" (U-Boot bootloader)
71
72 OEM Revision
73 Revision string for the Original Equipment Manufacturer. Typically this
74 is the U-Boot release number, e.g. 20220101 (meaning v2022.01 since the
75 final 01 is not used). For DSDT, this is set by the source code in
76 the parameters of DefinitionBlock().
77
78 ACPI compiler-vendor ID
79 This is normally `INTL` for Intel
80
81 ACPI compiler revision
82 This is the compiler revision. It is set to the version string for the
83 DSDT table but other tables just use the value 0 or 1, since U-Boot does
84 not actually use the compiler in these cases. It generates the code
85 itself.
86
87acpi items
88~~~~~~~~~~
89
90List the ACPI data that was generated, broken down by item. An item is either
91an ACPI table generated by a writer function, or the part of a table that was
92generated by a particular device.
93
94The `-d` flag also shows a binary dump of the table.
95
96The table shows the following information about each item:
97
98Seq
99 Sequence number in hex
100
101Type
102 Type of item
103
104 ===== ============================================================
105 Type Meaning
106 ===== ============================================================
107 dsdt Fragment of a DSDT table, as generated by a device
108 ssdt Fragment of a SSDT table, as generated by a device
109 other A whole table of a particular type. as generated by a writer
110 ===== ============================================================
111
112Base
113 Base address of table in memory
114
115Size
116 Size of table in bytes
117
118Device / Writer
119 Name of device (for ssdt/dsdt) that wrong this fragment of the table, or
120 name of the registered writer function (otherwise) that wrote the table.
121
122acpi dump
123~~~~~~~~~
124
125Dump a paticular ACPI table in binary format. This can be used to read the table
126if you have the specification handy.
127
128
129Example
130-------
131
132::
133
134 => acpi list
135 Name Base Size Detail
136 ---- -------- ----- ------
137 RSDP 79925000 24 v02 U-BOOT
138 RSDT 79925030 48 v01 U-BOOT U-BOOTBL 20220101 INTL 0
139 XSDT 799250e0 6c v01 U-BOOT U-BOOTBL 20220101 INTL 0
140 FACP 79929570 f4 v04 U-BOOT U-BOOTBL 20220101 INTL 1
141 DSDT 79925280 32ea v02 U-BOOT U-BOOTBL 20110725 INTL 20180105
142 FACS 79925240 40
143 MCFG 79929670 2c v01 U-BOOT U-BOOTBL 20220101 INTL 0
144 SPCR 799296a0 50 v02 U-BOOT U-BOOTBL 20220101 INTL 0
145 TPM2 799296f0 4c v04 U-BOOT U-BOOTBL 20220101 INTL 0
146 APIC 79929740 6c v02 U-BOOT U-BOOTBL 20220101 INTL 0
147 SSDT 799297b0 1523 v02 U-BOOT U-BOOTBL 20220101 INTL 1
148 NHLT 7992ace0 e60 v05 coral coral 3 INTL 0
149 DBG2 7992db40 61 v00 U-BOOT U-BOOTBL 20220101 INTL 0
150 HPET 7992dbb0 38 v01 U-BOOT U-BOOTBL 20220101 INTL 0
151 => acpi items
152 Seq Type Base Size Device/Writer
153 --- ----- -------- ---- -------------
154 0 other 79925000 240 0base
155 1 other 79925240 40 1facs
156 2 dsdt 799252a4 58 board
157 3 dsdt 799252fc 10 lpc
158 4 other 79925280 32f0 3dsdt
159 5 other 79928570 1000 4gnvs
160 6 other 79929570 100 5fact
161 7 other 79929670 30 5mcfg
162 8 other 799296a0 50 5spcr
163 9 other 799296f0 50 5tpm2
164 a other 79929740 70 5x86
165 b ssdt 799297d4 fe maxim-codec
166 c ssdt 799298d2 28 i2c2@16,0
167 d ssdt 799298fa 270 da-codec
168 e ssdt 79929b6a 28 i2c2@16,1
169 f ssdt 79929b92 28 i2c2@16,2
170 10 ssdt 79929bba 83 tpm@50
171 11 ssdt 79929c3d 28 i2c2@16,3
172 12 ssdt 79929c65 282 elan-touchscreen@10
173 13 ssdt 79929ee7 285 raydium-touchscreen@39
174 14 ssdt 7992a16c 28 i2c2@17,0
175 15 ssdt 7992a194 d8 elan-touchpad@15
176 16 ssdt 7992a26c 163 synaptics-touchpad@2c
177 17 ssdt 7992a3cf 28 i2c2@17,1
178 18 ssdt 7992a3f7 111 wacom-digitizer@9
179 19 ssdt 7992a508 8f sdmmc@1b,0
180 1a ssdt 7992a597 4b wifi
181 1b ssdt 7992a5e2 1a0 cpu@0
182 1c ssdt 7992a782 1a0 cpu@1
183 1d ssdt 7992a922 1a0 cpu@2
184 1e ssdt 7992aac2 211 cpu@3
185 1f other 799297b0 1530 6ssdt
186 20 other 7992ace0 2f10 8dev
187 => acpi dump mcfg
188 MCFG @ 79929670
189 00000000: 4d 43 46 47 2c 00 00 00 01 41 55 2d 42 4f 4f 54 MCFG,....AU-BOOT
190 00000010: 55 2d 42 4f 4f 54 42 4c 01 01 22 20 49 4e 54 4c U-BOOTBL.." INTL
191 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 ............
192 => acpi items -d
193 Seq Type Base Size Device/Writer
194 --- ----- -------- ---- -------------
195 0 other 79925000 240 0base
196 00000000: 52 53 44 20 50 54 52 20 9e 55 2d 42 4f 4f 54 02 RSD PTR .U-BOOT.
197 00000010: 30 50 92 79 24 00 00 00 e0 50 92 79 00 00 00 00 0P.y$....P.y....
198 00000020: a1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
199 00000030: 52 53 44 54 48 00 00 00 01 8b 55 2d 42 4f 4f 54 RSDTH.....U-BOOT
200 00000040: 55 2d 42 4f 4f 54 42 4c 01 01 22 20 49 4e 54 4c U-BOOTBL.." INTL
201 00000050: 00 00 00 00 70 95 92 79 70 96 92 79 a0 96 92 79 ....p..yp..y...y
202 00000060: f0 96 92 79 40 97 92 79 b0 97 92 79 e0 ac 92 79 ...y@..y...y...y
203 00000070: 40 db 92 79 b0 db 92 79 00 00 00 00 00 00 00 00 @..y...y........
204 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
205 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
206 000000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
207 000000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
208 000000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
209 000000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
210 000000e0: 58 53 44 54 6c 00 00 00 01 61 55 2d 42 4f 4f 54 XSDTl....aU-BOOT
211 000000f0: 55 2d 42 4f 4f 54 42 4c 01 01 22 20 49 4e 54 4c U-BOOTBL.." INTL
212 00000100: 00 00 00 00 70 95 92 79 00 00 00 00 70 96 92 79 ....p..y....p..y
213 00000110: 00 00 00 00 a0 96 92 79 00 00 00 00 f0 96 92 79 .......y.......y
214 00000120: 00 00 00 00 40 97 92 79 00 00 00 00 b0 97 92 79 ....@..y.......y
215 00000130: 00 00 00 00 e0 ac 92 79 00 00 00 00 40 db 92 79 .......y....@..y
216 00000140: 00 00 00 00 b0 db 92 79 00 00 00 00 00 00 00 00 .......y........
217 00000150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
218 00000160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
219 ...
220
221 1 other 79925240 40 1facs
222 00000000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00 FACS@...........
223 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
224 00000020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
225 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
226
227 2 dsdt 799252a4 58 board
228 00000000: 10 87 05 00 5c 00 08 4f 49 50 47 12 8c 04 00 03 ....\..OIPG.....
229 00000010: 12 8b 01 00 04 01 01 0e ff ff ff ff ff ff ff ff ................
230 00000020: 0d 49 4e 54 33 34 35 32 3a 30 31 00 12 85 01 00 .INT3452:01.....
231 00000030: 04 0a 03 01 0a 23 0d 49 4e 54 33 34 35 32 3a 30 .....#.INT3452:0
232 00000040: 31 00 12 85 01 00 04 0a 04 01 0a 0a 0d 49 4e 54 1............INT
233 00000050: 33 34 35 32 3a 30 30 00 3452:00.
234
235 3 dsdt 799252fc 10 lpc
236 00000000: 10 8f 00 00 5c 00 08 4e 56 53 41 0c 10 50 93 79 ....\..NVSA..P.y
237
238 4 other 79925280 32f0 3dsdt
239 00000000: 44 53 44 54 ea 32 00 00 02 eb 55 2d 42 4f 4f 54 DSDT.2....U-BOOT
240 00000010: 55 2d 42 4f 4f 54 42 4c 25 07 11 20 49 4e 54 4c U-BOOTBL%.. INTL
241
Simon Glass2b943422023-07-15 21:38:45 -0600242This shows searching for tables in a known area of memory, then setting the
243pointer::
244
245 => acpi list
246 No ACPI tables present
247 => ms.s bff00000 80000 "RSD PTR"
248 bff75000: 52 53 44 20 50 54 52 20 cf 42 4f 43 48 53 20 00 RSD PTR .BOCHS .
249 1 match
250 => acpi set bff75000
251 Setting ACPI pointer to bff75000
252 => acpi list
253 Name Base Size Detail
254 ---- -------- ----- ------
255 RSDP bff75000 0 v00 BOCHS
256 RSDT bff76a63 38 v01 BOCHS BXPC 1 BXPC 1
257 FACP bff768ff 74 v01 BOCHS BXPC 1 BXPC 1
258 DSDT bff75080 187f v01 BOCHS BXPC 1 BXPC 1
259 FACS bff75040 40
260 APIC bff76973 90 v01 BOCHS BXPC 1 BXPC 1
261 HPET bff76a03 38 v01 BOCHS BXPC 1 BXPC 1
262 WAET bff76a3b 28 v01 BOCHS BXPC 1 BXPC 1
263 SSDT bff95040 c5 v02 COREv4 COREBOOT 2a CORE 20221020
264
Simon Glass654c7622025-03-15 14:26:05 +0000265This shows checking that the checksums are correct for each table::
266
267 => acpi list -c
268 Name Base Size Detail
269 ---- ---------------- ----- ----------------------------
270 RSDP bec9a000 24 v00 BOCHS OK OK
271 RSDT bec9bd4a 38 v01 BOCHS BXPC 1 BXPC 1 OK
272 FACP bec9bb46 74 v01 BOCHS BXPC 1 BXPC 1 OK
273 DSDT bec9a080 1ac6 v01 BOCHS BXPC 1 BXPC 1 OK
274 FACS bec9a040 40
275 APIC bec9bbba 78 v03 BOCHS BXPC 1 BXPC 1 OK
276 HPET bec9bc32 38 v01 BOCHS BXPC 1 BXPC 1 OK
277 SRAT bec9bc6a b8 v01 BOCHS BXPC 1 BXPC 1 OK
278 WAET bec9bd22 28 v01 BOCHS BXPC 1 BXPC 1 OK
279
Simon Glass89b7c442021-12-01 09:03:07 -0700280
281.. _`ACPI specification`: https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf