Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
WhitleyOpenBoardPkg/AcpiTables: Fix EFI_ACPI_GPE0_BLK_LEN calculation
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Chasel Chiu <[email protected]>
Cc: Ankit Sinha <[email protected]>
Cc: Suresh Ponnusamy <[email protected]>
Signed-off-by: Isaac Oram <[email protected]>
Reviewed-by: Chasel Chiu <[email protected]>
  • Loading branch information
iworam committed Jan 10, 2023
1 parent a57865b commit 3e0f5b2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
21 changes: 20 additions & 1 deletion Platform/Intel/WhitleyOpenBoardPkg/Include/Acpi/Fadt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
//
Expand Down

0 comments on commit 3e0f5b2

Please sign in to comment.