summaryrefslogtreecommitdiff
path: root/OvmfPkg
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/AcpiTables/Facp.aslc31
-rw-r--r--OvmfPkg/AcpiTables/Platform.h19
2 files changed, 38 insertions, 12 deletions
diff --git a/OvmfPkg/AcpiTables/Facp.aslc b/OvmfPkg/AcpiTables/Facp.aslc
index 2aec355..9a17905 100644
--- a/OvmfPkg/AcpiTables/Facp.aslc
+++ b/OvmfPkg/AcpiTables/Facp.aslc
@@ -15,11 +15,11 @@
#include "Platform.h"
-EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE FACP = {
+EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE FACP = {
{
- EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
- sizeof (EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE),
- EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION,
+ EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
+ sizeof (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE),
+ EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION,
0, // to make sum of entire table == 0
{EFI_ACPI_OEM_ID}, // OEMID is a 6 bytes long field
EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)
@@ -29,8 +29,8 @@ EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE FACP = {
},
0, // Physical addesss of FACS
0, // Physical address of DSDT
- INT_MODEL, // System Interrupt Model
- RESERVED, // reserved
+ RESERVED, // System Interrupt Model in ACPI 1.0, eliminated in 2.0
+ EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED, // Preferred PM profile
SCI_INT_VECTOR, // System vector of SCI interrupt
SMI_CMD_IO_PORT, // Port address of SMI command port
ACPI_ENABLE, // value to write to port smi_cmd to enable ACPI
@@ -62,10 +62,23 @@ EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE FACP = {
DAY_ALRM, // index to day-of-month alarm in RTC CMOS RAM
MON_ALRM, // index to month-of-year alarm in RTC CMOS RAM
CENTURY, // index to century in RTC CMOS RAM
- 0x00, // Boot architecture flag
- 0x00, // Boot architecture flag
+ 0x0000, // Boot architecture flag (16-bit)
RESERVED, // reserved
- FLAG
+ FLAG, // Fixed feature flags
+ { 0 }, // Address of the Reset Register
+ 0, // Value for the Reset Register to reset the system
+ { RESERVED }, // reserved[3]
+ 0, // 64-bit physical addesss of FACS, set at installation
+ 0, // 64-bit physical addesss of DSDT, set at installation
+
+ GAS2_IO(PM1a_EVT_BLK, PM1_EVT_LEN), // Ext. addr. of PM 1a Event Reg Blk
+ { 0 }, // PM 1b Event Reg Blk unsupported
+ GAS2_IO(PM1a_CNT_BLK, PM1_CNT_LEN), // Ext. addr. of PM 1a Ctrl Reg Blk
+ { 0 }, // PM 1b Ctrl Reg Blk unsupported
+ { 0 }, // PM 2 Ctrl Reg Blk unsupported
+ GAS2_IO(PM_TMR_BLK, PM_TM_LEN), // Ext. addr. of PM Timer Ctrl Reg Blk
+ GAS2_IO(GPE0_BLK, GPE0_BLK_LEN), // Ext. addr. of GPE 0 Reg Blk
+ { 0 } // GPE 1 Reg Blk unsupported
};
diff --git a/OvmfPkg/AcpiTables/Platform.h b/OvmfPkg/AcpiTables/Platform.h
index 547a5a3..c95cbb2 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