diff mbox

[Linaro-uefi,1/3] Platforms/ARM/Juno: make EBC and RngDxe AARCH64 only

Message ID 1477652599-26330-1-git-send-email-ard.biesheuvel@linaro.org
State Accepted
Commit 7033de9c1ea2bd9eb65b8b9428baabadb73e5137
Headers show

Commit Message

Ard Biesheuvel Oct. 28, 2016, 11:03 a.m. UTC
EBC is not supported at all on 32-bit ARM. The pseudo RNG lib could be
implemented for 32-bit but there is no use case currently.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platforms/ARM/Juno/ArmJuno.dsc | 12 +++++++-----
 Platforms/ARM/Juno/ArmJuno.fdf |  5 ++++-
 2 files changed, 11 insertions(+), 6 deletions(-)

Comments

Leif Lindholm Oct. 28, 2016, 3:18 p.m. UTC | #1
On Fri, Oct 28, 2016 at 12:03:17PM +0100, Ard Biesheuvel wrote:
> EBC is not supported at all on 32-bit ARM. The pseudo RNG lib could be
> implemented for 32-bit but there is no use case currently.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---
>  Platforms/ARM/Juno/ArmJuno.dsc | 12 +++++++-----
>  Platforms/ARM/Juno/ArmJuno.fdf |  5 ++++-
>  2 files changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc
> index f9824f0f837e..182aa5520602 100644
> --- a/Platforms/ARM/Juno/ArmJuno.dsc
> +++ b/Platforms/ARM/Juno/ArmJuno.dsc
> @@ -315,11 +315,6 @@
>      <LibraryClasses>
>        BdsLib|ArmPkg/Library/BdsLib/BdsLib.inf
>    }
> -  SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf {
> -    <LibraryClasses>
> -      # DO NOT USE THIS LIBRARY FOR PRODUCTION DEVICES
> -      RngLib|OpenPlatformPkg/Platforms/ARM/Binary/Library/PseudoRngLib/PseudoRngLib.inf
> -  }
>  
>    #
>    # SMBIOS/DMI
> @@ -341,7 +336,14 @@
>        NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
>    }
>  
> +[Components.AARCH64]
>    #
>    # EBC
>    #
>    MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
> +
> +  SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf {
> +    <LibraryClasses>
> +      # DO NOT USE THIS LIBRARY FOR PRODUCTION DEVICES
> +      RngLib|OpenPlatformPkg/Platforms/ARM/Binary/Library/PseudoRngLib/PseudoRngLib.inf
> +  }
> diff --git a/Platforms/ARM/Juno/ArmJuno.fdf b/Platforms/ARM/Juno/ArmJuno.fdf
> index f760c128744b..beee7afd11fb 100644
> --- a/Platforms/ARM/Juno/ArmJuno.fdf
> +++ b/Platforms/ARM/Juno/ArmJuno.fdf
> @@ -200,7 +200,6 @@ FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
>    # Juno platform driver
>    #
>    INF ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf
> -  INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
>  
>    #
>    # SMBIOS/DMI
> @@ -224,11 +223,15 @@ FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
>    # after the device drivers (eg: Ethernet) to ensure we have support for them.
>    INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf
>  
> +!if $(ARCH) == AARCH64
>    #
>    # EBC
>    #
>    INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
>  
> +  INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
> +!endif
> +
>  [FV.FVMAIN_COMPACT]
>  FvAlignment        = 8
>  ERASE_POLARITY     = 1
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/Platforms/ARM/Juno/ArmJuno.dsc b/Platforms/ARM/Juno/ArmJuno.dsc
index f9824f0f837e..182aa5520602 100644
--- a/Platforms/ARM/Juno/ArmJuno.dsc
+++ b/Platforms/ARM/Juno/ArmJuno.dsc
@@ -315,11 +315,6 @@ 
     <LibraryClasses>
       BdsLib|ArmPkg/Library/BdsLib/BdsLib.inf
   }
-  SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf {
-    <LibraryClasses>
-      # DO NOT USE THIS LIBRARY FOR PRODUCTION DEVICES
-      RngLib|OpenPlatformPkg/Platforms/ARM/Binary/Library/PseudoRngLib/PseudoRngLib.inf
-  }
 
   #
   # SMBIOS/DMI
@@ -341,7 +336,14 @@ 
       NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
   }
 
+[Components.AARCH64]
   #
   # EBC
   #
   MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
+
+  SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf {
+    <LibraryClasses>
+      # DO NOT USE THIS LIBRARY FOR PRODUCTION DEVICES
+      RngLib|OpenPlatformPkg/Platforms/ARM/Binary/Library/PseudoRngLib/PseudoRngLib.inf
+  }
diff --git a/Platforms/ARM/Juno/ArmJuno.fdf b/Platforms/ARM/Juno/ArmJuno.fdf
index f760c128744b..beee7afd11fb 100644
--- a/Platforms/ARM/Juno/ArmJuno.fdf
+++ b/Platforms/ARM/Juno/ArmJuno.fdf
@@ -200,7 +200,6 @@  FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
   # Juno platform driver
   #
   INF ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf
-  INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
 
   #
   # SMBIOS/DMI
@@ -224,11 +223,15 @@  FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092
   # after the device drivers (eg: Ethernet) to ensure we have support for them.
   INF EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf
 
+!if $(ARCH) == AARCH64
   #
   # EBC
   #
   INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
 
+  INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
+!endif
+
 [FV.FVMAIN_COMPACT]
 FvAlignment        = 8
 ERASE_POLARITY     = 1