DSDT: Difference between revisions

593 bytes added ,  28 days ago
m
no edit summary
[unchecked revision][unchecked revision]
mNo edit summary
 
(14 intermediate revisions by 8 users not shown)
Line 1:
{{ACPI}}
 
''This page is about the ACPI DSDT (Differentiated System Description Table)''
It describes devices (I/O Ports, IRQs, Memory Mappings, etc.).
==DSDT==
===Introduction===
{{stub|section=y}}
DSDT stands for ''Differentiated System Description Table''. It Is a major [[ACPI]] table and is used to describe what peripherals the machine has. Also holds information on PCI IRQ mappings and power management. For example when powering down by the OS, it should find the _S5 object which describes how to do that. It is pointed to by the [[FADT]].
<br />
<br />
As every ACPI table, it has header section and '''should''' be validated ([https://wiki.osdev.org/RSDT#Validating_the_RSDT ACPI table validation]).
===How hardware manufacturers generate it===
You can use an ASL (ACPI Source Language) compiler to generate DSDT AML (ACPI Machine Language) bytecode from a C-like language. To get an idea, take a glimpse on bochsBochs source:
* bios/acpi-dsdt.dsl for human readable source
* bios/acpi-dsdt.hex for hex dump of the bytecode output
For example here's the description of the [[RTC|Real Time Clock]]:
<sourcesyntaxhighlight lang="c">
/* PIIX3 ISA bridge */
Device (ISA) {
Line 27 ⟶ 34:
})
}
</syntaxhighlight>
</source>
and what's it became after compilation:
<pre>
Line 43 ⟶ 50:
</pre>
Most likely you will never generate such a binary. But it helps if you know it's source form when you came to decode.
 
===Purpose of DSDT===
When your OS boots, it should parse the memory for [[ACPI]] tables. Then locate DSDT (and other tables as well, like [[FADTSSDT]]), and decode it to get the list of installed devices. If you have that list, it's rather easy to load [[Device_Driver_Interfaces|device driver]] for each.
 
Also note that there are buggy tables, so you should always keptkeep the possibility to load DSDT data from a user provided file instead. This file could be located in your [[initrd|initial ramdisk]], loaded with your kernel along on boot. That would solve the chicken-egg problem of loading the DSDT file from a device that's IO addresses isare defined in the DSDT.
 
==See Also==
===ACPIArticles===
*[[FADT]]
*[[ACPI]]
*[[Shutdown]]
*[[AML]]
 
===External Links===
*[http://www.acpica.org/documentation/ ACPICA documentation] offical documentation
*[http://www.acpica.org/downloads/ ACPI tools] like iasl compiler and acpixtract, source also available
[[Category:Stubs]]
[[Category:ACPI]]