On Fri, Dec 20, 2013 at 11:37 AM, Roy Franz <[email protected]> wrote:
> The RTSM VExpress model emulates a different networking controller (91C111)
> than the VExpres board (9118).  QEMU emulates the 9118 which matches the
> real hardare.  This is the only configuration difference for UEFI between
> building for RTSM or UEFI.
> This patch adds a EDK2_ARMVE_USE_9118 macro that can be defined at build time
> that can be used to build an image that supports QEMU.  The default build is
> unchanged and builds the RTSM configuration.
>
> Signed-off-by: Roy Franz <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.0
> ---
>  ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc |   12 +++++++++---
>  ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.fdf |    8 +++++++-
>  2 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc 
> b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc
> index 4dcdfae..5323efd 100644
> --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc
> +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc
> @@ -141,9 +141,15 @@
>    gArmTokenSpaceGuid.PcdGicDistributorBase|0x2C001000
>    gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x2C002000
>
> -  # Ethernet (SMSC 91C111)
> -  gArmPlatformTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x1A000000
> -
> +  # Select network device based on build time macro
> +!if $(EDK2_ARMVE_USE_9118) == 1
> +  # Ethernet (SMSC 9118, for QEMU, matches real hardware)
> +  gArmPlatformTokenSpaceGuid.PcdLan9118DxeBaseAddress|0x1A000000
> +!else
> +  # Ethernet (SMSC 91C111, for RTSM)
> +  gArmPlatformTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x1A000000
> +!endif
> +
>    #
>    # ARM OS Loader
>    #
> diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.fdf 
> b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.fdf
> index be79efd..146f6f4 100644
> --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.fdf
> +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.fdf
> @@ -144,7 +144,13 @@ READ_LOCK_STATUS   = TRUE
>    INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
>    INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
>    INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
> -  INF ArmPlatformPkg/Drivers/LAN91xDxe/LAN91xDxe.inf
> +!if $(EDK2_ARMVE_USE_9118) == 1
> +  # LAN9118Dxe.inf for QEMU (matches use of 9118 on real VExpress board)
> +  INF ArmPlatformPkg/Drivers/LAN9118Dxe/LAN9118Dxe.inf
> +!else
> +  # LAN91xDxe.inf for RTSM
> +  INF ArmPlatformPkg/Drivers/LAN91xDxe/LAN91xDxe.inf
> +!endif
>
>    #
>    # Multiple Console IO support
> --
> 1.7.10.4
>

Hi Olivier - is this patch acceptable?  This seemed like the cleanest
way to support this difference between QEMU and RTSM.  I didn't want
to create a whole
new board config for this single difference.

Thanks,
Roy

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to