From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.79]) by mx.groups.io with SMTP id smtpd.web09.445.1612805058735199489 for ; Mon, 08 Feb 2021 09:24:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@vmware.com header.s=selector2 header.b=ZNNi53QU; spf=pass (domain: vmware.com, ip: 40.107.244.79, mailfrom: awarkentin@vmware.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XVUGXJzDSuct8Wzs2UVdXxMKHJWGj+vOKkMZPM7ATxKJnG+b41n/C9e9QRYrvBVQ0rzf0qRiS3BL3t/jw3n16dl1SqDlX7p6jpVHLkQs1Qspo1eCtdU0CB+iO4xJUjUgwaivGHUMdafyH9N3OG09dHeyKl9CjoWbW4qbVupTTjx6VF4O0trDgjuWCGFdGlBHQX2nBgBuUU9GK/FYGb2g6+vVaMw0uMv7wf/J6rZIqREjNvEwZv0m8MJZthoqHDhbC5vfFMcDgaBhoFuvG4atA5eo/QpNinLf565lKlfGUEZjQZd1njREXrgma1axCClGr622BVcLs/3k6gFqK5HGHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xyw9xwhfB6yESPGggW0Jq4qo7IZ7VXW51GyZECEFId0=; b=FW7lujkGrrXjKeYSuBVKDDcQY+qwNKMREY/IVpF0OAzMgwuEonoiTJf6qEaEVujPa5MmtE+4PxKVtl1TiD803TIe4uyyGQAVWdVJzqaUmWDza+ZaRcLwwHMcXh1BqfgLwrShXhU9YwSndzbRJL2y8emHp1xzG8bH9HE1ivrO068HJD2yihco77fLkAzutokFCXDFnryaEUaYZ5abag//TWSatrKRAnkTwGP24vYvTzZFEWsI2GgtCexy7yIXZge+SHIJ0Te57CYl/VQYHSbLZRb0gVWyhVjAmGFv/zFm0/0zvERnCo+MIMghHcgbLYYrwvd7Orfct0J99x7c209QJw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xyw9xwhfB6yESPGggW0Jq4qo7IZ7VXW51GyZECEFId0=; b=ZNNi53QU2kcwftzLX1DHi1z0/BGY1HY60AjEnrrtufjpgBuvHSJf2IERuodeee2PIvVJrzgYMBkSXLt2WPkBTL0Jq2L40jTAy/awlzc4lNjvcpFPlHHRmfl3qF99C6E/TSiX0ses0bIhh4gcCDnj04DD6a5APVvs4izOLjYHuTw= Received: from (2603:10b6:806:f7::16) by SN6PR05MB5469.namprd05.prod.outlook.com (2603:10b6:805:bf::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.11; Mon, 8 Feb 2021 17:24:15 +0000 Received: from SN7PR05MB7582.namprd05.prod.outlook.com ([fe80::d1f7:9f0e:9655:eadb]) by SN7PR05MB7582.namprd05.prod.outlook.com ([fe80::d1f7:9f0e:9655:eadb%4]) with mapi id 15.20.3846.025; Mon, 8 Feb 2021 17:24:15 +0000 From: "Andrei Warkentin" To: Pete Batard , Jeremy Linton , "devel@edk2.groups.io" CC: "samer.el-haj-mahmoud@arm.com" , "leif@nuviainc.com" , "ardb+tianocore@kernel.org" Subject: Re: [PATCH v2 1/4] Platform/RaspberryPi: Add Negative table check Thread-Topic: [PATCH v2 1/4] Platform/RaspberryPi: Add Negative table check Thread-Index: AQHW+O0cFKvVSSYlyEieqbA6qeb0U6pOiCKAgAAEWvU= Date: Mon, 8 Feb 2021 17:24:14 +0000 Message-ID: References: <20210201225343.2001835-1-jeremy.linton@arm.com> <20210201225343.2001835-2-jeremy.linton@arm.com>,<6a6cf76d-1f53-05a4-68f8-7d36f2640048@akeo.ie> In-Reply-To: <6a6cf76d-1f53-05a4-68f8-7d36f2640048@akeo.ie> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: akeo.ie; dkim=none (message not signed) header.d=none;akeo.ie; dmarc=none action=none header.from=vmware.com; x-originating-ip: [69.174.145.79] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8cbde086-0129-47e6-d7ce-08d8cc565baa x-ms-traffictypediagnostic: SN6PR05MB5469: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3631; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8sMU9wOccIeIeQVyZhU7QmGxpDhzOql3k8bW4z2kMUxC72V0CQ2NfCNE1lndCn4V/DJ7V+TVruCRne0yi/SAzchA5GsA9KrG/bY8BZ8UcqKaDToV2iOUXdaNHFiGleKiv4CCZPks6OMiktypPe3PDIhEwLFRtKzW+nXmb/yeZtos8puYtv/q5BMegIJxg7NhwsOVc75Yabcmz4Nx3eMi77SXmfS0ggOThQz54hRLzTHzwAgRaaee/cxFa7mbKrP6TPjajLq3SIIFjBNLy+NLGmn+WTOhmLX8VRLnEnRRGWJ4uoUe6QrTHiYgpZk1lC+IOK/9Z2r+fp7c9PB56KVjXt2QudeFnnR11wIDva5fnpkGpkaczSDzadDS20S18aZWs8ulVuEw8GwusiIjmujYB1YTtbg1U06djw9Ev54HqOoS7YlG3P1sVVw7f6sOMckQj5nYZe93BBfb8mKwFcJ+xwO9nMZzTP3d+x10puT7thA234uZjgqKDeOK8z4OXYSodrFg2YWVa9CoKiBC+ebdGw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR05MB7582.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(136003)(39860400002)(346002)(376002)(366004)(54906003)(316002)(83380400001)(110136005)(71200400001)(8936002)(7696005)(2906002)(6506007)(4326008)(86362001)(186003)(53546011)(19627405001)(26005)(33656002)(8676002)(66946007)(9686003)(5660300002)(52536014)(66556008)(76116006)(66476007)(66446008)(55016002)(478600001)(64756008);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?8qxpzKMYOJs/QrLys/uHw+JMaMMmWw7Bn9XNZVIHEP/N04hdg5pk3iX0fYgO?= =?us-ascii?Q?AkQfu70wjKmTyEO/YIIk2/okE8UKu5dbElWEcrs/SEvjeRwpypx8mbtvKND9?= =?us-ascii?Q?jfRSacbPZ7tsBh0/cHXFVLsNZQ2rjFdrqcBsx/Mlc1+RU5VnhTZVgeUak8A/?= =?us-ascii?Q?RBfDqTNTXgTYVGe2MTqKjJXhmG313y0FuSYj5M6q4dZcBVjYQbj4z2w5eYDI?= =?us-ascii?Q?qXud64KHDdU9eJr+OLkAx5kHKXP5MDq+MW8NeNdtQ8PxtBEHk62DmqBUU9YM?= =?us-ascii?Q?kefSXTBRDt2O2wx60b9mGe4nKUozmSz8Lhjeyt8tv7f0vBATI95bmYqqcgvP?= =?us-ascii?Q?46oA3FTpj9BYs+mx9PWzCAEFh1jLgy8VTyfU4Gq24d/0x7W1w24t+KiTRPkK?= =?us-ascii?Q?5Zw6ULepl/yelsXkY//RuSziWChOoKJZQYJ4Beax1fEJ98Go6aiX0bt06uZH?= =?us-ascii?Q?cVME69ekOtkhAWIfhdnM1XEzCImgLWco/x/77uDRuHHnxuJ/iWxXf2Cu3Gqc?= =?us-ascii?Q?RGz5IBXdDmLzYORv5NBEs9v8OAjxl6RNc5wBUvIhzaP4jXI/u7/CxyIf33rh?= =?us-ascii?Q?gBbbJflP3D+BE5F+XR2ClvqoZPWI7abF/EWbUtBhc5IY3/PFlm+qzDWYOjYM?= =?us-ascii?Q?ZseKQ5UkOhr/xlTZRHbQh/KMZfqixUvoxJbBmbe+jCtr17HtV/wpUuIAbDzS?= =?us-ascii?Q?YyjWO3rKg639zm4uIkCtcy7bUi/c+uzG/Ma3T5sRRE8jYEdVECxj2z55x6N3?= =?us-ascii?Q?+a8Fga5ffOCdwgZmMf6sWiAEnoycPGYXpv9XbyUyi5M3spQJo4dCdLtJvU5l?= =?us-ascii?Q?v5muV2icINZhk3JzzKAcFLt0luvnh8ijsjIaHoKdJTE/KvWfZ05oG9o8hplk?= =?us-ascii?Q?csYWyy+Fa/+ef4wk81Eyq7g7rO7dojYuoUcGpEcxAKsvyFcxaVlY3WyhyttV?= =?us-ascii?Q?Bwqm81ekEZy6mYQCmcXFlbSUEGXsaFQXKPwE+hpcvMMSF4zwbiJTV8D1TSRz?= =?us-ascii?Q?0MzdNEWaqeR0i3fPG1RXtbOTQYS6ep6pyIdEyiZbyqGy4Y2LFlbn/IK+xzON?= =?us-ascii?Q?OW4FRKt+Hq3X1uZHs8frZ6JJ0Z4VEzxVw7jQh/bNuHA8UyWTaqm9+nz4SJn+?= =?us-ascii?Q?JyMwOZPvY9+ko7V65EVYbKFNo5mE4YoJoJmuNpFUmJU8L+CACRU9fwZqJAam?= =?us-ascii?Q?cF8Jovewj16E65KBg+DwSWD1b0Z/AvM9EGIY4okceB+z0+bvdD73RBGhC22c?= =?us-ascii?Q?1q5xCbdTJbMfGcZuoaDClIcjmpnO48HjYV3RMUdHq5kyaG25YgUboFg8AwCh?= =?us-ascii?Q?2m8=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR05MB7582.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8cbde086-0129-47e6-d7ce-08d8cc565baa X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Feb 2021 17:24:14.8887 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: G6HQWxGhJ7xLJ43sVEU9rXlwvjTy+QrwSFtMcvBIU/+jem/scwr3Dj9+Rgj0jbvw0+6dTqtwWwdRLWlJ2Sl6bA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB5469 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_SN7PR05MB7582D95446B5A9B325532273B98F9SN7PR05MB7582namp_" --_000_SN7PR05MB7582D95446B5A9B325532273B98F9SN7PR05MB7582namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Andrei Warkentin ________________________________ From: Pete Batard Sent: Monday, February 8, 2021 11:08 AM To: Jeremy Linton ; devel@edk2.groups.io Cc: Andrei Warkentin ; samer.el-haj-mahmoud@arm.com = ; leif@nuviainc.com ; ardb= +tianocore@kernel.org Subject: Re: [PATCH v2 1/4] Platform/RaspberryPi: Add Negative table check 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/Platfor= m/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 =3D FALSE; > > } > > + if (SdtTable->PcdTokenNot && LibPcdGet32 (SdtTable->PcdTokenNot)) { > > + Result =3D FALSE; > > + } > > if (Result && SdtTable->SdtNameOpReplace) { > > UpdateSdtNameOps (AcpiHeader, SdtTable->SdtNameOpReplace); > > } > > @@ -730,11 +734,13 @@ STATIC CONST NAMESPACE_TABLES SdtTables[] =3D { > { > > 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 --_000_SN7PR05MB7582D95446B5A9B325532273B98F9SN7PR05MB7582namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>

From: Pete Batard <pete@= akeo.ie>
Sent: Monday, February 8, 2021 11:08 AM
To: Jeremy Linton <jeremy.linton@arm.com>; devel@edk2.groups.i= o <devel@edk2.groups.io>
Cc: Andrei Warkentin <awarkentin@vmware.com>; samer.el-haj-mah= moud@arm.com <samer.el-haj-mahmoud@arm.com>; leif@nuviainc.com <le= if@nuviainc.com>; ardb+tianocore@kernel.org <ardb+tianocore@kernel.or= g>
Subject: Re: [PATCH v2 1/4] Platform/RaspberryPi: Add Negative table= check
 
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.linton@arm.com>
> ---
>   Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 6 +++= +++
>   1 file changed, 6 insertions(+)
>
> diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Plat= form/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      &nbs= p;            &= nbsp;  OemTableId;
>
>     UINTN       = ;            &n= bsp;   PcdToken;
>
> +  UINTN         &nb= sp;            = PcdTokenNot;
>
>     CONST AML_NAME_OP_REPLACE   *SdtName= OpReplace;
>
>   } NAMESPACE_TABLES;
>
>  
>
> @@ -713,6 +714,9 @@ VerifyUpdateTable (
>     if (SdtTable->PcdToken && !LibPcdGe= t32 (SdtTable->PcdToken)) {
>
>       Result =3D FALSE;
>
>     }
>
> +  if (SdtTable->PcdTokenNot && LibPcdGet32 (SdtTable-= >PcdTokenNot)) {
>
> +    Result =3D FALSE;
>
> +  }
>
>     if (Result && SdtTable->SdtNameOpRe= place) {
>
>       UpdateSdtNameOps (AcpiHeader, SdtT= able->SdtNameOpReplace);
>
>     }
>
> @@ -730,11 +734,13 @@ STATIC CONST NAMESPACE_TABLES SdtTables[] =3D {<= br> >     {
>
>       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 <pete@akeo.ie>
--_000_SN7PR05MB7582D95446B5A9B325532273B98F9SN7PR05MB7582namp_--