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