From 33fc8b0fec5fca4a8936348cba2b1beee0bc0ed5 Mon Sep 17 00:00:00 2001 From: Roy Franz Date: Wed, 15 Jan 2014 16:24:00 +0000 Subject: [PATCH] ArmPlatformPkg/ArmVExpressPkg: Add build option to support VExpress A15 QEMU emulation 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. 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 Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-By: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15125 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc | 10 ++++++++++ .../ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15.dsc index 2ca23a5e98..fa3c7a1aa0 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 diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.dsc index d0f4210d80..7d6fe69830 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