[edk2-devel][PATCH] BaseTools: Increase the DevicePath length for support more PCD value.

Jiang, Xiaolu xiaolu.jiang at intel.com
Mon Nov 8 03:20:57 UTC 2021


Hi Liming,

It's a good suggestion, I will try it first, Thanks !

-----Original Message-----
From: gaoliming <gaoliming at byosoft.com.cn> 
Sent: Monday, November 8, 2021 11:18 AM
To: Jiang, Xiaolu <xiaolu.jiang at intel.com>; devel at edk2.groups.io
Cc: Feng, Bob C <bob.c.feng at intel.com>; Chen, Christine <yuwei.chen at intel.com>; Fu, Siyuan <siyuan.fu at intel.com>
Subject: 回复: [edk2-devel][PATCH] BaseTools: Increase the DevicePath length for support more PCD value.

Xiaolu:
  Can you calculate the required memory, then allocate it instead of use hard code memory length?

Thanks
Liming
> -----邮件原件-----
> 发件人: Jiang, Xiaolu <xiaolu.jiang at intel.com>
> 发送时间: 2021年11月8日 10:26
> 收件人: gaoliming <gaoliming at byosoft.com.cn>; devel at edk2.groups.io
> 抄送: Feng, Bob C <bob.c.feng at intel.com>; Chen, Christine 
> <yuwei.chen at intel.com>; Fu, Siyuan <siyuan.fu at intel.com>
> 主题: RE: [edk2-devel][PATCH] BaseTools: Increase the DevicePath length 
> for support more PCD value.
> 
> Hi Liming,
> 
> I have checked with Team member , Totally We need support 50+ Driver 
> GUID in DevicePath PCD value ,So the length need to increase again, I 
> will change the Patch and re-send again.
> 
> Thanks!
> 
> -----Original Message-----
> From: Jiang, Xiaolu
> Sent: Monday, November 8, 2021 9:24 AM
> To: gaoliming <gaoliming at byosoft.com.cn>; devel at edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng at intel.com>; Chen, Christine 
> <Yuwei.Chen at intel.com>
> Subject: RE: [edk2-devel][PATCH] BaseTools: Increase the DevicePath 
> length for support more PCD value.
> 
> 1. Currently  the PCD value length is More than 1024, less than 2048, 
> 2. Now we have 14 members, Also need to add 4~6 part to the PCD.
> So we Increase the length to 4096.
> 
> -----Original Message-----
> From: gaoliming <gaoliming at byosoft.com.cn>
> Sent: Monday, November 8, 2021 9:15 AM
> To: Jiang, Xiaolu <xiaolu.jiang at intel.com>; devel at edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng at intel.com>; Chen, Christine 
> <yuwei.chen at intel.com>
> Subject: 回复: [edk2-devel][PATCH] BaseTools: Increase the DevicePath 
> length for support more PCD value.
> 
> Xiaolu:
>   Why choose 4096? Is it enough?
> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: Xiaolu.Jiang <xiaolu.jiang at intel.com>
> > 发送时间: 2021年11月6日 11:51
> > 收件人: devel at edk2.groups.io
> > 抄送: Xiaolu.Jiang <xiaolu.jiang at intel.com>; Bob Feng 
> > <bob.c.feng at intel.com>; Liming Gao <gaoliming at byosoft.com.cn>; Yuwei 
> > Chen <yuwei.chen at intel.com>
> > 主题: [edk2-devel][PATCH] BaseTools: Increase the DevicePath length 
> > for support more PCD value.
> >
> > Currently the PCD Value only support 13 Guid,When use more 13 pcd 
> > will cause the build tool fail, Need increase the DevicePath length 
> > to support more value.
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3718
> >
> > Cc: Bob Feng <bob.c.feng at intel.com>
> > Cc: Liming Gao <gaoliming at byosoft.com.cn>
> > Cc: Yuwei Chen <yuwei.chen at intel.com>
> >
> > Signed-off-by: Xiaolu Jiang <xiaolu.jiang at intel.com>
> > ---
> >  BaseTools/Source/C/DevicePath/DevicePath.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/BaseTools/Source/C/DevicePath/DevicePath.c
> > b/BaseTools/Source/C/DevicePath/DevicePath.c
> > index c4d224ed61..ef493f5506 100644
> > --- a/BaseTools/Source/C/DevicePath/DevicePath.c
> > +++ b/BaseTools/Source/C/DevicePath/DevicePath.c
> > @@ -170,7 +170,7 @@ int main(int argc, CHAR8 *argv[])
> >      fprintf(stderr, "Invalid option value, Device Path can't be 
> > NULL");
> >
> >      return STATUS_ERROR;
> >
> >    }
> >
> > -  Str16 = (CHAR16 *)malloc(1024);
> >
> > +  Str16 = (CHAR16 *)malloc(4096);
> >
> >    if (Str16 == NULL) {
> >
> >      fprintf(stderr, "Resource, memory cannot be allocated");
> >
> >      return STATUS_ERROR;
> >
> > --
> > 2.30.2.windows.1
> 
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83457): https://edk2.groups.io/g/devel/message/83457
Mute This Topic: https://groups.io/mt/86909730/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