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