From patchwork Tue Feb 3 19:19:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 44285 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9E9742034D for ; Tue, 3 Feb 2015 19:21:01 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id gm9sf22225066lab.0 for ; Tue, 03 Feb 2015 11:21:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=7ELARwrNyNG9IPpTyVpA2GiKj+OlpDwoRsdepzSa3Rc=; b=P1qRkfFRt4zuoDyfftq9YAanR0kWVSeT0bd9afBHJ3YKMdoq0qBsv4Q+Bko2GbJMAi ovDxkZ9TZakYzWRTW54qoWvFafQFCXjVplAjZMe5l/JDbA/mPquewE+bQ9Bbb5TzvdjX +Pqvyy+aVAOHu7SaQI9rwptL80EtG5MxLBguuvArdNl5RYcG0CL8S2LbiMfRG3RM1qNu n2G3Ag8jS6ds8WBBKH/3cKAaBNbn63N8l15FsF8mzXPrQ4C/28QjcO0YarzOsbH+FUye vbPWEEQW1gyYbpTJhcss4MUzyzKIr2cIKqgu8ExilRUwJZ/lUDxDiT/Mtvf1LVhxvBD/ mw7g== X-Gm-Message-State: ALoCoQnQ4d/waAzzi+pWs9Ddmla0iYAge5ty3cbQkRF8ETTPeR0PU9YMjYxdN0ToRKugtTCxcygl X-Received: by 10.112.42.104 with SMTP id n8mr3318249lbl.19.1422991260617; Tue, 03 Feb 2015 11:21:00 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.71 with SMTP id k7ls805281laf.9.gmail; Tue, 03 Feb 2015 11:21:00 -0800 (PST) X-Received: by 10.152.226.134 with SMTP id rs6mr18011940lac.98.1422991260432; Tue, 03 Feb 2015 11:21:00 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id 10si4051563lar.10.2015.02.03.11.21.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:21:00 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id u10so40444748lbd.9 for ; Tue, 03 Feb 2015 11:21:00 -0800 (PST) X-Received: by 10.152.23.195 with SMTP id o3mr5824546laf.70.1422991260213; Tue, 03 Feb 2015 11:21:00 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp33718lbj; Tue, 3 Feb 2015 11:20:59 -0800 (PST) X-Received: by 10.42.130.198 with SMTP id w6mr25341315ics.97.1422991258755; Tue, 03 Feb 2015 11:20:58 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id n197si10395631ion.33.2015.02.03.11.20.57 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:20:58 -0800 (PST) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YIj1k-0002Jw-Rw; Tue, 03 Feb 2015 19:20:48 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YIj1j-0002Jq-BK for edk2-devel@lists.sourceforge.net; Tue, 03 Feb 2015 19:20:47 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.175 as permitted sender) client-ip=74.125.82.175; envelope-from=ard.biesheuvel@linaro.org; helo=mail-we0-f175.google.com; Received: from mail-we0-f175.google.com ([74.125.82.175]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YIj1i-0002R8-Db for edk2-devel@lists.sourceforge.net; Tue, 03 Feb 2015 19:20:47 +0000 Received: by mail-we0-f175.google.com with SMTP id p10so46940881wes.6 for ; Tue, 03 Feb 2015 11:20:40 -0800 (PST) X-Received: by 10.194.91.199 with SMTP id cg7mr59596832wjb.114.1422991240407; Tue, 03 Feb 2015 11:20:40 -0800 (PST) Received: from ards-macbook-pro.local (73.233.28.37.rev.vodafone.pt. [37.28.233.73]) by mx.google.com with ESMTPSA id eb7sm25860139wic.11.2015.02.03.11.20.37 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:20:39 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, lersek@redhat.com, olivier.martin@arm.com, roy.franz@linaro.org, leif.lindholm@linaro.org, stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, anthony.perard@citrix.com, christoffer.dall@linaro.org, xen-devel@lists.xen.org, ilias.biris@linaro.org, julien.grall@linaro.org Date: Tue, 3 Feb 2015 19:19:47 +0000 Message-Id: <1422991212-9257-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1422991212-9257-1-git-send-email-ard.biesheuvel@linaro.org> References: <1422991212-9257-1-git-send-email-ard.biesheuvel@linaro.org> X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1YIj1i-0002R8-Db Subject: [edk2] [PATCH v3 02/27] ArmPkg: allow patchable PCDs for memory, FD and FV addresses X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 In order to allow a runtime self relocating PrePi instance, change the allowable PCD types for the following PCDs: gArmTokenSpaceGuid.PcdSystemMemoryBase gArmTokenSpaceGuid.PcdSystemMemorySize gArmTokenSpaceGuid.PcdFdBaseAddress gArmTokenSpaceGuid.PcdFvBaseAddress to include PcdsPatchableInModule. This makes the build system correctly distinguish fixed PCDs from PCDs whose value may be different from the assigned value at compile time. Note that this only affects platforms that explicitly mark these PCDs as PatchableInModule in the DSC. All existing platforms that use FixedPcd will not be affected by this change. Contributed-under: TianoCore Contribution Agreement 1.0 Acked-by: Laszlo Ersek Reviewed-by: Olivier Martin Signed-off-by: Ard Biesheuvel --- ArmPkg/ArmPkg.dec | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec index 215464224c12..c8d7f50d8072 100644 --- a/ArmPkg/ArmPkg.dec +++ b/ArmPkg/ArmPkg.dec @@ -93,14 +93,6 @@ gArmTokenSpaceGuid.PcdSecureFvSize|0x0|UINT32|0x00000030 # - # ARM Normal (or Non Secure) Firmware PCDs - # - gArmTokenSpaceGuid.PcdFdBaseAddress|0|UINT64|0x0000002B - gArmTokenSpaceGuid.PcdFdSize|0|UINT32|0x0000002C - gArmTokenSpaceGuid.PcdFvBaseAddress|0|UINT64|0x0000002D - gArmTokenSpaceGuid.PcdFvSize|0|UINT32|0x0000002E - - # # ARM Hypervisor Firmware PCDs # gArmTokenSpaceGuid.PcdHypFdBaseAddress|0|UINT32|0x0000003A @@ -127,6 +119,15 @@ # Maximum file size for TFTP servers that do not support 'tsize' extension gArmTokenSpaceGuid.PcdMaxTftpFileSize|0x01000000|UINT32|0x00000000 + # + # ARM Normal (or Non Secure) Firmware PCDs + # + gArmTokenSpaceGuid.PcdFdSize|0|UINT32|0x0000002C + gArmTokenSpaceGuid.PcdFvSize|0|UINT32|0x0000002E + +[PcdsFixedAtBuild.common, PcdsPatchableInModule.common] + gArmTokenSpaceGuid.PcdFdBaseAddress|0|UINT64|0x0000002B + gArmTokenSpaceGuid.PcdFvBaseAddress|0|UINT64|0x0000002D [PcdsFixedAtBuild.ARM] # @@ -207,16 +208,18 @@ # -# These PCDs are also defined as 'PcdsDynamic' to be redefined when using UEFI in a -# context of virtual machine. +# These PCDs are also defined as 'PcdsDynamic' or 'PcdsPatchableInModule' to be +# redefined when using UEFI in a context of virtual machine. # -[PcdsFixedAtBuild.common, PcdsDynamic.common] +[PcdsFixedAtBuild.common, PcdsDynamic.common, PcdsPatchableInModule.common] + # System Memory (DRAM): These PCDs define the region of in-built system memory # Some platforms can get DRAM extensions, these additional regions will be declared # to UEFI by ArmPlatformLib gArmTokenSpaceGuid.PcdSystemMemoryBase|0|UINT64|0x00000029 gArmTokenSpaceGuid.PcdSystemMemorySize|0|UINT64|0x0000002A +[PcdsFixedAtBuild.common, PcdsDynamic.common] # # ARM Architectural Timer #