Re: [edk2] [PATCH v2 3/3] ArmPlatformPkg/FVP: unify support for Foundation and Base models

2015-08-27 Thread Ryan Harkin
On 18 August 2015 at 15:10, Ard Biesheuvel ard.biesheu...@linaro.org
wrote:

 Now that the PL180 and PL111 drivers know how to behave when executed
 on the Foundation model that does not emulate the hardware, we can
 remove the ARM_FOUNDATION_FVP ifdefs and produce a single build that
 runs on both the Foundation model and the Base model.

 Contributed-under: TianoCore Contribution Agreement 1.0
 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org
 Reviewed-by: Leif Lindholm leif.lindh...@linaro.org
 ---
  ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc | 13
 -
  ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf |  4 
  2 files changed, 17 deletions(-)

 diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
 b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
 index 119ba3a0c61e..28fc1d85243d 100644
 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
 +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
 @@ -41,9 +41,7 @@ [LibraryClasses.common]


  
 ArmPlatformSysConfigLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf

  
 NorFlashPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVExpressLib.inf
 -!ifndef ARM_FOUNDATION_FVP

  
 LcdPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf
 -!endif

TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf

 @@ -85,14 +83,9 @@ [PcdsFixedAtBuild.common]
gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|ARM Fixed Virtual
 Platform
gEmbeddedTokenSpaceGuid.PcdEmbeddedPrompt|ARM-FVP

 -!ifndef ARM_FOUNDATION_FVP
# Up to 8 cores on Base models. This works fine if model happens to
 have less.
gArmPlatformTokenSpaceGuid.PcdCoreCount|8
gArmPlatformTokenSpaceGuid.PcdClusterCount|2


I assume you tested this on the Foundation model, which only has 1
cluster.  If so, I'm happy with this.


-!else
 -  # Up to 4 cores on Foundation models. This works fine if model happens
 to have less.
 -  gArmPlatformTokenSpaceGuid.PcdCoreCount|4
 -!endif

#
# NV Storage PCDs. Use base of 0x0C00 for NOR1
 @@ -149,14 +142,12 @@ [PcdsFixedAtBuild.common]
## PL031 RealTimeClock
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x1C17

 -!ifndef ARM_FOUNDATION_FVP
## PL111 Versatile Express Motherboard controller
gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x1C1F

## PL180 MMC/SD card controller
gArmPlatformTokenSpaceGuid.PcdPL180SysMciRegAddress|0x1C010048
gArmPlatformTokenSpaceGuid.PcdPL180MciBaseAddress|0x1C05
 -!endif

#
# ARM General Interrupt Controller
 @@ -280,9 +271,7 @@ [Components.common]
ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
ArmPkg/Drivers/TimerDxe/TimerDxe.inf
 -!ifndef ARM_FOUNDATION_FVP

  ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf
 -!endif
ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf

#
 @@ -290,13 +279,11 @@ [Components.common]
#
ArmPkg/Filesystem/SemihostFs/SemihostFs.inf

 -!ifndef ARM_FOUNDATION_FVP
#
# Multimedia Card Interface
#
EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf
ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
 -!endif

#
# Platform Driver
 diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf
 b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf
 index 9c447084e316..1d92d6f34832 100644
 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf
 +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf
 @@ -160,9 +160,7 @@ [FV.FvMain]
INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
 -!ifndef ARM_FOUNDATION_FVP
INF
 ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf
 -!endif
INF ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf

#
 @@ -178,13 +176,11 @@ [FV.FvMain]
INF FatBinPkg/EnhancedFatDxe/Fat.inf
INF
 MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf

 -!ifndef ARM_FOUNDATION_FVP
#
# Multimedia Card Interface
#
INF EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf
INF ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
 -!endif

#
# Platform Driver
 --
 1.9.1


Assuming that you've tested it and that we agree on fixes to the other two
patches, if needed then:

Reviewed-by: Ryan Harkin ryan.har...@linaro.org
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 3/3] ArmPlatformPkg/FVP: unify support for Foundation and Base models

2015-08-18 Thread Ard Biesheuvel
Now that the PL180 and PL111 drivers know how to behave when executed
on the Foundation model that does not emulate the hardware, we can
remove the ARM_FOUNDATION_FVP ifdefs and produce a single build that
runs on both the Foundation model and the Base model.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org
Reviewed-by: Leif Lindholm leif.lindh...@linaro.org
---
 ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc | 13 -
 ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf |  4 
 2 files changed, 17 deletions(-)

diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc 
b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
index 119ba3a0c61e..28fc1d85243d 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
@@ -41,9 +41,7 @@ [LibraryClasses.common]
 
   
ArmPlatformSysConfigLib|ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressSysConfigLib/ArmVExpressSysConfigLib.inf
   
NorFlashPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVExpressLib.inf
-!ifndef ARM_FOUNDATION_FVP
   
LcdPlatformLib|ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf
-!endif
 
   TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
 
@@ -85,14 +83,9 @@ [PcdsFixedAtBuild.common]
   gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|ARM Fixed Virtual Platform
   gEmbeddedTokenSpaceGuid.PcdEmbeddedPrompt|ARM-FVP
 
-!ifndef ARM_FOUNDATION_FVP
   # Up to 8 cores on Base models. This works fine if model happens to have 
less.
   gArmPlatformTokenSpaceGuid.PcdCoreCount|8
   gArmPlatformTokenSpaceGuid.PcdClusterCount|2
-!else
-  # Up to 4 cores on Foundation models. This works fine if model happens to 
have less.
-  gArmPlatformTokenSpaceGuid.PcdCoreCount|4
-!endif
 
   #
   # NV Storage PCDs. Use base of 0x0C00 for NOR1
@@ -149,14 +142,12 @@ [PcdsFixedAtBuild.common]
   ## PL031 RealTimeClock
   gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x1C17
 
-!ifndef ARM_FOUNDATION_FVP
   ## PL111 Versatile Express Motherboard controller
   gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x1C1F
 
   ## PL180 MMC/SD card controller
   gArmPlatformTokenSpaceGuid.PcdPL180SysMciRegAddress|0x1C010048
   gArmPlatformTokenSpaceGuid.PcdPL180MciBaseAddress|0x1C05
-!endif
 
   #
   # ARM General Interrupt Controller
@@ -280,9 +271,7 @@ [Components.common]
   ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
   ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
   ArmPkg/Drivers/TimerDxe/TimerDxe.inf
-!ifndef ARM_FOUNDATION_FVP
   ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf
-!endif
   ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf
 
   #
@@ -290,13 +279,11 @@ [Components.common]
   #
   ArmPkg/Filesystem/SemihostFs/SemihostFs.inf
 
-!ifndef ARM_FOUNDATION_FVP
   #
   # Multimedia Card Interface
   #
   EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf
   ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
-!endif
 
   #
   # Platform Driver
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf 
b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf
index 9c447084e316..1d92d6f34832 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf
@@ -160,9 +160,7 @@ [FV.FvMain]
   INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
   INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
   INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
-!ifndef ARM_FOUNDATION_FVP
   INF ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf
-!endif
   INF ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf
 
   #
@@ -178,13 +176,11 @@ [FV.FvMain]
   INF FatBinPkg/EnhancedFatDxe/Fat.inf
   INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
 
-!ifndef ARM_FOUNDATION_FVP
   #
   # Multimedia Card Interface
   #
   INF EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf
   INF ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
-!endif
 
   #
   # Platform Driver
-- 
1.9.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel