[edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/AcpiTables: Fix EFI_ACPI_GPE0_BLK_LEN calculation

Isaac Oram isaac.w.oram at intel.com
Thu Jan 5 01:34:15 UTC 2023


Block length incorrectly calculated off of the block width.
Reverted EFI_ACPI_GPE0_BLK_WIDTH change and added #defines
for X_GPE0 and X_GPE1 contents.

Cc: Nate DeSimone <nathaniel.l.desimone at intel.com>
Cc: Chasel Chiu <chasel.chiu at intel.com>
Cc: Ankit Sinha <ankit.sinha at intel.com>
Cc: Suresh Ponnusamy <sureshkumarp at ami.com>
Signed-off-by: Isaac Oram <isaac.w.oram at intel.com>
---
 .../Features/Acpi/AcpiTables/Fadt/Fadt62.aslc | 16 +++++++-------
 .../WhitleyOpenBoardPkg/Include/Acpi/Fadt.h   | 21 ++++++++++++++++++-
 2 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Fadt/Fadt62.aslc b/Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Fadt/Fadt62.aslc
index f37cf0a508..b7f15ef716 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Fadt/Fadt62.aslc
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Features/Acpi/AcpiTables/Fadt/Fadt62.aslc
@@ -143,19 +143,19 @@ EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE Fadt = {
   //
   // X_General Purpose Event 0 Register Block
   //
-  {EFI_ACPI_GPE0_BLK_ADDRESS_SPACE_ID,
-  EFI_ACPI_GPE0_BLK_BIT_WIDTH,
-  EFI_ACPI_GPE0_BLK_BIT_OFFSET,
+  {EFI_ACPI_X_GPE0_BLK_ADDRESS_SPACE_ID,
+  EFI_ACPI_X_GPE0_BLK_BIT_WIDTH,
+  EFI_ACPI_X_GPE0_BLK_BIT_OFFSET,
   EFI_ACPI_6_2_BYTE,
-  EFI_ACPI_GPE0_BLK_ADDRESS},
+  EFI_ACPI_X_GPE0_BLK_ADDRESS},
   //
   // X_General Purpose Event 1 Register Block
   //
-  {EFI_ACPI_GPE1_BLK_ADDRESS_SPACE_ID,
-  EFI_ACPI_GPE1_BLK_BIT_WIDTH,
-  EFI_ACPI_GPE1_BLK_BIT_OFFSET,
+  {EFI_ACPI_X_GPE1_BLK_ADDRESS_SPACE_ID,
+  EFI_ACPI_X_GPE1_BLK_BIT_WIDTH,
+  EFI_ACPI_X_GPE1_BLK_BIT_OFFSET,
   EFI_ACPI_6_2_UNDEFINED,
-  EFI_ACPI_GPE1_BLK_ADDRESS}
+  EFI_ACPI_X_GPE1_BLK_ADDRESS}
 };
 
 VOID*
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Include/Acpi/Fadt.h b/Platform/Intel/WhitleyOpenBoardPkg/Include/Acpi/Fadt.h
index ebfd21b6cc..8857879370 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Include/Acpi/Fadt.h
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Include/Acpi/Fadt.h
@@ -152,10 +152,19 @@ For Watson Creek we set this to 0 and then dynamically update this to 1 in the D
 // Information
 //
 #define EFI_ACPI_GPE0_BLK_ADDRESS_SPACE_ID  EFI_ACPI_6_2_SYSTEM_IO
-#define EFI_ACPI_GPE0_BLK_BIT_WIDTH         0 // size of R_PCH_ACPI_GPE0_STS_127_96 + R_PCH_ACPI_GPE0_EN_127_96
+#define EFI_ACPI_GPE0_BLK_BIT_WIDTH         0x100 // size of R_PCH_ACPI_GPE0_STS_127_96 + R_PCH_ACPI_GPE0_EN_127_96
 #define EFI_ACPI_GPE0_BLK_BIT_OFFSET        0x00
 #define EFI_ACPI_GPE0_BLK_ADDRESS           (EFI_ACPI_PM1A_EVT_BLK_ADDRESS + 0x80)
 
+//
+// X General Purpose Event 0 Register Block Generic Address
+// Information
+//
+#define EFI_ACPI_X_GPE0_BLK_ADDRESS_SPACE_ID  EFI_ACPI_6_2_SYSTEM_IO
+#define EFI_ACPI_X_GPE0_BLK_BIT_WIDTH         0x00
+#define EFI_ACPI_X_GPE0_BLK_BIT_OFFSET        0x00
+#define EFI_ACPI_X_GPE0_BLK_ADDRESS           EFI_ACPI_GPE0_BLK_ADDRESS
+
 //
 // General Purpose Event 1 Register Block Generic Address
 // Information
@@ -164,6 +173,16 @@ For Watson Creek we set this to 0 and then dynamically update this to 1 in the D
 #define EFI_ACPI_GPE1_BLK_BIT_WIDTH         0x0
 #define EFI_ACPI_GPE1_BLK_BIT_OFFSET        0x0
 #define EFI_ACPI_GPE1_BLK_ADDRESS           0x0
+
+//
+// X General Purpose Event 1 Register Block Generic Address
+// Information
+//
+#define EFI_ACPI_X_GPE1_BLK_ADDRESS_SPACE_ID  EFI_ACPI_6_2_SYSTEM_IO
+#define EFI_ACPI_X_GPE1_BLK_BIT_WIDTH         0x00
+#define EFI_ACPI_X_GPE1_BLK_BIT_OFFSET        0x00
+#define EFI_ACPI_X_GPE1_BLK_ADDRESS           0x00
+
 //
 // Reset Register Generic Address Information
 //
-- 
2.39.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97960): https://edk2.groups.io/g/devel/message/97960
Mute This Topic: https://groups.io/mt/96064620/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list