RSDP: Difference between revisions

1,439 bytes added ,  15 years ago
no edit summary
[unchecked revision][unchecked revision]
No edit summary
No edit summary
Line 1:
'''RSDP''' (Root System Description Pointer) is a data structure used in the [[ACPI]] programming interface. It is set out like this (for ACPI Version 1.0):
 
In ACPI Version 1.0 it has this structure:
struct RSDPDescriptor
 
{
struct RSDPDescriptor {
char signatureSignature[8];
BYTE checkSum;
charBYTE oemID[6]Checksum;
BYTEchar revisionOEMID[6];
BYTE checkSumRevision;
DWORD rsdtAddressRsdtAddress;
}
 
since Version 2.0 it has been modified, and new fields have been added:
and for version 2.0:
 
struct RSDPDescriptor20 {
char signatureSignature[8];
{
BYTE revisionChecksum;
char signature[8];
BYTEchar checkSumOEMID[6];
charBYTE oemID[6]Revision;
DWORD rsdtAddressRsdtAddress;
BYTE revision;
DWORD rsdtAddress;
DWORD lengthLength;
QWORD xsdtAddressXsdtAddress;
BYTE extCheckSumExtendedChecksum;
BYTE reserved[3];
};
Line 28:
==Detecting the RSDP==
 
The RSDP is either located within the first 1 KB of the [[EBDA]] (Extended BIOS Data Area) (a 2 byte real mode segment pointer to it is located at 0x040E), or in the memory region from 0x000E0000 to 0x000FFFFF (the main [[BIOS]] area below 1 MB). TheTo signaturefind (forthe bothtable, tables)the shouldOperating beSystem has to find the "RSD PTR " string (note:notice thisthe ends with alast space character that should not be overlooked), which is useful when scanning for the structure in memory. The stepone of the memorytwo scanareas. shouldThis besignature 16 (i.e. the RSDPis always begins on a 16 byte boundary).
 
==Validating the RSDP==
 
Once you find the RSDP Table you have to see what version of ACPI is the BIOS using, then you have to check that the checksum is valid.
{{In Progress}}
 
===Detecting ACPI Version===
If the RSDP revision field is zero, it is ACPI version 1.0 and the first structure should be used, otherwise it is the second structure that should be used, as that has data about the [[XSDT]], an extended [[RSDT]].
The ACPI Version can be detected using the Revision field in the RSDP. If this field contains 0, then ACPI Version 1.0 is used. 1 stands for ACPI Version 2.0, 2 for ACPI Version 3.0, and so on...
 
<!--
Brendan... forgive me. Someone should write an article on RSDT an move this piece there...
The ACPI standards state that an OS that complies with ACPI version 2.0 or later should use the XSDT instead of the RSDT, however I personally doubt that there is a difference on 80x86 computers. AFAIK the XSDT itself was introduced for Itanium's (IA64) and other 64 bit computers where it's likely that the BIOS (and ACPI tables) are above 4 GB. On 80x86 it's likely that the RSDT and the XSDT both point to the same tables below 4 GB for compatibility reasons (it doesn't make sense to have 2 versions of the same tables) -- Brendan.
-->
===Checksum validation===
Before the RSDP is relied upon you should check that the checksum is valid.
Before the RSDP is relied upon you should check that the checksum is valid. For ACPI 1.0 (the first structure) you add up every byte in the structure and make sure the lowest byte of the result is equal to zero. For ACPI 2.0 and later you'd do exactly the same thing for the original (ACPI 1.0) part of the second structure, and then do it again for the fields that are part of the ACPI 2.0 extension.
 
==Explaining the fields==
Before the RSDP is relied upon you should check that the checksum is valid. For ACPI 1.0 (the first structure) you add up every byte in the structure and make sure the lowest byte of the result is equal to zero. For ACPI 2.0 and later you'd do exactly the same thing for the original (ACPI 1.0) part of the second structure, and then do it again for the fields that are part of the ACPI 2.0 extension.
===Signature===
 
This 8-byte string (not null terminated!) must contain "RSD PTR ". It stands on a 16-byte boundary.
TODO: Needs more formatting and explaining
===Checksum===
The value to add to all the other bytes (of the Version 1.0 table) to calculate the Checksum of the table. If this value added to all the others and casted to byte isn't equal to 0, the table must be ignored.
===OEMID===
The specification says: "An OEM-supplied string that identifies the OEM"
===Revision===
The revision of the ACPI. Larger revision numbers are backward compatible to lower revision numbers. See [[#Detecting ACPI Version|Detecting ACPI Version]] for further information.
===Rsdt Address===
32-bit physical (I repeat: physical) address of the [[RSDT]] table.
===Length===
The size of the entire table since offset 0 to the end. This field has been added in Version 2.0
===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 x86, casting the address to DWORD. This field has been added in Version 2.0
===Extended Checksum===
This field is used to calculate the checksum of the entire table, including both checksum fields
===Reserved===
3 bytes to be ignored in reading and that must not be written
 
[[Category:Power management]]
Anonymous user