[edk2] [Patch] MdeModulePkg: Don't build VarCheckUefiLib and DxeCore for EBC arch

Liming Gao posted 1 patch 6 years, 10 months ago
Failed in applying to current master (apply log)
MdeModulePkg/MdeModulePkg.dsc | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
[edk2] [Patch] MdeModulePkg: Don't build VarCheckUefiLib and DxeCore for EBC arch
Posted by Liming Gao 6 years, 10 months ago
EBC build failure is caused by d7a09cb86a0416c099fa3a9e0fbe2c8f399b28de.
It changes MAX_UINTN and MAX_ADDRESS definition as below. VarCheckUefiLib
and DxeCore uses MAX_UINTN and MAX_ADDRESS in the global data initialization.
New style has >> operator, and not supported by EBC compiler.
The fix is not to build VarCheckUefiLib and DxeCore for EBC arch.

#define MAX_UINTN  ((UINTN) ~0)
==>
#define MAX_UINTN  ((UINTN)(~0ULL >> (64 - sizeof (INTN) * 8)))

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 MdeModulePkg/MdeModulePkg.dsc | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index dd7e9d5..f4062fa 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -267,10 +267,6 @@
   MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf
   MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
 
-  MdeModulePkg/Core/Dxe/DxeMain.inf {
-    <LibraryClasses>
-      NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
-  }
   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
   MdeModulePkg/Core/Pei/PeiMain.inf
   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
@@ -314,7 +310,6 @@
   MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
   MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
   MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
-  MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
   MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
   MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
   MdeModulePkg/Library/PlatformVarCleanupLib/PlatformVarCleanupLib.inf
@@ -439,10 +434,16 @@
   MdeModulePkg/Universal/EbcDxe/EbcDebugger.inf
   MdeModulePkg/Universal/EbcDxe/EbcDebuggerConfig.inf
 
+[Components.IA32, Components.X64, Components.IPF, Components.ARM, Components.AARCH64]
+  MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
+  MdeModulePkg/Core/Dxe/DxeMain.inf {
+    <LibraryClasses>
+      NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
+  }
+
 [Components.IA32, Components.X64, Components.Ebc]
   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
     <LibraryClasses>
-      NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
       NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
       NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
   }
-- 
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] MdeModulePkg: Don't build VarCheckUefiLib and DxeCore for EBC arch
Posted by Zeng, Star 6 years, 10 months ago
Liming,

Moving VarCheckUefiLib to be separated with VariableRuntimeDxe is strange to me.
It is not just for build, and also to demonstrate how is the library linked with VariableRuntimeDxe.
And why only VariableRuntimeDxe and EmuVariableRuntimeDxe are put in [Components.IA32, Components.X64, Components.Ebc], but not others, for example RegularExpressionDxe and RamDiskDxe, etc?

If feasible, I prefer to move VariableRuntimeDxe (include its linking libraries) and EmuVariableRuntimeDxe to [Components.IA32, Components.X64, Components.IPF, Components.AARCH64].


Thanks,
Star
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Liming Gao
Sent: Tuesday, January 30, 2018 1:33 PM
To: edk2-devel@lists.01.org
Subject: [edk2] [Patch] MdeModulePkg: Don't build VarCheckUefiLib and DxeCore for EBC arch

EBC build failure is caused by d7a09cb86a0416c099fa3a9e0fbe2c8f399b28de.
It changes MAX_UINTN and MAX_ADDRESS definition as below. VarCheckUefiLib and DxeCore uses MAX_UINTN and MAX_ADDRESS in the global data initialization.
New style has >> operator, and not supported by EBC compiler.
The fix is not to build VarCheckUefiLib and DxeCore for EBC arch.

#define MAX_UINTN  ((UINTN) ~0)
==>
#define MAX_UINTN  ((UINTN)(~0ULL >> (64 - sizeof (INTN) * 8)))

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 MdeModulePkg/MdeModulePkg.dsc | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index dd7e9d5..f4062fa 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -267,10 +267,6 @@
   MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf
   MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
 
-  MdeModulePkg/Core/Dxe/DxeMain.inf {
-    <LibraryClasses>
-      NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
-  }
   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
   MdeModulePkg/Core/Pei/PeiMain.inf
   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
@@ -314,7 +310,6 @@
   MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
   MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
   MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
-  MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
   MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
   MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
   MdeModulePkg/Library/PlatformVarCleanupLib/PlatformVarCleanupLib.inf
@@ -439,10 +434,16 @@
   MdeModulePkg/Universal/EbcDxe/EbcDebugger.inf
   MdeModulePkg/Universal/EbcDxe/EbcDebuggerConfig.inf
 
+[Components.IA32, Components.X64, Components.IPF, Components.ARM, 
+Components.AARCH64]
+  MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
+  MdeModulePkg/Core/Dxe/DxeMain.inf {
+    <LibraryClasses>
+      
+NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32Guide
+dSectionExtractLib.inf
+  }
+
 [Components.IA32, Components.X64, Components.Ebc]
   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
     <LibraryClasses>
-      NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
       NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
       NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
   }
--
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] MdeModulePkg: Don't build VarCheckUefiLib and DxeCore for EBC arch
Posted by Gao, Liming 6 years, 10 months ago
Star:
  I don't know why only VariableRuntimeDxe and EmuVariableRuntimeDxe are in [Components.IA32, Components.X64, Components.Ebc]. This patch is not to build VarCheckUefiLib and DxeCore for EBC arch. It doesn't touch others. For your comments, I can change VariableRuntimeDxe not build for EBC. 

Thanks
Liming
>-----Original Message-----
>From: Zeng, Star
>Sent: Tuesday, February 06, 2018 2:53 PM
>To: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
>Cc: Zeng, Star <star.zeng@intel.com>
>Subject: RE: [edk2] [Patch] MdeModulePkg: Don't build VarCheckUefiLib and
>DxeCore for EBC arch
>
>Liming,
>
>Moving VarCheckUefiLib to be separated with VariableRuntimeDxe is strange
>to me.
>It is not just for build, and also to demonstrate how is the library linked with
>VariableRuntimeDxe.
>And why only VariableRuntimeDxe and EmuVariableRuntimeDxe are put in
>[Components.IA32, Components.X64, Components.Ebc], but not others, for
>example RegularExpressionDxe and RamDiskDxe, etc?
>
>If feasible, I prefer to move VariableRuntimeDxe (include its linking libraries)
>and EmuVariableRuntimeDxe to [Components.IA32, Components.X64,
>Components.IPF, Components.AARCH64].
>
>
>Thanks,
>Star
>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>Liming Gao
>Sent: Tuesday, January 30, 2018 1:33 PM
>To: edk2-devel@lists.01.org
>Subject: [edk2] [Patch] MdeModulePkg: Don't build VarCheckUefiLib and
>DxeCore for EBC arch
>
>EBC build failure is caused by d7a09cb86a0416c099fa3a9e0fbe2c8f399b28de.
>It changes MAX_UINTN and MAX_ADDRESS definition as below.
>VarCheckUefiLib and DxeCore uses MAX_UINTN and MAX_ADDRESS in the
>global data initialization.
>New style has >> operator, and not supported by EBC compiler.
>The fix is not to build VarCheckUefiLib and DxeCore for EBC arch.
>
>#define MAX_UINTN  ((UINTN) ~0)
>==>
>#define MAX_UINTN  ((UINTN)(~0ULL >> (64 - sizeof (INTN) * 8)))
>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Liming Gao <liming.gao@intel.com>
>---
> MdeModulePkg/MdeModulePkg.dsc | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
>diff --git a/MdeModulePkg/MdeModulePkg.dsc
>b/MdeModulePkg/MdeModulePkg.dsc index dd7e9d5..f4062fa 100644
>--- a/MdeModulePkg/MdeModulePkg.dsc
>+++ b/MdeModulePkg/MdeModulePkg.dsc
>@@ -267,10 +267,6 @@
>   MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf
>
>MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePci
>DeviceDxe.inf
>
>-  MdeModulePkg/Core/Dxe/DxeMain.inf {
>-    <LibraryClasses>
>-
>NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32G
>uidedSectionExtractLib.inf
>-  }
>   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
>   MdeModulePkg/Core/Pei/PeiMain.inf
>   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
>@@ -314,7 +310,6 @@
>
>MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.
>inf
>   MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
>   MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
>-  MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
>   MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
>   MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
>   MdeModulePkg/Library/PlatformVarCleanupLib/PlatformVarCleanupLib.inf
>@@ -439,10 +434,16 @@
>   MdeModulePkg/Universal/EbcDxe/EbcDebugger.inf
>   MdeModulePkg/Universal/EbcDxe/EbcDebuggerConfig.inf
>
>+[Components.IA32, Components.X64, Components.IPF, Components.ARM,
>+Components.AARCH64]
>+  MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
>+  MdeModulePkg/Core/Dxe/DxeMain.inf {
>+    <LibraryClasses>
>+
>+NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32
>Guide
>+dSectionExtractLib.inf
>+  }
>+
> [Components.IA32, Components.X64, Components.Ebc]
>   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
>     <LibraryClasses>
>-      NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
>       NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
>       NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
>   }
>--
>2.8.0.windows.1
>
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] MdeModulePkg: Don't build VarCheckUefiLib and DxeCore for EBC arch
Posted by Zeng, Star 6 years, 10 months ago
Liming,

