RSDP: Difference between revisions

476 bytes added ,  29 days ago
m
Bot: Replace deprecated source tag with syntaxhighlight
[unchecked revision][unchecked revision]
m (Bot: Replace deprecated source tag with syntaxhighlight)
 
(9 intermediate revisions by 6 users not shown)
Line 1:
{{ACPI}}
 
'''RSDP''' (Root System Description Pointer) is a data structure used in the [[ACPI]] programming interface.
 
In ACPI Version 1.0 it has this structure:
 
<sourcesyntaxhighlight lang="c">
struct RSDPDescriptorRSDP_t {
char Signature[8];
uint8_t Checksum;
Line 11 ⟶ 13:
uint32_t RsdtAddress;
} __attribute__ ((packed));
</syntaxhighlight>
</source>
 
since Version 2.0 it has been extended, and the following new fields have been added:
 
<sourcesyntaxhighlight lang="c">
struct RSDPDescriptor20XSDP_t {
char Signature[8];
RSDPDescriptor firstPart;
uint8_t Checksum;
char OEMID[6];
uint8_t Revision;
uint32_t RsdtAddress; // deprecated since version 2.0
 
uint32_t Length;
Line 24 ⟶ 30:
uint8_t reserved[3];
} __attribute__ ((packed));
</syntaxhighlight>
</source>
==Detecting the RSDP==
 
Line 30 ⟶ 36:
 
If you're using UEFI, you can find it somewhere in EFI_SYSTEM_TABLE. Thus, there's no need for searching the RAM.
 
'''Note''': The standard methods to find the RSDP may not work on UEFI systems. Because of that, finding it inside EFI_SYSTEM_TABLE is the correct and reliable method (see ACPI 6.2 section 5.2.5.2 'Finding the RSDP on UEFI Enabled Systems').
 
When booting with a multiboot2 compliant loader, a copy of the RSDP is contained in the ACPI new RSDP or ACPI old RSDP tag respectively.
 
==Validating the RSDP==
Line 60 ⟶ 70:
The size of the entire table since offset 0 to the end.
==== Xsdt Address ====
64-bit physical address of the [[XSDT]] table. If you detect ACPI Version 2.0 you should use this table instead of RSDT even on x86IA-32, casting the address to uint32_t.
==== Extended Checksum ====
This field is used to calculate the checksum of the entire table, including both checksum fields.
Line 68 ⟶ 78:
 
== What's next? ==
Well, you should now parse the [[RSDT]] (or [[XSDT]]).
 
[[Category:ACPI]]