summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/AcpiTables/Platform.h
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-04 17:37:47 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-04 17:37:47 +0000
commit304606c0b67a282b3a772467ca075c550617a23e (patch)
tree690afdb3e0620b5b9daa8b7f403355599c8ea34a /OvmfPkg/AcpiTables/Platform.h
parente1fad9b3ba8187038b9787f2307e48f02ef78b80 (diff)
downloadedk2-304606c0b67a282b3a772467ca075c550617a23e.tar.gz
edk2-304606c0b67a282b3a772467ca075c550617a23e.tar.bz2
edk2-304606c0b67a282b3a772467ca075c550617a23e.zip
OvmfPkg: upgrade the FADT to ACPI 2.0 without functional changes
This conversion cannot be split very well into smaller patches. Comparing version 1 and version 2 (modulo the header fields): > --- EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE > +++ EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE > @@ -1,14 +1,14 @@ > EFI_ACPI_DESCRIPTION_HEADER Header; > UINT32 FirmwareCtrl; > UINT32 Dsdt; > - UINT8 IntModel; > - UINT8 Reserved1; > + UINT8 Reserved0; > + UINT8 PreferredPmProfile; The INT_MODEL field was present in ACPI 1.0, but eliminated in 2.0. According to the spec, "platforms should set this field to zero but field values of one are also allowed to maintain compatibility with ACPI 1.0". We're setting it to zero. About Preferred_PM_Profile (taking the place of an 1.0 reserved field), the specification says: This field is set by the OEM to convey the preferred power management profile to OSPM. OSPM can use this field to set default power management policy parameters during OS installation. >From <MdePkg/Include/IndustryStandard/Acpi20.h>: #define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED 0 #define EFI_ACPI_2_0_PM_PROFILE_DESKTOP 1 #define EFI_ACPI_2_0_PM_PROFILE_MOBILE 2 #define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION 3 #define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER 4 #define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER 5 #define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC 6 For a virtual machine, "unspecified" is the best choice. > UINT16 SciInt; > UINT32 SmiCmd; > UINT8 AcpiEnable; > UINT8 AcpiDisable; > UINT8 S4BiosReq; > - UINT8 Reserved2; > + UINT8 PstateCnt; We've been already treating this field as PSTATE_CNT. No change in value. > UINT32 Pm1aEvtBlk; > UINT32 Pm1bEvtBlk; > UINT32 Pm1aCntBlk; > @@ -20,11 +20,11 @@ > UINT8 Pm1EvtLen; > UINT8 Pm1CntLen; > UINT8 Pm2CntLen; > - UINT8 PmTmLen; > + UINT8 PmTmrLen; (Field renaming artifact.) > UINT8 Gpe0BlkLen; > UINT8 Gpe1BlkLen; > UINT8 Gpe1Base; > - UINT8 Reserved3; > + UINT8 CstCnt; We've been already treating this field as CST_CNT. No change in value. > UINT16 PLvl2Lat; > UINT16 PLvl3Lat; > UINT16 FlushSize; > @@ -34,7 +34,19 @@ > UINT8 DayAlrm; > UINT8 MonAlrm; > UINT8 Century; > - UINT8 Reserved4; > - UINT8 Reserved5; > - UINT8 Reserved6; > + UINT16 IaPcBootArch; > + UINT8 Reserved1; The first two octets are now merged into a 16-bit short; otherwise we've been treating those as boot architecture flags already (see SVN rev 13615). No change in value. > UINT32 Flags; The fixed feature flags are not modified, only the macro names (expanding to identical values) are updated to ACPI 2.0. The following fields are all new in ACPI 2.0: > + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg; > + UINT8 ResetValue; We don't claim support for the reset register yet. > + UINT8 Reserved2[3]; > + UINT64 XFirmwareCtrl; > + UINT64 XDsdt; The 64-bit physical addresses for the FACS and the DSDT are automatically filled at installation time, see AddTableToList() and DeleteTable() in "MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c". > + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; > + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; > + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; > + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; > + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; > + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; > + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; > + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; We specify the extended addresses for the required and supported PM1a Event & Control, PM Timer, and GPE0 Register Blocks, and zero the rest, in accordance with the ACPI 1.0 fields. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14155 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/AcpiTables/Platform.h')
-rw-r--r--OvmfPkg/AcpiTables/Platform.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/OvmfPkg/AcpiTables/Platform.h b/OvmfPkg/AcpiTables/Platform.h
index 547a5a3e6c..c95cbb20d5 100644
--- a/OvmfPkg/AcpiTables/Platform.h
+++ b/OvmfPkg/AcpiTables/Platform.h
@@ -28,7 +28,6 @@
#define EFI_ACPI_CREATOR_ID SIGNATURE_32('O','V','M','F')
#define EFI_ACPI_CREATOR_REVISION 0x00000099
-#define INT_MODEL 0x01
#define SCI_INT_VECTOR 0x0009
#define SMI_CMD_IO_PORT 0xB2
#define ACPI_ENABLE 0xF1
@@ -52,7 +51,21 @@
#define DAY_ALRM 0x00
#define MON_ALRM 0x00
#define CENTURY 0x00
-#define FLAG EFI_ACPI_1_0_WBINVD | EFI_ACPI_1_0_PROC_C1 | EFI_ACPI_1_0_SLP_BUTTON | EFI_ACPI_1_0_RTC_S4
+#define FLAG (EFI_ACPI_2_0_WBINVD | \
+ EFI_ACPI_2_0_PROC_C1 | \
+ EFI_ACPI_2_0_SLP_BUTTON | \
+ EFI_ACPI_2_0_RTC_S4)
-#endif
+//
+// Byte-aligned IO port register block initializer for
+// EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE
+//
+#define GAS2_IO(Base, Size) { \
+ EFI_ACPI_2_0_SYSTEM_IO, /* AddressSpaceId */ \
+ (Size) * 8, /* RegisterBitWidth */ \
+ 0, /* RegisterBitOffset */ \
+ 0, /* Reserved */ \
+ (Base) /* Address */ \
+ }
+#endif