From patchwork Wed Jan 15 04:38:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 23205 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9EFB1202FA for ; Wed, 15 Jan 2014 04:38:41 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id va2sf1903090obc.8 for ; Tue, 14 Jan 2014 20:38:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=L9nsGkCSqo13QA3sK/w5XXctC0FdiZXAzEIwHmujK5c=; b=DLWvjBewfgM4idZpYI2fHPF/p602eqVCEmO2Y/3B7oYrAQJShRFIaSj69Du77eQ2dR wdRNa4pZGFKLxWubkEsAunSf0Qn0TqjEIA5ngiiJSgl/+9LjUEF2urz7t3q/tRyC2pOP NGl5wOiI53tZ7jNtAvnhXJEOBVeHZRQ2NmVg5K54sHwbmQEQnUKuSt4GaRFqJWtk2BGv iCFg7n4fWA/8k3gAjFld5CWsmXf4DqxyLWi19PDu5dbmcnGGBLiEOR8mWCXJw8NEzXAK 8nDHlsdSnDU3vYHKo4HeJ0aYZ42/AiHuzi/AR+BVUDFEmmpLEeMkkQ6GviEki1LjXqLX DXdA== X-Gm-Message-State: ALoCoQmTs0EHx3HhZElCibn6IUWwcTwoXcNONfyV4hF+fH/YhnkuFGSbByIS4mIgfVulnaiD7WlI X-Received: by 10.50.154.73 with SMTP id vm9mr83747igb.2.1389760720791; Tue, 14 Jan 2014 20:38:40 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.106.102 with SMTP id gt6ls466066qeb.78.gmail; Tue, 14 Jan 2014 20:38:40 -0800 (PST) X-Received: by 10.58.243.37 with SMTP id wv5mr146757vec.41.1389760720633; Tue, 14 Jan 2014 20:38:40 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id y7si1086117vcf.36.2014.01.14.20.38.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Jan 2014 20:38:40 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so209807vcb.23 for ; Tue, 14 Jan 2014 20:38:40 -0800 (PST) X-Received: by 10.52.187.232 with SMTP id fv8mr22017vdc.60.1389760720558; Tue, 14 Jan 2014 20:38:40 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp247868ved; Tue, 14 Jan 2014 20:38:40 -0800 (PST) X-Received: by 10.50.232.9 with SMTP id tk9mr134079igc.27.1389760719062; Tue, 14 Jan 2014 20:38:39 -0800 (PST) Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) by mx.google.com with ESMTPS id mn8si3991547icc.126.2014.01.14.20.38.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Jan 2014 20:38:39 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.172 is neither permitted nor denied by best guess record for domain of roy.franz@linaro.org) client-ip=209.85.223.172; Received: by mail-ie0-f172.google.com with SMTP id e14so1443284iej.3 for ; Tue, 14 Jan 2014 20:38:38 -0800 (PST) X-Received: by 10.50.136.165 with SMTP id qb5mr298964igb.2.1389760718695; Tue, 14 Jan 2014 20:38:38 -0800 (PST) Received: from rfranz-v430.caveonetworks.com (64.2.3.195.ptr.us.xo.net. [64.2.3.195]) by mx.google.com with ESMTPSA id x6sm27638829igb.3.2014.01.14.20.38.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jan 2014 20:38:37 -0800 (PST) From: Roy Franz To: edk2-devel@lists.sourceforge.net, linaro-uefi@lists.linaro.org, olivier.martin@arm.com Cc: patches@linaro.org, ryan.harkin@linaro.org, Roy Franz Subject: [PATCH] Add build option to support VExpress A15 QEMU emulation Date: Tue, 14 Jan 2014 20:38:30 -0800 Message-Id: <1389760710-17762-2-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1389760710-17762-1-git-send-email-roy.franz@linaro.org> References: <1389760710-17762-1-git-send-email-roy.franz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: roy.franz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 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