From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.43794.1612220027949705724 for ; Mon, 01 Feb 2021 14:53:48 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jeremy.linton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8DAE91509; Mon, 1 Feb 2021 14:53:47 -0800 (PST) Received: from mammon-tx2.austin.arm.com (mammon-tx2.austin.arm.com [10.118.28.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8602D3F718; Mon, 1 Feb 2021 14:53:47 -0800 (PST) From: "Jeremy Linton" To: devel@edk2.groups.io Cc: pete@akeo.ie, awarkentin@vmware.com, samer.el-haj-mahmoud@arm.com, leif@nuviainc.com, ardb+tianocore@kernel.org, Jeremy Linton Subject: [PATCH v2 1/4] Platform/RaspberryPi: Add Negative table check Date: Mon, 1 Feb 2021 16:53:40 -0600 Message-Id: <20210201225343.2001835-2-jeremy.linton@arm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210201225343.2001835-1-jeremy.linton@arm.com> References: <20210201225343.2001835-1-jeremy.linton@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --- 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 {=0D UINT64 OemTableId;=0D UINTN PcdToken;=0D + UINTN PcdTokenNot;=0D CONST AML_NAME_OP_REPLACE *SdtNameOpReplace;=0D } NAMESPACE_TABLES;=0D =0D @@ -713,6 +714,9 @@ VerifyUpdateTable ( if (SdtTable->PcdToken && !LibPcdGet32 (SdtTable->PcdToken)) {=0D Result =3D FALSE;=0D }=0D + if (SdtTable->PcdTokenNot && LibPcdGet32 (SdtTable->PcdTokenNot)) {=0D + Result =3D FALSE;=0D + }=0D if (Result && SdtTable->SdtNameOpReplace) {=0D UpdateSdtNameOps (AcpiHeader, SdtTable->SdtNameOpReplace);=0D }=0D @@ -730,11 +734,13 @@ STATIC CONST NAMESPACE_TABLES SdtTables[] =3D { {=0D SIGNATURE_64 ('R', 'P', 'I', 'T', 'H', 'F', 'A', 'N'),=0D PcdToken(PcdFanOnGpio),=0D + 0,=0D SsdtNameOpReplace=0D },=0D {=0D SIGNATURE_64 ('R', 'P', 'I', 0, 0, 0, 0, 0),=0D 0,=0D + 0,=0D NULL=0D },=0D { }=0D --=20 2.13.7