Date   

[PATCH 17/17] CryptoPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Qin Long <qin.long@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
CryptoPkg/CryptoPkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc
index 5ae0e67..3c3e444 100644
--- a/CryptoPkg/CryptoPkg.dsc
+++ b/CryptoPkg/CryptoPkg.dsc
@@ -133,3 +133,6 @@

[Components.IPF]
CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/BaseCryptLibRuntimeCryptProtocol.inf
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 16/17] UefiCpuPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
UefiCpuPkg/UefiCpuPkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc
index b35f41b..bbd3880 100644
--- a/UefiCpuPkg/UefiCpuPkg.dsc
+++ b/UefiCpuPkg/UefiCpuPkg.dsc
@@ -124,3 +124,6 @@
UefiCpuPkg/SecCore/SecCore.inf
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 15/17] SourceLevelDebugPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
SourceLevelDebugPkg/SourceLevelDebugPkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
index bf14ec4..d9b1b84 100644
--- a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
+++ b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
@@ -107,3 +107,6 @@
SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.inf
SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.inf
SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.inf
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 14/17] ShellPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
ShellPkg/ShellPkg.dsc | 2 ++
1 file changed, 2 insertions(+)

diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc
index 25c4fad..809bd42 100644
--- a/ShellPkg/ShellPkg.dsc
+++ b/ShellPkg/ShellPkg.dsc
@@ -122,3 +122,5 @@
!endif #$(NO_SHELL_PROFILES)
}

+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 13/17] SecurityPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
SecurityPkg/SecurityPkg.dsc | 1 +
1 file changed, 1 insertion(+)

diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc
index 21cac78..0ac4dfb 100644
--- a/SecurityPkg/SecurityPkg.dsc
+++ b/SecurityPkg/SecurityPkg.dsc
@@ -325,4 +325,5 @@
[BuildOptions]
MSFT:*_*_IA32_DLINK_FLAGS = /ALIGN:256
INTEL:*_*_IA32_DLINK_FLAGS = /ALIGN:256
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

--
1.9.5.msysgit.0


[PATCH 12/17] PerformancePkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Daryl McDaniel <edk2-lists@mc2research.org>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
PerformancePkg/PerformancePkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/PerformancePkg/PerformancePkg.dsc b/PerformancePkg/PerformancePkg.dsc
index ac53c4e..4278cbd 100644
--- a/PerformancePkg/PerformancePkg.dsc
+++ b/PerformancePkg/PerformancePkg.dsc
@@ -80,3 +80,6 @@

[Components]
PerformancePkg/Dp_App/Dp.inf
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 11/17] PcAtChipsetPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
PcAtChipsetPkg/PcAtChipsetPkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.dsc b/PcAtChipsetPkg/PcAtChipsetPkg.dsc
index 0321bb2..25bb894 100644
--- a/PcAtChipsetPkg/PcAtChipsetPkg.dsc
+++ b/PcAtChipsetPkg/PcAtChipsetPkg.dsc
@@ -59,3 +59,6 @@
PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 10/17] NetworkPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
NetworkPkg/NetworkPkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc
index 3c809d5..1ef353e 100644
--- a/NetworkPkg/NetworkPkg.dsc
+++ b/NetworkPkg/NetworkPkg.dsc
@@ -123,3 +123,6 @@
NetworkPkg/IScsiDxe/IScsiDxe.inf
NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
NetworkPkg/Application/Ping6/Ping6.inf
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 09/17] MdePkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
MdePkg/MdePkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc
index 7fe9e6b..ab57689 100644
--- a/MdePkg/MdePkg.dsc
+++ b/MdePkg/MdePkg.dsc
@@ -178,3 +178,6 @@

[Components.ARM, Components.AARCH64]
MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 08/17] MdeModulePkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
MdeModulePkg/MdeModulePkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index ce29eb9..05120c7 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -460,3 +460,6 @@
[Components.X64]
MdeModulePkg/Universal/CapsulePei/CapsuleX64.inf

+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
+
--
1.9.5.msysgit.0