I am aware the purpose of the change.
And I do not want VarCheckUefiLib and VariableRuntimeDxe to be separated.
So I prefer to move VariableRuntimeDxe.

With that handled, Reviewed-by: Star Zeng <star.zeng@intel.com>


Thanks,
Star
-----Original Message-----
From: Gao, Liming 
Sent: Tuesday, February 6, 2018 3:00 PM
To: Zeng, Star <star.zeng@intel.com>; edk2-devel@lists.01.org
Subject: RE: [edk2] [Patch] MdeModulePkg: Don't build VarCheckUefiLib and DxeCore for EBC arch

Star:
  I don't know why only VariableRuntimeDxe and EmuVariableRuntimeDxe are in [Components.IA32, Components.X64, Components.Ebc]. This patch is not to build VarCheckUefiLib and DxeCore for EBC arch. It doesn't touch others. For your comments, I can change VariableRuntimeDxe not build for EBC. 

Thanks
Liming
>-----Original Message-----
>From: Zeng, Star
>Sent: Tuesday, February 06, 2018 2:53 PM
>To: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
>Cc: Zeng, Star <star.zeng@intel.com>
>Subject: RE: [edk2] [Patch] MdeModulePkg: Don't build VarCheckUefiLib 
>and DxeCore for EBC arch
>
>Liming,
>
>Moving VarCheckUefiLib to be separated with VariableRuntimeDxe is 
>strange to me.
>It is not just for build, and also to demonstrate how is the library 
>linked with VariableRuntimeDxe.
>And why only VariableRuntimeDxe and EmuVariableRuntimeDxe are put in 
>[Components.IA32, Components.X64, Components.Ebc], but not others, for 
>example RegularExpressionDxe and RamDiskDxe, etc?
>
>If feasible, I prefer to move VariableRuntimeDxe (include its linking 
>libraries) and EmuVariableRuntimeDxe to [Components.IA32, 
>Components.X64, Components.IPF, Components.AARCH64].
>
>
>Thanks,
>Star
>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of 
>Liming Gao
>Sent: Tuesday, January 30, 2018 1:33 PM
>To: edk2-devel@lists.01.org
>Subject: [edk2] [Patch] MdeModulePkg: Don't build VarCheckUefiLib and 
>DxeCore for EBC arch
>
>EBC build failure is caused by d7a09cb86a0416c099fa3a9e0fbe2c8f399b28de.
>It changes MAX_UINTN and MAX_ADDRESS definition as below.
>VarCheckUefiLib and DxeCore uses MAX_UINTN and MAX_ADDRESS in the 
>global data initialization.
>New style has >> operator, and not supported by EBC compiler.
>The fix is not to build VarCheckUefiLib and DxeCore for EBC arch.
>
>#define MAX_UINTN  ((UINTN) ~0)
>==>
>#define MAX_UINTN  ((UINTN)(~0ULL >> (64 - sizeof (INTN) * 8)))
>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Liming Gao <liming.gao@intel.com>
>---
> MdeModulePkg/MdeModulePkg.dsc | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
>diff --git a/MdeModulePkg/MdeModulePkg.dsc 
>b/MdeModulePkg/MdeModulePkg.dsc index dd7e9d5..f4062fa 100644
>--- a/MdeModulePkg/MdeModulePkg.dsc
>+++ b/MdeModulePkg/MdeModulePkg.dsc
>@@ -267,10 +267,6 @@
>   MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf
>
>MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePci
>DeviceDxe.inf
>
>-  MdeModulePkg/Core/Dxe/DxeMain.inf {
>-    <LibraryClasses>
>-
>NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32G
>uidedSectionExtractLib.inf
>-  }
>   MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
>   MdeModulePkg/Core/Pei/PeiMain.inf
>   MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
>@@ -314,7 +310,6 @@
>
>MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.
>inf
>   MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
>   MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
>-  MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
>   MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
>   MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
>   MdeModulePkg/Library/PlatformVarCleanupLib/PlatformVarCleanupLib.inf
>@@ -439,10 +434,16 @@
>   MdeModulePkg/Universal/EbcDxe/EbcDebugger.inf
>   MdeModulePkg/Universal/EbcDxe/EbcDebuggerConfig.inf
>
>+[Components.IA32, Components.X64, Components.IPF, Components.ARM, 
>+Components.AARCH64]
>+  MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
>+  MdeModulePkg/Core/Dxe/DxeMain.inf {
>+    <LibraryClasses>
>+
>+NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32
>Guide
>+dSectionExtractLib.inf
>+  }
>+
> [Components.IA32, Components.X64, Components.Ebc]
>   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
>     <LibraryClasses>
>-      NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
>       NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
>       NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
>   }
>--
>2.8.0.windows.1
>
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel