From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out03.hibox.biz (out03.hibox.biz [210.71.195.44]) by mx.groups.io with SMTP id smtpd.web09.3642.1608154213383033813 for ; Wed, 16 Dec 2020 13:30:14 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: insyde.com, ip: 210.71.195.44, mailfrom: tim.lewis@insyde.com) IronPort-SDR: 5VgVjfy07tpyhSZygHJEGWIKYfJGKBc5f9889jNQDLJTgo49mBtkoIQpZ1i+gczjepWUx/o46B 3lrvo2nnx47g== X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2ANBQAFedpf/w00GKxiHgEBCxIMR4J?= =?us-ascii?q?rgXxXYYN3SIkEiCIDg0WMEBSEMIgbCwEBAQEBAQEBAQkjCQECBAEBhEQEAgK?= =?us-ascii?q?BcSY4EwIDAQELAQEGAQEBAQEGBIZSDIVyAQEFCAIZCiEIMAUGAw0EBAEBDho?= =?us-ascii?q?DAhsYFQkIAgQBEgsFDQSDBoF+gQgPrFd2gTIaAoQiAYEYhReBOIFlhH0NgkS?= =?us-ascii?q?DcoJBgRGCay4+hDsPAiiCYYJfBIJDKWMJHAaBDgkaMwIYYpJqiUaaOIEPB4w?= =?us-ascii?q?akigihFSOOgOPLJIXgW6LDZE8hQeBbWeBE3BQgmkJNhEZhF2JXReGMogVIzA?= =?us-ascii?q?CNQIGAQkBAQMJdAgVAYkrAQE?= X-IronPort-AV: E=Sophos;i="5.78,425,1599494400"; d="scan'208,217";a="43747407" Received: from unknown (HELO hb3-BKT203.hibox.biz) ([172.24.52.13]) by out03.hibox.biz with ESMTP; 17 Dec 2020 05:30:10 +0800 IronPort-SDR: 1RDZCP934pDzOXHUPPph7322WAqdWRxgKKzzG3ksKE6fqz26OgMZFpX20XjUDf4a1nOgXh8cik oNNDDlW+am4g== Received: from unknown (HELO hb3-BKT103.hibox.biz) ([172.24.51.13]) by hb3-BKT203.hibox.biz with ESMTP; 17 Dec 2020 05:30:11 +0800 IronPort-SDR: bMV7fWq5Tg/a832bAkmLAn2+Pgf/U7H/BoZ4jKVe4WM9NFsrk629PubWlg2+1YOa/4/e6WeBoq c7z4vpG4E+Aw== Received: from unknown (HELO hb3-IN01.hibox.biz) ([172.24.12.11]) by hb3-BKT103.hibox.biz with ESMTP; 17 Dec 2020 05:30:11 +0800 IronPort-SDR: EGZoVS43XMtrqeZp08vgVX61Xjp/3G9dbz9GMtb3oOFbMf/VPXoJTqZ6Lyp3Wt77u0mvtILVtO N1FsO7KfJ3mw== X-Remote-IP: 73.116.1.175 X-Remote-Host: c-73-116-1-175.hsd1.ca.comcast.net X-SBRS: -10.0 X-MID: 47604502 X-Auth-ID: tim.lewis@insyde.com X-EnvelopeFrom: tim.lewis@insyde.com hiBox-Sender: 1 Received: from c-73-116-1-175.hsd1.ca.comcast.net (HELO DESKTOPHG9V3E8) ([73.116.1.175]) by hb3-IN01.hibox.biz with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2020 05:30:07 +0800 From: "Tim Lewis" To: "'Kinney, Michael D'" , In-Reply-To: Subject: Re: [edk2-devel] How to assign NULL to a VOID* PCD? Date: Wed, 16 Dec 2020 13:30:06 -0800 Message-ID: <04b301d6d3f2$a107aef0$e3170cd0$@insyde.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQK6cJi3xaaDAvLJcqhcNuelkOw53KgzA7Zg Content-Type: multipart/alternative; boundary="----=_NextPart_000_04B4_01D6D3AF.92E55950" Content-Language: en-us ------=_NextPart_000_04B4_01D6D3AF.92E55950 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Mike =E2=80=93 I understand, but this just adds another layer of complexity. For example,= we had a list of exception numbers (0x00-0xff) and then had to move away f= rom UINT8 because it couldn=E2=80=99t hold a terminating or illegal value. = We prefer to use PcdGetSize. It may be something we will change in our own = codebase. =20 Tim =20 From: Kinney, Michael D =20 Sent: Wednesday, December 16, 2020 1:28 PM To: devel@edk2.groups.io; tim.lewis@insyde.com; Kinney, Michael D Subject: RE: [edk2-devel] How to assign NULL to a VOID* PCD? =20 Hi Tim, =20 Assigning NULL to a VOID* PCD is not supported. =20 I recommend you design the structure that the VOID* type PCD points to be = self describing. You can put a count field or if it is an array, use can u= se a tag in a field to mark the end of the array. =20 Mike =20 From: devel@edk2.groups.io > On Behalf Of Tim Lewis Sent: Wednesday, December 16, 2020 11:06 AM To: devel@edk2.groups.io =20 Subject: [edk2-devel] How to assign NULL to a VOID* PCD? =20 I want the PCD database to contain a NULL to a PCD that is of type VOID* b= ut this does not seem to be allowed in the .dsc files. =20 In .dec files, I can assign an for the value, which lets me p= ut a 0. But the syntax for .dsc files only lets me put data. So for array c= ases where I want 0 entries, I am always forced to put at least 1 dummy ent= ry. Normally, I would like to use PcdGetSize to get the total array size. =20 Any pointers? =20 Thanks, =20 Tim ------=_NextPart_000_04B4_01D6D3AF.92E55950 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Mike =E2=80=93

I= understand, but this just adds another layer of complexity. For example, w= e had a list of exception numbers (0x00-0xff) and then had to move away fro= m UINT8 because it couldn=E2=80=99t hold a terminating or illegal value. We= prefer to use PcdGetSize. It may be something we will change in our own co= debase.

 

Tim

 

=

From: Kinney, Michael D <michael.d.= kinney@intel.com>
Sent: Wednesday, December 16, 2020 1:28 PM<= br>To: devel@edk2.groups.io; tim.lewis@insyde.com; Kinney, Michael D= <michael.d.kinney@intel.com>
Subject: RE: [edk2-devel] How= to assign NULL to a VOID* PCD?

 

Hi Tim,

 

Assigning NULL to a= VOID* PCD is not supported.

 =

I recommend you design the structure that th= e VOID* type PCD points to be self describing.=C2=A0 You can put a count fi= eld or if it is an array, use can use a tag in a field to mark the end of t= he array.

 

Mike

 

=

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tim Lewis
Sen= t: Wednesday, December 16, 2020 11:06 AM
To: devel@edk2.groups.io
Subject: [edk2-d= evel] How to assign NULL to a VOID* PCD?

 

I want the PCD data= base to contain a NULL to a PCD that is of type VOID* but this does not see= m to be allowed in the .dsc files.

=  

In .dec files, I can assign an <Exp= ression> for the value, which lets me put a 0. But the syntax for .dsc f= iles only lets me put data. So for array cases where I want 0 entries, I am= always forced to put at least 1 dummy entry. Normally, I would like to use= PcdGetSize to get the total array size.

 

Any pointers?

 

Thanks,

 

Tim

<= /html> ------=_NextPart_000_04B4_01D6D3AF.92E55950--