From patchwork Thu Feb 12 11:18:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 44605 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 246032151D for ; Thu, 12 Feb 2015 11:20:17 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id l15sf1679735wiw.0 for ; Thu, 12 Feb 2015 03:20:16 -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=FwMmVKsmdJK6BR0wX34aYFzODoB8m5mIl7WwmHPWYHc=; b=iV9JKjwAQVTdiZdbtrKiTGBr7DlC+MVtPw3glJvs97giOFfOvYI7K4EHjgyHg02R/W CzhekFzXzbyxDx3Kaj2Xdtj9gf/yCRHKFwAfwrAgWR4Jz6C7MH5+FzlD3Wx+yl4iB1G9 erQTLx4nZUw4iabsA+sDdG+0NSIWXYOd/3rzTb9N7vUkWOqAa7GVUiyd2wyhoJZ+314O tU0rHRyRa+5fMAFxEAigo4NlcS0DwVr5Yy7wupRwiTzSytKkOv08wuGa9dGdE2IL/cVy OpYoXKPgQ0mib0kCZjmjYrImw+GEKfWQUIs7yQIFX+oeYk6uRrnzhSHv4cX8tbsocTEB nPfA== X-Gm-Message-State: ALoCoQklTQLReK2wqEGpImkTnLEc3HLzxsdrKDQvwCGJ4ksU9URWk1tokc+zCvu8yUPXJl2TA4fR X-Received: by 10.112.45.197 with SMTP id p5mr495016lbm.18.1423740016104; Thu, 12 Feb 2015 03:20:16 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.6 with SMTP id v6ls88059laa.13.gmail; Thu, 12 Feb 2015 03:20:15 -0800 (PST) X-Received: by 10.112.67.41 with SMTP id k9mr2799287lbt.35.1423740015889; Thu, 12 Feb 2015 03:20:15 -0800 (PST) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id g4si2716330lab.66.2015.02.12.03.20.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 03:20:15 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id w7so8820669lbi.10 for ; Thu, 12 Feb 2015 03:20:15 -0800 (PST) X-Received: by 10.112.125.4 with SMTP id mm4mr2821592lbb.86.1423740015412; Thu, 12 Feb 2015 03:20:15 -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 h5csp378168lbj; Thu, 12 Feb 2015 03:20:14 -0800 (PST) X-Received: by 10.107.9.26 with SMTP id j26mr3819496ioi.91.1423740010217; Thu, 12 Feb 2015 03:20:10 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id ii2si1039982igb.48.2015.02.12.03.20.09 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 12 Feb 2015 03:20:10 -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-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YLroP-0000jc-SR; Thu, 12 Feb 2015 11:20:01 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YLroP-0000jF-1j for edk2-devel@lists.sourceforge.net; Thu, 12 Feb 2015 11:20:01 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.220.51 as permitted sender) client-ip=209.85.220.51; envelope-from=ard.biesheuvel@linaro.org; helo=mail-pa0-f51.google.com; Received: from mail-pa0-f51.google.com ([209.85.220.51]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YLroO-0006pK-4J for edk2-devel@lists.sourceforge.net; Thu, 12 Feb 2015 11:20:01 +0000 Received: by mail-pa0-f51.google.com with SMTP id eu11so10793985pac.10 for ; Thu, 12 Feb 2015 03:19:54 -0800 (PST) X-Received: by 10.68.204.39 with SMTP id kv7mr5517133pbc.49.1423739994386; Thu, 12 Feb 2015 03:19:54 -0800 (PST) Received: from ards-macbook-pro.local ([210.177.145.249]) by mx.google.com with ESMTPSA id n4sm3554887pdl.12.2015.02.12.03.19.51 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Feb 2015 03:19:53 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, olivier.martin@arm.com, lersek@redhat.com, roy.franz@linaro.org, leif.lindholm@linaro.org, stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, anthony.perard@citrix.com, xen-devel@lists.xen.org, julien.grall@linaro.org, jordan.l.justen@intel.com, michael.d.kinney@intel.com, feng.tian@intel.com Date: Thu, 12 Feb 2015 19:18:54 +0800 Message-Id: <1423739961-5945-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1423739961-5945-1-git-send-email-ard.biesheuvel@linaro.org> References: <1423739961-5945-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: 1YLroO-0006pK-4J Subject: [edk2] [PATCH v4 02/29] 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.179 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 ced392980102..87dbd11b867f 100644 --- a/ArmPkg/ArmPkg.dec +++ b/ArmPkg/ArmPkg.dec @@ -96,14 +96,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 @@ -130,6 +122,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] # @@ -210,16 +211,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 #