[edk2-devel] [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg

Dandan Bi posted 29 patches 4 years, 10 months ago
There is a newer version of this series
[edk2-devel] [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg
Posted by Dandan Bi 4 years, 10 months ago
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

MdeLibs.dsc.inc is added for some default libraries provided by MdePkg.
Platform can include MdeLibs.dsc.inc file to avoid some potential
incompatible changes to platform dsc file in future.

Only add RegisterFilterLib into it as the first version of MdeLibs.dsc.inc.
Can update and maintain MdeLibs.dsc.inc gradually later.

"MdeLibs.dsc.inc" for the [LibraryClasses*] section(s)

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdePkg/MdeLibs.dsc.inc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 MdePkg/MdeLibs.dsc.inc

diff --git a/MdePkg/MdeLibs.dsc.inc b/MdePkg/MdeLibs.dsc.inc
new file mode 100644
index 0000000000..75e516c21a
--- /dev/null
+++ b/MdePkg/MdeLibs.dsc.inc
@@ -0,0 +1,14 @@
+## @file
+# Mde DSC include file for [LibraryClasses*] section of all Architectures.
+#
+# This file can be included to the [LibraryClasses*] section(s) of a platform DSC file
+# by using "!include MdePkg/MdeLibs.dsc.inc" to specify the library instances
+# of some EDKII basic/common library classes.
+#
+# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+#
+#    SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
-- 
2.18.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#73073): https://edk2.groups.io/g/devel/message/73073
Mute This Topic: https://groups.io/mt/81519241/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg
Posted by Laszlo Ersek 4 years, 10 months ago
On 03/22/21 09:09, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> MdeLibs.dsc.inc is added for some default libraries provided by MdePkg.
> Platform can include MdeLibs.dsc.inc file to avoid some potential
> incompatible changes to platform dsc file in future.
> 
> Only add RegisterFilterLib into it as the first version of MdeLibs.dsc.inc.
> Can update and maintain MdeLibs.dsc.inc gradually later.
> 
> "MdeLibs.dsc.inc" for the [LibraryClasses*] section(s)
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdePkg/MdeLibs.dsc.inc | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>  create mode 100644 MdePkg/MdeLibs.dsc.inc
> 
> diff --git a/MdePkg/MdeLibs.dsc.inc b/MdePkg/MdeLibs.dsc.inc
> new file mode 100644
> index 0000000000..75e516c21a
> --- /dev/null
> +++ b/MdePkg/MdeLibs.dsc.inc
> @@ -0,0 +1,14 @@
> +## @file
> +# Mde DSC include file for [LibraryClasses*] section of all Architectures.
> +#
> +# This file can be included to the [LibraryClasses*] section(s) of a platform DSC file
> +# by using "!include MdePkg/MdeLibs.dsc.inc" to specify the library instances
> +# of some EDKII basic/common library classes.

I think Liming or Mike might want to propose improved wording for
"basic/common". Personally I'm fine with "basic/common", I just think a
more precise definition for MdePkg's content / scope might exist.

With or without a more precise expression for "basic/common":

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks
Laszlo

> +#
> +# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
> +#
> +#    SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#73143): https://edk2.groups.io/g/devel/message/73143
Mute This Topic: https://groups.io/mt/81519241/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg
Posted by Ni, Ray 4 years, 10 months ago
Dandan,
The MdeLibs.dsc.inc is almost empty with this patch. And the DSCs in consumer pkgs are not significantly simplified with this DSC header.

Can you please submit a Bugzilla to capture the task that lists libs in MdeLibs.dsc.inc and simplifies all existing consumer pkgs?


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#73176): https://edk2.groups.io/g/devel/message/73176
Mute This Topic: https://groups.io/mt/81519241/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg
Posted by Michael D Kinney 4 years, 10 months ago
Dandan,

I have a concern about the context of the dsc.inc file.

You assume that the MdeLibs.dsc.inc file will be included from
the common [LibraryClasses] section.

This means that this dsc.inc file can not be extended to support
CPU arch specific lib mappings.

I recommend this dsc.inc file contain the [LibraryClasses] 
line and that the MdeLibs.dsc.inc file be included just before
the [LibraryClasses] line in the consuming DSC files.

For example, there are some required library class mappings
for ARM and AARCH64 that are the same in every DSC file.
I want to have the option to add CPU or module specific 
lib mappings to MdeLibs.dsc.inc.

[LibraryClasses.ARM, LibraryClasses.AARCH64]
  #
  # It is not possible to prevent ARM compiler calls to generic intrinsic functions.
  # This library provides the instrinsic functions generated by a given compiler.
  # [LibraryClasses.ARM] and NULL mean link this library into all ARM images.
  #
  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf

  #
  # Since software stack checking may be heuristically enabled by the compiler
  # include BaseStackCheckLib unconditionally.
  #
  NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf


Mike

> -----Original Message-----
> From: Bi, Dandan <dandan.bi@intel.com>
> Sent: Monday, March 22, 2021 1:09 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>; Laszlo Ersek <lersek@redhat.com>
> Subject: [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> MdeLibs.dsc.inc is added for some default libraries provided by MdePkg.
> Platform can include MdeLibs.dsc.inc file to avoid some potential
> incompatible changes to platform dsc file in future.
> 
> Only add RegisterFilterLib into it as the first version of MdeLibs.dsc.inc.
> Can update and maintain MdeLibs.dsc.inc gradually later.
> 
> "MdeLibs.dsc.inc" for the [LibraryClasses*] section(s)
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdePkg/MdeLibs.dsc.inc | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>  create mode 100644 MdePkg/MdeLibs.dsc.inc
> 
> diff --git a/MdePkg/MdeLibs.dsc.inc b/MdePkg/MdeLibs.dsc.inc
> new file mode 100644
> index 0000000000..75e516c21a
> --- /dev/null
> +++ b/MdePkg/MdeLibs.dsc.inc
> @@ -0,0 +1,14 @@
> +## @file
> +# Mde DSC include file for [LibraryClasses*] section of all Architectures.
> +#
> +# This file can be included to the [LibraryClasses*] section(s) of a platform DSC file
> +# by using "!include MdePkg/MdeLibs.dsc.inc" to specify the library instances
> +# of some EDKII basic/common library classes.
> +#
> +# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
> +#
> +#    SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
> --
> 2.18.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#73302): https://edk2.groups.io/g/devel/message/73302
Mute This Topic: https://groups.io/mt/81519241/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg
Posted by Dandan Bi 4 years, 10 months ago
Thanks Mike.
I will submit a new version to address that.


Thanks,
Dandan
> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Friday, March 26, 2021 8:49 AM
> To: Bi, Dandan <dandan.bi@intel.com>; devel@edk2.groups.io; Kinney,
> Michael D <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>; Laszlo Ersek <lersek@redhat.com>
> Subject: RE: [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg
> 
> Dandan,
> 
> I have a concern about the context of the dsc.inc file.
> 
> You assume that the MdeLibs.dsc.inc file will be included from the common
> [LibraryClasses] section.
> 
> This means that this dsc.inc file can not be extended to support CPU arch
> specific lib mappings.
> 
> I recommend this dsc.inc file contain the [LibraryClasses] line and that the
> MdeLibs.dsc.inc file be included just before the [LibraryClasses] line in the
> consuming DSC files.
> 
> For example, there are some required library class mappings for ARM and
> AARCH64 that are the same in every DSC file.
> I want to have the option to add CPU or module specific lib mappings to
> MdeLibs.dsc.inc.
> 
> [LibraryClasses.ARM, LibraryClasses.AARCH64]
>   #
>   # It is not possible to prevent ARM compiler calls to generic intrinsic
> functions.
>   # This library provides the instrinsic functions generated by a given compiler.
>   # [LibraryClasses.ARM] and NULL mean link this library into all ARM images.
>   #
>   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> 
>   #
>   # Since software stack checking may be heuristically enabled by the
> compiler
>   # include BaseStackCheckLib unconditionally.
>   #
>   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
> 
> 
> Mike
> 
> > -----Original Message-----
> > From: Bi, Dandan <dandan.bi@intel.com>
> > Sent: Monday, March 22, 2021 1:09 AM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao
> > <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>;
> > Laszlo Ersek <lersek@redhat.com>
> > Subject: [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> >
> > MdeLibs.dsc.inc is added for some default libraries provided by MdePkg.
> > Platform can include MdeLibs.dsc.inc file to avoid some potential
> > incompatible changes to platform dsc file in future.
> >
> > Only add RegisterFilterLib into it as the first version of MdeLibs.dsc.inc.
> > Can update and maintain MdeLibs.dsc.inc gradually later.
> >
> > "MdeLibs.dsc.inc" for the [LibraryClasses*] section(s)
> >
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> > ---
> >  MdePkg/MdeLibs.dsc.inc | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >  create mode 100644 MdePkg/MdeLibs.dsc.inc
> >
> > diff --git a/MdePkg/MdeLibs.dsc.inc b/MdePkg/MdeLibs.dsc.inc new file
> > mode 100644 index 0000000000..75e516c21a
> > --- /dev/null
> > +++ b/MdePkg/MdeLibs.dsc.inc
> > @@ -0,0 +1,14 @@
> > +## @file
> > +# Mde DSC include file for [LibraryClasses*] section of all Architectures.
> > +#
> > +# This file can be included to the [LibraryClasses*] section(s) of a
> > +platform DSC file # by using "!include MdePkg/MdeLibs.dsc.inc" to
> > +specify the library instances # of some EDKII basic/common library classes.
> > +#
> > +# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR> #
> > +#    SPDX-License-Identifier: BSD-2-Clause-Patent
> > +#
> > +##
> > +
> > +
> > + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilte
> > + rLibNull.inf
> > --
> > 2.18.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#73306): https://edk2.groups.io/g/devel/message/73306
Mute This Topic: https://groups.io/mt/81519241/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg
Posted by Dandan Bi 4 years, 10 months ago
Hi Mike and Liming,

V3 version was sent out, please help review it.


Thanks,
Dandan
> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Friday, March 26, 2021 8:49 AM
> To: Bi, Dandan <dandan.bi@intel.com>; devel@edk2.groups.io; Kinney,
> Michael D <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>; Laszlo Ersek <lersek@redhat.com>
> Subject: RE: [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg
> 
> Dandan,
> 
> I have a concern about the context of the dsc.inc file.
> 
> You assume that the MdeLibs.dsc.inc file will be included from the common
> [LibraryClasses] section.
> 
> This means that this dsc.inc file can not be extended to support CPU arch
> specific lib mappings.
> 
> I recommend this dsc.inc file contain the [LibraryClasses] line and that the
> MdeLibs.dsc.inc file be included just before the [LibraryClasses] line in the
> consuming DSC files.
> 
> For example, there are some required library class mappings for ARM and
> AARCH64 that are the same in every DSC file.
> I want to have the option to add CPU or module specific lib mappings to
> MdeLibs.dsc.inc.
> 
> [LibraryClasses.ARM, LibraryClasses.AARCH64]
>   #
>   # It is not possible to prevent ARM compiler calls to generic intrinsic
> functions.
>   # This library provides the instrinsic functions generated by a given compiler.
>   # [LibraryClasses.ARM] and NULL mean link this library into all ARM images.
>   #
>   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> 
>   #
>   # Since software stack checking may be heuristically enabled by the
> compiler
>   # include BaseStackCheckLib unconditionally.
>   #
>   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
> 
> 
> Mike
> 
> > -----Original Message-----
> > From: Bi, Dandan <dandan.bi@intel.com>
> > Sent: Monday, March 22, 2021 1:09 AM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao
> > <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>;
> > Laszlo Ersek <lersek@redhat.com>
> > Subject: [patch V2 02/29] MdePkg: Add MdeLibs.dsc.inc file to MdePkg
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> >
> > MdeLibs.dsc.inc is added for some default libraries provided by MdePkg.
> > Platform can include MdeLibs.dsc.inc file to avoid some potential
> > incompatible changes to platform dsc file in future.
> >
> > Only add RegisterFilterLib into it as the first version of MdeLibs.dsc.inc.
> > Can update and maintain MdeLibs.dsc.inc gradually later.
> >
> > "MdeLibs.dsc.inc" for the [LibraryClasses*] section(s)
> >
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> > ---
> >  MdePkg/MdeLibs.dsc.inc | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >  create mode 100644 MdePkg/MdeLibs.dsc.inc
> >
> > diff --git a/MdePkg/MdeLibs.dsc.inc b/MdePkg/MdeLibs.dsc.inc new file
> > mode 100644 index 0000000000..75e516c21a
> > --- /dev/null
> > +++ b/MdePkg/MdeLibs.dsc.inc
> > @@ -0,0 +1,14 @@
> > +## @file
> > +# Mde DSC include file for [LibraryClasses*] section of all Architectures.
> > +#
> > +# This file can be included to the [LibraryClasses*] section(s) of a
> > +platform DSC file # by using "!include MdePkg/MdeLibs.dsc.inc" to
> > +specify the library instances # of some EDKII basic/common library classes.
> > +#
> > +# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR> #
> > +#    SPDX-License-Identifier: BSD-2-Clause-Patent
> > +#
> > +##
> > +
> > +
> > + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilte
> > + rLibNull.inf
> > --
> > 2.18.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#73351): https://edk2.groups.io/g/devel/message/73351
Mute This Topic: https://groups.io/mt/81519241/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-