Looks good to me.

On 2021.02.01 22:53, Jeremy Linton wrote:
Turns out its helpful to have a !PcdToken flag
that enables a DSDT/SSDT. That simplifies
both the emmc2 SSDT (it only installs when
!SdIsArasan) and later for the XHCI/PCIe switch
where we want to install one of two tables
depending on whether a single Pcd is set.

Signed-off-by: Jeremy Linton <jeremy.lin...@arm.com>
---
  Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c 
b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
index 9581bc41e1..ca7533cbee 100644
--- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
+++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
@@ -616,6 +616,7 @@ typedef struct {
  typedef struct {

    UINT64                      OemTableId;

    UINTN                       PcdToken;

+  UINTN                       PcdTokenNot;

    CONST AML_NAME_OP_REPLACE   *SdtNameOpReplace;

  } NAMESPACE_TABLES;

@@ -713,6 +714,9 @@ VerifyUpdateTable (
    if (SdtTable->PcdToken && !LibPcdGet32 (SdtTable->PcdToken)) {

      Result = FALSE;

    }

+  if (SdtTable->PcdTokenNot && LibPcdGet32 (SdtTable->PcdTokenNot)) {

+    Result = FALSE;

+  }

    if (Result && SdtTable->SdtNameOpReplace) {

      UpdateSdtNameOps (AcpiHeader, SdtTable->SdtNameOpReplace);

    }

@@ -730,11 +734,13 @@ STATIC CONST NAMESPACE_TABLES SdtTables[] = {
    {

      SIGNATURE_64 ('R', 'P', 'I', 'T', 'H', 'F', 'A', 'N'),

      PcdToken(PcdFanOnGpio),

+    0,

      SsdtNameOpReplace

    },

    {

      SIGNATURE_64 ('R', 'P', 'I', 0, 0, 0, 0, 0),

      0,

+    0,

      NULL

    },

    { }


Reviewed-by: Pete Batard <p...@akeo.ie>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#71472): https://edk2.groups.io/g/devel/message/71472
Mute This Topic: https://groups.io/mt/80300531/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to