From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web09.2894.1649710729998419155 for ; Mon, 11 Apr 2022 13:58:50 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=HuvvCkNh; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [47.201.46.36]) by linux.microsoft.com (Postfix) with ESMTPSA id 20B3D209F585; Mon, 11 Apr 2022 13:58:49 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 20B3D209F585 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1649710729; bh=QPy4E0QyP04cTRhguVvOdIeInfR024+TyB/JhxM5E9I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HuvvCkNh2Czl/5HCDBax9yBOD4L2Lz9JYNSCEtbEJJNfRTrdgZ9zn6e3ZTjjKxdaL jNcwv3j4lh5GpAxjAXxgLKGFTktIKMh0YYk65c58CQEH+k9s3nXjgRYvdxW4+FY5pn OYcbCHfW0BTkuhhCCrT40YKwTsZw6Awl/k2v6G+0= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Nate DeSimone Subject: [edk2-platforms][PATCH v1 3/3] SimicsOpenBoardPkg/AcpiPlatform: Use FADT duty offset and width PCDs Date: Mon, 11 Apr 2022 16:58:13 -0400 Message-Id: <20220411205813.2908-4-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20220411205813.2908-1-mikuback@linux.microsoft.com> References: <20220411205813.2908-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3543 Updates the FADT DUTY_OFFSET and DUTY_WIDTH values during boot in the function PlatformUpdateTables() along with other previously updated values in the FADT. Cc: Nate DeSimone Signed-off-by: Michael Kubacki --- Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/AcpiP= latform.c | 3 +++ Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/Fadt/= Fadt.c | 4 ++-- Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/AcpiP= latform.inf | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpi= Tables/AcpiPlatform.c b/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinP= latformAcpiTables/AcpiPlatform.c index 1edac89240fa..b06119f5eae7 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/= AcpiPlatform.c +++ b/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/= AcpiPlatform.c @@ -1328,6 +1328,9 @@ PlatformUpdateTables ( FadtHeader->XGpe1Blk.AccessSize =3D 0; } =20 + FadtHeader->DutyOffset =3D PcdGet8 (PcdFadtDutyOffset); + FadtHeader->DutyWidth =3D PcdGet8 (PcdFadtDutyWidth); + DEBUG(( EFI_D_ERROR, "ACPI FADT table @ address 0x%x\n", Table )); DEBUG(( EFI_D_ERROR, " IaPcBootArch 0x%x\n", FadtHeader->IaPcBootAr= ch )); DEBUG(( EFI_D_ERROR, " Flags 0x%x\n", FadtHeader->Flags )); diff --git a/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpi= Tables/Fadt/Fadt.c b/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlat= formAcpiTables/Fadt/Fadt.c index d1fe98e24bc7..652f1f2e87af 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/= Fadt/Fadt.c +++ b/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/= Fadt/Fadt.c @@ -34,8 +34,8 @@ #define EFI_ACPI_P_LVL3_LAT 0x03E9 // 1001 #define EFI_ACPI_FLUSH_SIZE 0x0000 #define EFI_ACPI_FLUSH_STRIDE 0x0000 -#define EFI_ACPI_DUTY_OFFSET 0x01 -#define EFI_ACPI_DUTY_WIDTH 0x00 +#define EFI_ACPI_DUTY_OFFSET 0x00 // To be fixed during boot +#define EFI_ACPI_DUTY_WIDTH 0x00 // To be fixed during boot =20 #define EFI_ACPI_DAY_ALRM 0x0D #define EFI_ACPI_MON_ALRM 0x00 diff --git a/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpi= Tables/AcpiPlatform.inf b/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/Mi= nPlatformAcpiTables/AcpiPlatform.inf index 7dfd0832a308..c6198fb76307 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/= AcpiPlatform.inf +++ b/Platform/Intel/SimicsOpenBoardPkg/AcpiTables/MinPlatformAcpiTables/= AcpiPlatform.inf @@ -61,6 +61,8 @@ [Pcd] gMinPlatformPkgTokenSpaceGuid.PcdFadtPreferredPmProfile gMinPlatformPkgTokenSpaceGuid.PcdFadtIaPcBootArch gMinPlatformPkgTokenSpaceGuid.PcdFadtFlags + gMinPlatformPkgTokenSpaceGuid.PcdFadtDutyOffset + gMinPlatformPkgTokenSpaceGuid.PcdFadtDutyWidth =20 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetBaseAddress gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress --=20 2.28.0.windows.1