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.2892.1649710726266624238 for ; Mon, 11 Apr 2022 13:58:46 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=T3Y/oMu1; 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 3F49F209DDA2; Mon, 11 Apr 2022 13:58:45 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3F49F209DDA2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1649710725; bh=9SWQHM80UGT5hRZ8UPUVDrxKj7cLSizQgk86cSDFgkk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T3Y/oMu1JluZJlCjJpAoqNp3Hjm7NhanS35nVWAlIXQ8AG9TejWan384igd1Ml/3g bdhPCf7wxQOhkv0pwqhXEu3y2c/Maw0sukSLRJV0UpIfKLK6Sv93KuYlFQmuEdD5E6 lQncBPA1Y5m7KDDnh9AVIZxVCLODs6MQ1b++iiP8= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-platforms][PATCH v1 2/3] MinPlatformPkg/AcpiPlatform: Use FADT duty offset and width PCDs Date: Mon, 11 Apr 2022 16:58:12 -0400 Message-Id: <20220411205813.2908-3-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: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki --- Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 3 +++ Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Fadt/Fadt.c | 4 ++-- Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c= b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c index 05fc7799fb13..508de9101306 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c @@ -1226,6 +1226,9 @@ PlatformUpdateTables ( FadtHeader->XGpe1Blk.AccessSize =3D 0; } =20 + FadtHeader->DutyOffset =3D PcdGet8 (PcdFadtDutyOffset); + FadtHeader->DutyWidth =3D PcdGet8 (PcdFadtDutyWidth); + DEBUG ((DEBUG_INFO, "ACPI FADT table @ address 0x%x\n", Table)); DEBUG ((DEBUG_INFO, " IaPcBootArch 0x%x\n", FadtHeader->IaPcBootArc= h)); DEBUG ((DEBUG_INFO, " Flags 0x%x\n", FadtHeader->Flags)); diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Fadt/Fadt.c b/= Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Fadt/Fadt.c index 3418e960972f..70b769b84693 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Fadt/Fadt.c +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/Fadt/Fadt.c @@ -35,8 +35,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #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/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.i= nf b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf index 99adf9c381c9..59ef5e2e544e 100644 --- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf +++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf @@ -64,6 +64,8 @@ [Pcd] gMinPlatformPkgTokenSpaceGuid.PcdFadtPreferredPmProfile gMinPlatformPkgTokenSpaceGuid.PcdFadtIaPcBootArch gMinPlatformPkgTokenSpaceGuid.PcdFadtFlags + gMinPlatformPkgTokenSpaceGuid.PcdFadtDutyOffset + gMinPlatformPkgTokenSpaceGuid.PcdFadtDutyWidth =20 gPcAtChipsetPkgTokenSpaceGuid.PcdHpetBaseAddress gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress --=20 2.28.0.windows.1