From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.groups.io with SMTP id smtpd.web11.161.1612804101300985477 for ; Mon, 08 Feb 2021 09:08:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=kpjcI2cu; spf=pass (domain: akeo.ie, ip: 209.85.128.48, mailfrom: pete@akeo.ie) Received: by mail-wm1-f48.google.com with SMTP id j11so13258512wmi.3 for ; Mon, 08 Feb 2021 09:08:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=oqPddz0gWlC7C5HSmY5oFIgAFlst5+dO6sSk6HFmb10=; b=kpjcI2cuxrDNXinRZ2OS0gI1JpcTN2ukKlXTuSy7gFNpRAINF5VyEV1XupJQhSQyGf hjhlXZ0q5Ryw7cFe2w3oTrbdPMuIACVVYOC5NKajA43U883cXpeAYPtPyx8GdScWosge bUNrdbT8DZKerb2F9ZZ8CbyKWXMZpjl5f0FjyyfX6yQt3qdydw3Iepi121volJtTQF7i MDOmkkjn4iotV8FIJIrO6LKlDCHeMazAiTNz1nQx97UvWvZTH1jgZf6DXYeVt4YzsFIG tMcRym7T11wHGkfk/ctN10vZsU5JWH2iG8YxSumUGciqlyNORDMjN3LwGIlgCh9BWMMQ bmDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oqPddz0gWlC7C5HSmY5oFIgAFlst5+dO6sSk6HFmb10=; b=eiDjscWA/479PBVgoMvLMecznxJpyk/BJPdQiPp7gv7n3CNX6kPy3lgP4AkW6pm8KV KE358xyWEEGCRJP3QudghQVLKXg8bqz9o8nAT09Suj5X1LWgy4yvyGMuS886CM4VRGxA W9p2YY34bvD9ySR2XtMPEtfMbqofxE7lieHhF+AP0n51+g745I+pgqeeNTSiJpwjfbdr Blon7Ve/gWhX0IgfSm0IU4KoCxpetQeC3TvGUxd+9MlCl0R5v+bFYCQALWq1WXVVmMvP 7BIkhNUTkB0hVIrL/08NgH9NV9FH0bxeIp0ihN3+yu2vEGwp1ezh/USoBCneu9ClBnXv RuiA== X-Gm-Message-State: AOAM5330GLwGTknH0vJMLWN0oMvCJOzfvC1lgpsqtQXuhErHcNX7FIpz kahiQ/wqjHlphx7ZEs2W+6uZxA== X-Google-Smtp-Source: ABdhPJxg2ouStb7BxgEdPlewV2x6dakRj7ys03xFgAdMAG3o9acJu1NizAeuXmsZ0LLfofYy4JK20w== X-Received: by 2002:a05:600c:2252:: with SMTP id a18mr15030256wmm.167.1612804099627; Mon, 08 Feb 2021 09:08:19 -0800 (PST) Return-Path: Received: from [10.0.0.122] ([84.203.77.31]) by smtp.googlemail.com with ESMTPSA id l1sm30594500wrp.40.2021.02.08.09.08.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Feb 2021 09:08:18 -0800 (PST) Subject: Re: [PATCH v2 1/4] Platform/RaspberryPi: Add Negative table check To: Jeremy Linton , devel@edk2.groups.io Cc: awarkentin@vmware.com, samer.el-haj-mahmoud@arm.com, leif@nuviainc.com, ardb+tianocore@kernel.org References: <20210201225343.2001835-1-jeremy.linton@arm.com> <20210201225343.2001835-2-jeremy.linton@arm.com> From: "Pete Batard" Message-ID: <6a6cf76d-1f53-05a4-68f8-7d36f2640048@akeo.ie> Date: Mon, 8 Feb 2021 17:08:17 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210201225343.2001835-2-jeremy.linton@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit 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 > --- > 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