public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 1/1] DynamicTablesPkg: Update FADT generator to ACPI 6.3
@ 2019-11-21 17:18 Sami Mujawar
  2020-03-26 15:25 ` [edk2-devel] " Alexei Fedorov
  0 siblings, 1 reply; 2+ messages in thread
From: Sami Mujawar @ 2019-11-21 17:18 UTC (permalink / raw)
  To: devel; +Cc: Sami Mujawar, Alexei.Fedorov, Matteo.Carlini, Laura.Moretta, nd

Update FADT table generator to support ACPI revision 6.3

CC: Alexei Fedorov <Alexei.Fedorov@arm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
---

The changes can be seen at:
https://github.com/samimujawar/edk2/tree/623_dynamictables_acpi6_3_fadt_v1

Notes:
    v1:
      - Update FADT table version to ACPI 6.3                       [SAMI]

 DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c | 102 ++++++++++----------
 1 file changed, 51 insertions(+), 51 deletions(-)

diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
index e9e4991dc127abb97f859436df0c4ceafdb3f5ec..1f05a04c7cab0ce3d1264e34d9d0ef252277d81e 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
@@ -5,7 +5,7 @@
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @par Reference(s):
-  - ACPI 6.2 Specification - Errata A, September 2017
+  - ACPI 6.3 Specification, January 2019
 
 **/
 
@@ -32,8 +32,8 @@ Requirements:
 
 /** This macro defines the FADT flag options for ARM Platforms.
 */
-#define FADT_FLAGS  (EFI_ACPI_6_2_HW_REDUCED_ACPI |          \
-                     EFI_ACPI_6_2_LOW_POWER_S0_IDLE_CAPABLE)
+#define FADT_FLAGS  (EFI_ACPI_6_3_HW_REDUCED_ACPI |          \
+                     EFI_ACPI_6_3_LOW_POWER_S0_IDLE_CAPABLE)
 
 /** This macro defines the valid mask for the FADT flag option
     if HW_REDUCED_ACPI flag in the table is set.
@@ -42,47 +42,47 @@ Requirements:
     22-31 (reserved).
 
   Valid bits are:
-    EFI_ACPI_6_2_WBINVD                               BIT0
-    EFI_ACPI_6_2_PWR_BUTTON                           BIT4
-    EFI_ACPI_6_2_SLP_BUTTON                           BIT5
-    EFI_ACPI_6_2_FIX_RTC                              BIT6
-    EFI_ACPI_6_2_DCK_CAP                              BIT9
-    EFI_ACPI_6_2_RESET_REG_SUP                        BIT10
-    EFI_ACPI_6_2_SEALED_CASE                          BIT11
-    EFI_ACPI_6_2_HEADLESS                             BIT12
-    EFI_ACPI_6_2_USE_PLATFORM_CLOCK                   BIT15
-    EFI_ACPI_6_2_FORCE_APIC_CLUSTER_MODEL             BIT18
-    EFI_ACPI_6_2_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
-    EFI_ACPI_6_2_HW_REDUCED_ACPI                      BIT20
-    EFI_ACPI_6_2_LOW_POWER_S0_IDLE_CAPABLE            BIT21
+    EFI_ACPI_6_3_WBINVD                               BIT0
+    EFI_ACPI_6_3_PWR_BUTTON                           BIT4
+    EFI_ACPI_6_3_SLP_BUTTON                           BIT5
+    EFI_ACPI_6_3_FIX_RTC                              BIT6
+    EFI_ACPI_6_3_DCK_CAP                              BIT9
+    EFI_ACPI_6_3_RESET_REG_SUP                        BIT10
+    EFI_ACPI_6_3_SEALED_CASE                          BIT11
+    EFI_ACPI_6_3_HEADLESS                             BIT12
+    EFI_ACPI_6_3_USE_PLATFORM_CLOCK                   BIT15
+    EFI_ACPI_6_3_FORCE_APIC_CLUSTER_MODEL             BIT18
+    EFI_ACPI_6_3_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19
+    EFI_ACPI_6_3_HW_REDUCED_ACPI                      BIT20
+    EFI_ACPI_6_3_LOW_POWER_S0_IDLE_CAPABLE            BIT21
 */
 #define VALID_HARDWARE_REDUCED_FLAG_MASK  (                   \
-          EFI_ACPI_6_2_WBINVD                               | \
-          EFI_ACPI_6_2_PWR_BUTTON                           | \
-          EFI_ACPI_6_2_SLP_BUTTON                           | \
-          EFI_ACPI_6_2_FIX_RTC                              | \
-          EFI_ACPI_6_2_DCK_CAP                              | \
-          EFI_ACPI_6_2_RESET_REG_SUP                        | \
-          EFI_ACPI_6_2_SEALED_CASE                          | \
-          EFI_ACPI_6_2_HEADLESS                             | \
-          EFI_ACPI_6_2_USE_PLATFORM_CLOCK                   | \
-          EFI_ACPI_6_2_FORCE_APIC_CLUSTER_MODEL             | \
-          EFI_ACPI_6_2_FORCE_APIC_PHYSICAL_DESTINATION_MODE | \
-          EFI_ACPI_6_2_HW_REDUCED_ACPI                      | \
-          EFI_ACPI_6_2_LOW_POWER_S0_IDLE_CAPABLE)
+          EFI_ACPI_6_3_WBINVD                               | \
+          EFI_ACPI_6_3_PWR_BUTTON                           | \
+          EFI_ACPI_6_3_SLP_BUTTON                           | \
+          EFI_ACPI_6_3_FIX_RTC                              | \
+          EFI_ACPI_6_3_DCK_CAP                              | \
+          EFI_ACPI_6_3_RESET_REG_SUP                        | \
+          EFI_ACPI_6_3_SEALED_CASE                          | \
+          EFI_ACPI_6_3_HEADLESS                             | \
+          EFI_ACPI_6_3_USE_PLATFORM_CLOCK                   | \
+          EFI_ACPI_6_3_FORCE_APIC_CLUSTER_MODEL             | \
+          EFI_ACPI_6_3_FORCE_APIC_PHYSICAL_DESTINATION_MODE | \
+          EFI_ACPI_6_3_HW_REDUCED_ACPI                      | \
+          EFI_ACPI_6_3_LOW_POWER_S0_IDLE_CAPABLE)
 
 #pragma pack(1)
 
-/** The AcpiFadt is a template EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE
+/** The AcpiFadt is a template EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE
     structure used for generating the FADT Table.
   Note: fields marked with "{Template}" will be updated dynamically.
 */
 STATIC
-EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE AcpiFadt = {
+EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE AcpiFadt = {
   ACPI_HEADER (
-    EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
-    EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE,
-    EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_REVISION
+    EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
+    EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE,
+    EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_REVISION
     ),
   // UINT32     FirmwareCtrl
   0,
@@ -91,7 +91,7 @@ EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE AcpiFadt = {
   // UINT8      Reserved0
   EFI_ACPI_RESERVED_BYTE,
   // UINT8      PreferredPmProfile
-  EFI_ACPI_6_2_PM_PROFILE_UNSPECIFIED,  // {Template}: Power Management Profile
+  EFI_ACPI_6_3_PM_PROFILE_UNSPECIFIED,  // {Template}: Power Management Profile
   // UINT16     SciInt
   0,
   // UINT32     SmiCmd
@@ -160,37 +160,37 @@ EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE AcpiFadt = {
   0,
   // UINT32     Flags
   FADT_FLAGS,
-  // EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE  ResetReg
+  // EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE  ResetReg
   NULL_GAS,
   // UINT8      ResetValue
   0,
   // UINT16     ArmBootArch
-  EFI_ACPI_6_2_ARM_PSCI_COMPLIANT,  // {Template}: ARM Boot Architecture Flags
+  EFI_ACPI_6_3_ARM_PSCI_COMPLIANT,  // {Template}: ARM Boot Architecture Flags
   // UINT8      MinorRevision
-  EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION,
+  EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION,
   // UINT64     XFirmwareCtrl
   0,
   // UINT64     XDsdt
   0,
-  // EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE  XPm1aEvtBlk
+  // EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE  XPm1aEvtBlk
   NULL_GAS,
-  // EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE  XPm1bEvtBlk
+  // EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE  XPm1bEvtBlk
   NULL_GAS,
-  // EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE  XPm1aCntBlk
+  // EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE  XPm1aCntBlk
   NULL_GAS,
-  // EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE  XPm1bCntBlk
+  // EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE  XPm1bCntBlk
   NULL_GAS,
-  // EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE  XPm2CntBlk
+  // EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE  XPm2CntBlk
   NULL_GAS,
-  // EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE  XPmTmrBlk
+  // EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE  XPmTmrBlk
   NULL_GAS,
-  // EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE  XGpe0Blk
+  // EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE  XGpe0Blk
   NULL_GAS,
-  // EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE  XGpe1Blk
+  // EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE  XGpe1Blk
   NULL_GAS,
-  // EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE  SleepControlReg
+  // EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE  SleepControlReg
   NULL_GAS,
-  // EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE  SleepStatusReg
+  // EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE  SleepStatusReg
   NULL_GAS,
   // UINT64     HypervisorVendorIdentity
   EFI_ACPI_RESERVED_QWORD  // {Template}: Hypervisor Vendor ID
@@ -532,7 +532,7 @@ BuildFadtTable (
              This,
              (EFI_ACPI_DESCRIPTION_HEADER*)&AcpiFadt,
              AcpiTableInfo,
-             sizeof (EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE)
+             sizeof (EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE)
              );
   if (EFI_ERROR (Status)) {
     DEBUG ((
@@ -614,9 +614,9 @@ ACPI_TABLE_GENERATOR FadtGenerator = {
   // Generator Description
   L"ACPI.STD.FADT.GENERATOR",
   // ACPI Table Signature
-  EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
+  EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE,
   // ACPI Table Revision supported by this Generator
-  EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_REVISION,
+  EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_REVISION,
   // Minimum supported ACPI Table Revision
   EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_REVISION,
   // Creator ID
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [edk2-devel] [PATCH v1 1/1] DynamicTablesPkg: Update FADT generator to ACPI 6.3
  2019-11-21 17:18 [PATCH v1 1/1] DynamicTablesPkg: Update FADT generator to ACPI 6.3 Sami Mujawar
@ 2020-03-26 15:25 ` Alexei Fedorov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexei Fedorov @ 2020-03-26 15:25 UTC (permalink / raw)
  To: Sami Mujawar, devel

[-- Attachment #1: Type: text/plain, Size: 54 bytes --]

Reviewed by: Alexei Fedorov <Alexei.Fedorov@arm.com>

[-- Attachment #2: Type: text/html, Size: 60 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-26 15:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-21 17:18 [PATCH v1 1/1] DynamicTablesPkg: Update FADT generator to ACPI 6.3 Sami Mujawar
2020-03-26 15:25 ` [edk2-devel] " Alexei Fedorov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox