public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael Kubacki" <mikuback@linux.microsoft.com>
To: devel@edk2.groups.io
Cc: Chasel Chiu <chasel.chiu@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Eric Dong <eric.dong@intel.com>
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	[thread overview]
Message-ID: <20220411205813.2908-3-mikuback@linux.microsoft.com> (raw)
In-Reply-To: <20220411205813.2908-1-mikuback@linux.microsoft.com>

From: Michael Kubacki <michael.kubacki@microsoft.com>

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3543

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 <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
---
 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     = 0;
     }
 
+    FadtHeader->DutyOffset = PcdGet8 (PcdFadtDutyOffset);
+    FadtHeader->DutyWidth = PcdGet8 (PcdFadtDutyWidth);
+
     DEBUG ((DEBUG_INFO, "ACPI FADT table @ address 0x%x\n", Table));
     DEBUG ((DEBUG_INFO, "  IaPcBootArch 0x%x\n", FadtHeader->IaPcBootArch));
     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
 
 #define EFI_ACPI_DAY_ALRM   0x0D
 #define EFI_ACPI_MON_ALRM   0x00
diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.inf 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
 
   gPcAtChipsetPkgTokenSpaceGuid.PcdHpetBaseAddress
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
-- 
2.28.0.windows.1


  parent reply	other threads:[~2022-04-11 20:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 20:58 [edk2-platforms][PATCH v1 0/3] MinPlatformPkg: Add FADT duty offset and width PCDs Michael Kubacki
2022-04-11 20:58 ` [edk2-platforms][PATCH v1 1/3] MinPlatformPkg: Add FADT duty offset and duty " Michael Kubacki
2022-04-11 20:58 ` Michael Kubacki [this message]
2022-04-11 20:58 ` [edk2-platforms][PATCH v1 3/3] SimicsOpenBoardPkg/AcpiPlatform: Use FADT duty offset and " Michael Kubacki
2022-04-11 23:31 ` [edk2-devel] [edk2-platforms][PATCH v1 0/3] MinPlatformPkg: Add " Sinha, Ankit
2022-04-25  4:08 ` Chiu, Chasel
2022-04-26  3:00   ` Michael Kubacki
2022-06-06 22:25 ` Nate DeSimone
2022-06-06 22:26 ` Nate DeSimone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220411205813.2908-3-mikuback@linux.microsoft.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox