(Fixed the "table")
No edit summary
Line 73:
Line 73:
uint64_t Address;
uint64_t Address;
(削除) ''' (削除ここまで)AddressSpace(削除) ''' can be one of the following: (削除ここまで)
(追記) {| border="1" (追記ここまで)
(削除) * (削除ここまで)0 System Memory
(追記) |+ Possible values of (追記ここまで)AddressSpace
(削除) * (削除ここまで)1 System I/O
(追記) |- (追記ここまで)
(削除) * (削除ここまで)2 PCI Configuration Space
(追記) ! scope="col" | Value (追記ここまで)
(削除) * (削除ここまで)3 Embedded Controller
(追記) ! scope="col" | Address Space (追記ここまで)
(削除) * (削除ここまで)4 SMBus
(追記) |- (追記ここまで)
(削除) * (削除ここまで)5 to 0x7E Reserved
(追記) | (追記ここまで)0 (追記) || (追記ここまで)System Memory
(削除) * (削除ここまで)0x7F Functional Fixed Hardware
(追記) |- (追記ここまで)
(削除) * (削除ここまで)0x80 to 0xBF Reserved
(追記) | (追記ここまで)1 (追記) || (追記ここまで)System I/O
(削除) * (削除ここまで)0xC0 to 0xFF OEM Defined
(追記) |- (追記ここまで)
(追記) | (追記ここまで)2 (追記) || (追記ここまで)PCI Configuration Space
(追記) | (追記ここまで)3 (追記) || (追記ここまで)Embedded Controller
(追記) | (追記ここまで)4 (追記) || (追記ここまで)SMBus
(追記) | (追記ここまで)5 to 0x7E (追記) || (追記ここまで)Reserved
(追記) | (追記ここまで)0x7F (追記) || (追記ここまで)Functional Fixed Hardware
(追記) | (追記ここまで)0x80 to 0xBF (追記) || (追記ここまで)Reserved
(追記) | (追記ここまで)0xC0 to 0xFF (追記) || (追記ここまで)OEM Defined
'''BitWidth''' and '''BitOffset''' are required only when accessing a bit field.
'''BitWidth''' and '''BitOffset''' are required only when accessing a bit field(追記) , and I guess you know how to use them (追記ここまで).
'''AccessSize''' defines how many bytes at once you can read/write (削除) and it must be one (削除ここまで)of (削除) the following: (削除ここまで)
'''AccessSize''' defines how many bytes at once you can read/write(追記) . (追記ここまで)
(削除) * (削除ここまで)0 Undefined (legacy reasons)
(追記) {| border="1" (追記ここまで)
(削除) * (削除ここまで)1 Byte access
(追記) |+ Possible values (追記ここまで)of (追記) AccessSize (追記ここまで)
(削除) * (削除ここまで)2 16-bit Word access
(追記) |- (追記ここまで)
(削除) * (削除ここまで)3 32-bit Doubleword access
(追記) ! scope="col" | Value (追記ここまで)
(削除) * (削除ここまで)4 64-bit Quadword access
(追記) ! scope="col" | Access size (追記ここまで)
(追記) | (追記ここまで)0 (追記) || (追記ここまで)Undefined (legacy reasons)
(追記) | (追記ここまで)1 (追記) || (追記ここまで)Byte access
(追記) | (追記ここまで)2 (追記) || (追記ここまで)16-bit Word access
(追記) | (追記ここまで)3 (追記) || (追記ここまで)32-bit Doubleword access
(追記) | (追記ここまで)4 (追記) || (追記ここまで)64-bit Quadword access
Address is a 64bit pointer in the defined address space to the data structure.
Address is a 64bit pointer in the defined address space to the data structure.
Line 101:
Line 126:
A 32-bit pointer to the [[DSDT]]. This has a X_Dsdt brother too.
A 32-bit pointer to the [[DSDT]]. This has a X_Dsdt brother too.
=== PreferredPowerManagementProfile ===
=== PreferredPowerManagementProfile ===
This field contains a value which should address you to a power management profile. For example if it contains 2, the computer is a laptop and you should configure power management in power saving mode. (削除) The possible values are: (削除ここまで)
This field contains a value which should address you to a power management profile. For example if it contains 2, the computer is a laptop and you should configure power management in power saving mode.
(削除) * (削除ここまで)0 Unspecified
(追記) {| border="1" (追記ここまで)
(削除) * (削除ここまで)1 Desktop
(追記) |+ Values for PreferredPowerManagementProfile (追記ここまで)
(削除) * (削除ここまで)2 Mobile
(追記) |- (追記ここまで)
(削除) * (削除ここまで)3 Workstation
(追記) ! scope="col" | Value (追記ここまで)
(削除) * (削除ここまで)4 Enterprise Server
(追記) ! scope="col" | Meaning (追記ここまで)
(削除) * (削除ここまで)5 SOHO Server
(追記) |- (追記ここまで)
(削除) * (削除ここまで)6 (削除) Appliance (削除ここまで)PC
(追記) | (追記ここまで)0 (追記) || (追記ここまで)Unspecified
(削除) * (削除ここまで)7 Performance Server
(追記) |- (追記ここまで)
(削除) * (削除ここまで)>7 Reserved
(追記) | (追記ここまで)1 (追記) || (追記ここまで)Desktop
(追記) | (追記ここまで)2 (追記) || (追記ここまで)Mobile
(追記) | (追記ここまで)3 (追記) || (追記ここまで)Workstation
(追記) | (追記ここまで)4 (追記) || (追記ここまで)Enterprise Server
(追記) | (追記ここまで)5 (追記) || (追記ここまで)SOHO Server
(追記) | (追記ここまで)6 (追記) || Aplliance (追記ここまで)PC
(追記) | (追記ここまで)7 (追記) || (追記ここまで)Performance Server
(追記) | (追記ここまで)>7 (追記) || (追記ここまで)Reserved
=== SCI_Interrupt ===
=== SCI_Interrupt ===
The SCI IRQ number when working using the [[8259 PIC]]. The System Control Interrupt is used from the ACPI hardware to notify the OS of particular events, such as the user pressing of the power button.
The SCI IRQ number when working using the [[8259 PIC]]. The System Control Interrupt is used from the ACPI hardware to notify the OS of particular events, such as the user pressing of the power button.
Revision as of 21:43, 10 March 2011
FADT (Fixed ACPI Description Table) is a data structure used in the ACPI programming interface. This table contains information about fixed register blocks pertaining to power management.
Finding the FADT
The FADT is pointed to by an entry in the RSDT. The signature is 'FACP'. Even if the pointer was found in another ACPI valid structure, you should anyway do the checksum to check that the table is valid.
Structure
The FADT is a complex structure and contains a lot of data. Here it is:
structFADT{
structACPISDTHeaderh;
uint32_tFirmwareCtrl;
uint32_tDsdt;
uint8_tReserved;// Was used in ACPI 1.0. Today is not used anymore. Some bioses still use it for compatibility with old os. for more info see the ACPI specification 1.0
uint8_tPreferredPowerManagementProfile;
uint16_tSCI_Interrupt;
uint32_tSMI_CommandPort;
uint8_tAcpiEnable;
uint8_tAcpiDisable;
uint8_tS4BIOS_REQ;
uint8_tPSTATE_Control;
uint32_tPM1aEventBlock;
uint32_tPM1bEventBlock;
uint32_tPM1aControlBlock;
uint32_tPM1bControlBlock;
uint32_tPM2ControlBlock;
uint32_tPMTimerBlock;
uint32_tGPE0Block;
uint32_tGPE1Block;
uint8_tPM1EventLength;
uint8_tPM1ControlLength;
uint8_tPM2ControlLength;
uint8_tPMTimerLength;
uint8_tGPE0Length;
uint8_tGPE1Length;
uint8_tGPE1Base;
uint8_tCStateControl;
uint16_tWorstC2Latency;
uint16_tWorstC3Latency;
uint16_tFlushSize;
uint16_tFlushStride;
uint8_tDutyOffset;
uint8_tDutyWidth;
uint8_tDayAlarm;
uint8_tMonthAlarm;
uint8_tCentury;
uint16_tBootArchitectureFlags;// Since ACPI 2.0+. Reserved on ACPI 1.0
uint8_tReserved2;
uint32_tFlags;
GenericAddressStructureResetReg;// For details see below. Just know that GenericAddressStructure is made of 12 bytes
uint8_tResetValue;
uint8_tReserved3[3];
// 64bit pointers - Available on ACPI 2.0+
uint64_tX_FirmwareControl;
uint64_tX_Dsdt;
GenericAddressStructureX_PM1aEventBlock;
GenericAddressStructureX_PM1bEventBlock;
GenericAddressStructureX_PM1aControlBlock;
GenericAddressStructureX_PM1bControlBlock;
GenericAddressStructureX_PM2ControlBlock;
GenericAddressStructureX_PMTimerBlock;
GenericAddressStructureX_GPE0Block;
GenericAddressStructureX_GPE1Block;
};
GenericAddressStructure
Before going to far, keep in mind that the GAS is a structure used by ACPI to describe the position of registers. Its structure is:
structGenericAddressStructure
{
uint8_tAddressSpace;
uint8_tBitWidth;
uint8_tBitOffset;
uint8_tAccessSize;
uint64_tAddress;
};
Possible values of AddressSpace
| Value
|
Address Space
|
| 0 |
System Memory
|
| 1 |
System I/O
|
| 2 |
PCI Configuration Space
|
| 3 |
Embedded Controller
|
| 4 |
SMBus
|
| 5 to 0x7E |
Reserved
|
| 0x7F |
Functional Fixed Hardware
|
| 0x80 to 0xBF |
Reserved
|
| 0xC0 to 0xFF |
OEM Defined
|
BitWidth and BitOffset are required only when accessing a bit field, and I guess you know how to use them.
AccessSize defines how many bytes at once you can read/write.
Possible values of AccessSize
| Value
|
Access size
|
| 0 |
Undefined (legacy reasons)
|
| 1 |
Byte access
|
| 2 |
16-bit Word access
|
| 3 |
32-bit Doubleword access
|
| 4 |
64-bit Quadword access
|
Address is a 64bit pointer in the defined address space to the data structure.
Fields
FirmwareCtrl
This is a 32-bit pointer to the FACS. Since ACPI 2.0 a new field has been added to the table, X_FirmwareControl of type GAS, which is 64-bit wide. Only one of the two fields is used, the other contains 0. According to the Specs, the X_ field is used only when the FACS is placed above the 4th Gb.
Dsdt
A 32-bit pointer to the DSDT. This has a X_Dsdt brother too.
PreferredPowerManagementProfile
This field contains a value which should address you to a power management profile. For example if it contains 2, the computer is a laptop and you should configure power management in power saving mode.
Values for PreferredPowerManagementProfile
| Value
|
Meaning
|
| 0 |
Unspecified
|
| 1 |
Desktop
|
| 2 |
Mobile
|
| 3 |
Workstation
|
| 4 |
Enterprise Server
|
| 5 |
SOHO Server
|
| 6 |
Aplliance PC
|
| 7 |
Performance Server
|
| >7 |
Reserved
|
SCI_Interrupt
The SCI IRQ number when working using the 8259 PIC. The System Control Interrupt is used from the ACPI hardware to notify the OS of particular events, such as the user pressing of the power button.
SMI_CommandPort
This is an I/O Port. This is where the OS writes AcpiEnable or AcpiDisable to get or release the ownership over the ACPI registers. This is 0 on systems where the System Management Mode is not supported.
What's next?
You should preserve the pointer to the FACS (in FirmwareControl (if < 4gb) or in X_FirmwareControl (if >= 4gb)). Then you should parse the DSDT.