[PATCH 07/17] IntelFspWrapperPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
IntelFspWrapperPkg/IntelFspWrapperPkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/IntelFspWrapperPkg/IntelFspWrapperPkg.dsc b/IntelFspWrapperPkg/IntelFspWrapperPkg.dsc
index 3714e30..c960388 100644
--- a/IntelFspWrapperPkg/IntelFspWrapperPkg.dsc
+++ b/IntelFspWrapperPkg/IntelFspWrapperPkg.dsc
@@ -83,3 +83,6 @@
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x1f
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80080046
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 06/17] IntelFspPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
IntelFspPkg/IntelFspPkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/IntelFspPkg/IntelFspPkg.dsc b/IntelFspPkg/IntelFspPkg.dsc
index f3b5689..01b6e46 100644
--- a/IntelFspPkg/IntelFspPkg.dsc
+++ b/IntelFspPkg/IntelFspPkg.dsc
@@ -72,3 +72,6 @@
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x1f
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80080046
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 05/17] IntelFsp2WrapperPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
index 8292030..6496dad 100644
--- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
+++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
@@ -92,3 +92,6 @@
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x1f
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80080046
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 04/17] IntelFsp2Pkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
IntelFsp2Pkg/IntelFsp2Pkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dsc b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
index 61eb6f1..1469d35 100644
--- a/IntelFsp2Pkg/IntelFsp2Pkg.dsc
+++ b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
@@ -77,3 +77,6 @@
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x1f
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80080046
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 03/17] IntelFrameworkPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
IntelFrameworkPkg/IntelFrameworkPkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/IntelFrameworkPkg/IntelFrameworkPkg.dsc b/IntelFrameworkPkg/IntelFrameworkPkg.dsc
index afda3e7..2985d38 100644
--- a/IntelFrameworkPkg/IntelFrameworkPkg.dsc
+++ b/IntelFrameworkPkg/IntelFrameworkPkg.dsc
@@ -70,3 +70,6 @@
IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/PeiSmbusLibSmbusPpi.inf
IntelFrameworkPkg/Library/PeiHobLibFramework/PeiHobLibFramework.inf

+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
+
--
1.9.5.msysgit.0


[PATCH 02/17] IntelFrameworkModulePkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc | 3 +++
1 file changed, 3 insertions(+)

diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
index b5b0af7..a9a01aa 100644
--- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
+++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
@@ -196,3 +196,6 @@
<LibraryClasses>
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
}
+
+[BuildOptions]
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
1.9.5.msysgit.0


[PATCH 01/17] FatPkg DSC: Add build option to disable deprecated APIs

Wu, Hao A
 

Add the following definition in the [BuildOptions] section in package DSC
files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
FatPkg/FatPkg.dsc | 1 +
1 file changed, 1 insertion(+)

diff --git a/FatPkg/FatPkg.dsc b/FatPkg/FatPkg.dsc
index 9250ae0..d654120 100644
--- a/FatPkg/FatPkg.dsc
+++ b/FatPkg/FatPkg.dsc
@@ -31,6 +31,7 @@
INTEL:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG
MSFT:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG
RVCT:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
+ *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES

[LibraryClasses]
#
--
1.9.5.msysgit.0


[PATCH 00/17] Add build option to disable deprecated APIs

Wu, Hao A
 

This patch series will add the following definition in the [BuildOptions]
section in package DSC files to disable APIs that are deprecated:

[BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES


Hao Wu (17):
FatPkg DSC: Add build option to disable deprecated APIs
IntelFrameworkModulePkg DSC: Add build option to disable deprecated
APIs
IntelFrameworkPkg DSC: Add build option to disable deprecated APIs
IntelFsp2Pkg DSC: Add build option to disable deprecated APIs
IntelFsp2WrapperPkg DSC: Add build option to disable deprecated APIs
IntelFspPkg DSC: Add build option to disable deprecated APIs
IntelFspWrapperPkg DSC: Add build option to disable deprecated APIs
MdeModulePkg DSC: Add build option to disable deprecated APIs
MdePkg DSC: Add build option to disable deprecated APIs
NetworkPkg DSC: Add build option to disable deprecated APIs
PcAtChipsetPkg DSC: Add build option to disable deprecated APIs
PerformancePkg DSC: Add build option to disable deprecated APIs
SecurityPkg DSC: Add build option to disable deprecated APIs
ShellPkg DSC: Add build option to disable deprecated APIs
SourceLevelDebugPkg DSC: Add build option to disable deprecated APIs
UefiCpuPkg DSC: Add build option to disable deprecated APIs
CryptoPkg DSC: Add build option to disable deprecated APIs

CryptoPkg/CryptoPkg.dsc | 3 +++
FatPkg/FatPkg.dsc | 1 +
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc | 3 +++
IntelFrameworkPkg/IntelFrameworkPkg.dsc | 3 +++
IntelFsp2Pkg/IntelFsp2Pkg.dsc | 3 +++
IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 3 +++
IntelFspPkg/IntelFspPkg.dsc | 3 +++
IntelFspWrapperPkg/IntelFspWrapperPkg.dsc | 3 +++
MdeModulePkg/MdeModulePkg.dsc | 3 +++
MdePkg/MdePkg.dsc | 3 +++
NetworkPkg/NetworkPkg.dsc | 3 +++
PcAtChipsetPkg/PcAtChipsetPkg.dsc | 3 +++
PerformancePkg/PerformancePkg.dsc | 3 +++
SecurityPkg/SecurityPkg.dsc | 1 +
ShellPkg/ShellPkg.dsc | 2 ++
SourceLevelDebugPkg/SourceLevelDebugPkg.dsc | 3 +++
UefiCpuPkg/UefiCpuPkg.dsc | 3 +++
17 files changed, 46 insertions(+)

--
1.9.5.msysgit.0


Re: Managing GCC Assembly Code Size (AArch64)

Cohen, Eugene <eugene@...>
 

Ard, as usual you rock...

FYI there is a null token \() for GAS which you can use to concatenate
a string with a macro argument, e.g.,

.macro func, x
.globl \x
.type \x, %function
.section .text.\x
\x\():
.endm
Using the GAS .macro syntax this all collapses nicely. I tested it with one assembly function and all the right stuff happens.

So the request becomes: can we modify all of the assembly (at least Aarch64 please) to use this? How would you like to phase this in?

I think this would be an improvement, so go for it. The only thing to
be wary of is routines that fall through into the subsequent one.
Those need to remain in the same section.
Yes, I've accidentally modified these with disastrous results. I now know to stay away from them (ExceptionSupport.S in particular). :)

Thanks,

Eugene

-----Original Message-----
From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
Sent: Thursday, August 04, 2016 1:47 PM
To: Cohen, Eugene <eugene@hp.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>; edk2-devel@lists.01.org
Subject: Re: Managing GCC Assembly Code Size (AArch64)

On 4 August 2016 at 21:18, Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
On 4 August 2016 at 20:08, Cohen, Eugene <eugene@hp.com>
wrote:
Ard and Leif,

I've been too backlogged to provide a real patchset at this point but
wanted to get your approval on this proposal...


As you know we have some code size sensitive uncompressed XIP
stuff going on. For C code we get dead code stripping thanks to the "-
ffunction-sections" switch which places each function in its own
section so the linker can strip unreferenced sections.

For assembly there is not a solution that's as easy. For RVCT we
handled this with an assembler macro that combined the procedure
label definition, export of global symbols and placement of the
procedure in its own section. For GCC I haven't found a way to fully do
this because we rely on the C preprocessor for assembly which means
you cannot expand to multi-line macros. (The label and assembler
directives require their own lines but the preprocessor collapses stuff
onto one line because in the C language newlines don't matter.)

So the solution I've settled on is to do this:

in MdePkg\Include\AArch64\ProcessorBind.h define:

/// Macro to place a function in its own section for dead code
elimination
/// This must be placed directly before the corresponding code
since the
/// .section directive applies to the code that follows it.
#define GCC_ASM_EXPORT_SECTION(func__) \
.global _CONCATENATE (__USER_LABEL_PREFIX__, func__)
;\
.section .text._CONCATENATE (__USER_LABEL_PREFIX__,
func__) ;\
.type ASM_PFX(func__), %function; \

This has the effect of placing the function in a section called
.text.<func__> so the linker can do its dead code stripping stuff. It also
absorbs the making the symbol globally visible so the corresponding
GCC_ASM_EXPORT statement can be removed.

then for every single assembly procedure change from this:

[top of file]
GCC_ASM_EXPORT (ArmInvalidateDataCacheEntryByMVA)

[lower down]
ASM_PFX(ArmInvalidateDataCacheEntryByMVA):
dc ivac, x0 // Invalidate single data cache line
ret

to this:

GCC_ASM_EXPORT_SECTION(ArmInvalidateDataCacheEntryByMVA)
ASM_PFX(ArmInvalidateDataCacheEntryByMVA):
dc ivac, x0 // Invalidate single data cache line
ret

Because the assembly label must appear in column 1 I couldn't find
a way to use the C preprocessor to absorb it so hence the two lines. If
you can find a way to improve on this it would be great.
What about GAS macros (.macro / .endm). I prefer those over cpp
macros
in assembler anyway.
FYI there is a null token \() for GAS which you can use to concatenate
a string with a macro argument, e.g.,

.macro func, x
.globl \x
.type \x, %function
.section .text.\x
\x\():
.endm


I'm not sure what impacts this might have to other toolchains - can
this be translated to CLANG and ARM Compiler?
The asm dialect is 99% aligned between CLANG and GNU as, so this
shouldn't be a problem

I'd like to get your OK on this conceptually and then I could
upstream some patches that modify the AArch64 *.S files to use this
approach. Unfortunately it won't be complete because I only updated
the libraries that we use. My hope is that long term all assembly (or at
least assembly in libraries) adopt this approach so we are positioned
for maximum dead code stripping.
I think this would be an improvement, so go for it. The only thing to
be wary of is routines that fall through into the subsequent one.
Those need to remain in the same section.


Re: Managing GCC Assembly Code Size (AArch64)

Ard Biesheuvel
 

On 4 August 2016 at 21:18, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
On 4 August 2016 at 20:08, Cohen, Eugene <eugene@hp.com> wrote:
Ard and Leif,

I've been too backlogged to provide a real patchset at this point but wanted to get your approval on this proposal...


As you know we have some code size sensitive uncompressed XIP stuff going on. For C code we get dead code stripping thanks to the "-ffunction-sections" switch which places each function in its own section so the linker can strip unreferenced sections.

For assembly there is not a solution that's as easy. For RVCT we handled this with an assembler macro that combined the procedure label definition, export of global symbols and placement of the procedure in its own section. For GCC I haven't found a way to fully do this because we rely on the C preprocessor for assembly which means you cannot expand to multi-line macros. (The label and assembler directives require their own lines but the preprocessor collapses stuff onto one line because in the C language newlines don't matter.)

So the solution I've settled on is to do this:

in MdePkg\Include\AArch64\ProcessorBind.h define:

/// Macro to place a function in its own section for dead code elimination
/// This must be placed directly before the corresponding code since the
/// .section directive applies to the code that follows it.
#define GCC_ASM_EXPORT_SECTION(func__) \
.global _CONCATENATE (__USER_LABEL_PREFIX__, func__) ;\
.section .text._CONCATENATE (__USER_LABEL_PREFIX__, func__) ;\
.type ASM_PFX(func__), %function; \

This has the effect of placing the function in a section called .text.<func__> so the linker can do its dead code stripping stuff. It also absorbs the making the symbol globally visible so the corresponding GCC_ASM_EXPORT statement can be removed.

then for every single assembly procedure change from this:

[top of file]
GCC_ASM_EXPORT (ArmInvalidateDataCacheEntryByMVA)

[lower down]
ASM_PFX(ArmInvalidateDataCacheEntryByMVA):
dc ivac, x0 // Invalidate single data cache line
ret

to this:

GCC_ASM_EXPORT_SECTION(ArmInvalidateDataCacheEntryByMVA)
ASM_PFX(ArmInvalidateDataCacheEntryByMVA):
dc ivac, x0 // Invalidate single data cache line
ret

Because the assembly label must appear in column 1 I couldn't find a way to use the C preprocessor to absorb it so hence the two lines. If you can find a way to improve on this it would be great.
What about GAS macros (.macro / .endm). I prefer those over cpp macros
in assembler anyway.
FYI there is a null token \() for GAS which you can use to concatenate
a string with a macro argument, e.g.,

.macro func, x
.globl \x
.type \x, %function
.section .text.\x
\x\():
.endm


I'm not sure what impacts this might have to other toolchains - can this be translated to CLANG and ARM Compiler?
The asm dialect is 99% aligned between CLANG and GNU as, so this
shouldn't be a problem

I'd like to get your OK on this conceptually and then I could upstream some patches that modify the AArch64 *.S files to use this approach. Unfortunately it won't be complete because I only updated the libraries that we use. My hope is that long term all assembly (or at least assembly in libraries) adopt this approach so we are positioned for maximum dead code stripping.
I think this would be an improvement, so go for it. The only thing to
be wary of is routines that fall through into the subsequent one.
Those need to remain in the same section.