[edk2-devel] [PATCH v3 1/4] Platform/RaspberryPi: Add Negative table check
jlinton
lintonrjeremy at gmail.com
Wed Feb 17 06:18:06 UTC 2021
From: Jeremy Linton <jeremy.linton at arm.com>
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.linton at arm.com>
Reviewed-by: Pete Batard <pete at akeo.ie>
Reviewed-by: Andrei Warkentin <awarkentin at vmware.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 578f5ead8f..fc1b5f3420 100644
--- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
+++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c
@@ -606,6 +606,7 @@ typedef struct {
typedef struct {
UINT64 OemTableId;
UINTN PcdToken;
+ UINTN PcdTokenNot;
CONST AML_NAME_OP_REPLACE *SdtNameOpReplace;
} NAMESPACE_TABLES;
@@ -703,6 +704,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);
}
@@ -720,11 +724,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
},
{ }
--
2.13.7
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#71740): https://edk2.groups.io/g/devel/message/71740
Mute This Topic: https://groups.io/mt/80703636/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list