This patchset is a combination of my two previous patchsets adding QEMU support. Both the networking driver change and the flash address for variable storage are now controlled by the EDK2_ARMVE_SUPPORT_QEMU build macro. If the macro is not set the normal RTSM configuration is built.
With this patchset persistent storage and networking work on the A15 VExpress QEMU platform.
Changes since v1: * Combined both changes into one patch * changed flash address selection to be controlled by build macro * changed build macro name to be more generic
Roy Franz (1): Add build option to support VExpress A15 QEMU emulation
.../ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc | 22 +++++++++++++++++--- .../ArmVExpressPkg/ArmVExpress-RTSM-A15.fdf | 8 ++++++- .../ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc | 10 +++++++++ 3 files changed, 36 insertions(+), 4 deletions(-)
This patch adds an EDK2_ARMVE_SUPPORT_QEMU macro that can be defined at build time to build an image that supports QEMU. The default build is unchanged and builds the RTSM configuration.
Two configuration changes are made to support QEMU:
The RTSM VExpress model emulates a different networking controller (91C111) than the VExpress board (9118). QEMU emulates the 9118 which matches the real hardare. Defining the EDK2_ARMVE_SUPPORT_QEMU macro configures the build to use the 9118 networking driver.
QEMU only models fixed size blocks within a flash device, and the RTSM configuration stores EFI variables in the smaller boot blocks of the flash. When built for QEMU the larger blocks are used that QEMU properly emulates.
Signed-off-by: Roy Franz roy.franz@linaro.org Contributed-under: TianoCore Contribution Agreement 1.0 --- .../ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc | 22 +++++++++++++++++--- .../ArmVExpressPkg/ArmVExpress-RTSM-A15.fdf | 8 ++++++- .../ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc | 10 +++++++++ 3 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc index 67051ac..9404c3f 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc @@ -81,12 +81,22 @@ # # NV Storage PCDs. Use base of 0x0C000000 for NOR1 # +!if $(EDK2_ARMVE_SUPPORT_QEMU) == 1 + # QEMU only models a single flash block size, so use larger blocks + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0FF00000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00040000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0FF40000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00040000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0FF80000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00040000 +!else gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0FFC0000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00010000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0FFD0000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00010000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0FFE0000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00010000 +!endif
gArmTokenSpaceGuid.PcdVFPEnabled|1
@@ -141,9 +151,15 @@ gArmTokenSpaceGuid.PcdGicDistributorBase|0x2C001000 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x2C002000
- # Ethernet (SMSC 91C111) - gArmPlatformTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x1A000000 - + # Select network device based on build time macro +!if $(EDK2_ARMVE_SUPPORT_QEMU) == 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..0177849 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_SUPPORT_QEMU) == 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 diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc index 8f3c11b..ea02ece 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc +++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc @@ -83,12 +83,22 @@ # # NV Storage PCDs. Use base of 0x0C000000 for NOR1 # +!if $(EDK2_ARMVE_SUPPORT_QEMU) == 1 + # QEMU only models a single flash block size, so use larger blocks + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0FF00000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00040000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0FF40000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00040000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0FF80000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00040000 +!else gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0FFC0000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00010000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0FFD0000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00010000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0FFE0000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00010000 +!endif
gArmTokenSpaceGuid.PcdVFPEnabled|1
I believed your suggestion was to update both patches (NorFlash & Ethernet changes) with the SUPPORT_QEMU flag. I was not expected you will squash both patch together. Anyway, I pushed your patch without the Ethernet changes. I cannot accept the ethernet change at this time as the support is not yet into SVN...
As I told you in another email, I am waiting for the USWG to take an action on the Ethernet initialization clarification to push support into Tianocore. Once, we will have Ethernet support in SVN, I will add the Ethernet part of your patch.
-----Original Message----- From: Roy Franz [mailto:roy.franz@linaro.org] Sent: 15 January 2014 04:38 To: edk2-devel@lists.sourceforge.net; linaro-uefi@lists.linaro.org; Olivier Martin Cc: patches@linaro.org; ryan.harkin@linaro.org; Roy Franz Subject: [PATCH V2] Add QEMU support to ARM VExpress builds
This patchset is a combination of my two previous patchsets adding QEMU support. Both the networking driver change and the flash address for variable storage are now controlled by the EDK2_ARMVE_SUPPORT_QEMU build macro. If the macro is not set the normal RTSM configuration is built.
With this patchset persistent storage and networking work on the A15 VExpress QEMU platform.
Changes since v1:
- Combined both changes into one patch
- changed flash address selection to be controlled by build macro
- changed build macro name to be more generic
Roy Franz (1): Add build option to support VExpress A15 QEMU emulation
.../ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc | 22 +++++++++++++++++--- .../ArmVExpressPkg/ArmVExpress-RTSM-A15.fdf | 8 ++++++- .../ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc | 10 +++++++++ 3 files changed, 36 insertions(+), 4 deletions(-)
-- 1.7.10.4