From patchwork Mon Jan 26 19:03:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 43780 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AF7C820D5D for ; Mon, 26 Jan 2015 19:04:33 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e49sf5273204eek.3 for ; Mon, 26 Jan 2015 11:04:33 -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=KWVniD5hGQIe6U7xCqbyzunPG7Uc9KpHSgAa6xZHrek=; b=Stlfy6zMNGN5PEo0VqVxxt0vYMtdrVi+87SkJyqN2KDooTk/bMx2F8K+YPkt2tSdBM BWZIZ8rbJUfBH/nX3IiP+QL+TvxYaIXwFa9UT+8I8sDu9O0xEFLWFZ/BrYFYK5A9YFl2 3ppsJfulodFjqapK2Qh5j+Q7JA11P1Oo3kr40RsKFj9r6M3FFYfifVoo+6+ZbyNvsDmG 9WF7IA1Ti9DTkv8EnJwgm5TdY5ImBt8rdCENFjNYatnmvyyRDq+DnF6l/DJaOaZibxce HJ4wWUOtby3pIcZkracmU2hrN7cnIJVw0GFrNbtIKlgIuQo5/o3sBbRpSJKDqS0NvX/E x1ow== X-Gm-Message-State: ALoCoQkX7KZnfC7vW8W7ycNxqvT0smupLIdGQb+z21KmTstDrmZhANaXTtucsFEfvbmVj9vYN53J X-Received: by 10.112.162.35 with SMTP id xx3mr1516354lbb.16.1422299072986; Mon, 26 Jan 2015 11:04:32 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.45.6 with SMTP id i6ls127463lam.10.gmail; Mon, 26 Jan 2015 11:04:32 -0800 (PST) X-Received: by 10.152.234.230 with SMTP id uh6mr11174244lac.97.1422299072847; Mon, 26 Jan 2015 11:04:32 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id jp12si5791302lab.19.2015.01.26.11.04.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Jan 2015 11:04:32 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id q1so9430776lam.2 for ; Mon, 26 Jan 2015 11:04:32 -0800 (PST) X-Received: by 10.112.164.101 with SMTP id yp5mr14326408lbb.82.1422299072756; Mon, 26 Jan 2015 11:04:32 -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 h5csp870309lbj; Mon, 26 Jan 2015 11:04:31 -0800 (PST) X-Received: by 10.50.142.99 with SMTP id rv3mr18125209igb.11.1422299067948; Mon, 26 Jan 2015 11:04:27 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id fg15si8528322icb.63.2015.01.26.11.04.27 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 26 Jan 2015 11:04:27 -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-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YFoxO-0006F5-R8; Mon, 26 Jan 2015 19:04:18 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YFoxN-0006Eu-6R for edk2-devel@lists.sourceforge.net; Mon, 26 Jan 2015 19:04:17 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.212.181 as permitted sender) client-ip=209.85.212.181; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wi0-f181.google.com; Received: from mail-wi0-f181.google.com ([209.85.212.181]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YFoxM-00071u-29 for edk2-devel@lists.sourceforge.net; Mon, 26 Jan 2015 19:04:17 +0000 Received: by mail-wi0-f181.google.com with SMTP id fb4so288571wid.2 for ; Mon, 26 Jan 2015 11:04:11 -0800 (PST) X-Received: by 10.195.12.35 with SMTP id en3mr48183349wjd.129.1422299031894; Mon, 26 Jan 2015 11:03:51 -0800 (PST) Received: from ards-macbook-pro.local ([197.129.8.190]) by mx.google.com with ESMTPSA id fo17sm15471007wjc.19.2015.01.26.11.03.48 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Jan 2015 11:03:50 -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 Date: Mon, 26 Jan 2015 19:03:04 +0000 Message-Id: <1422299011-2409-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1422299011-2409-1-git-send-email-ard.biesheuvel@linaro.org> References: <1422299011-2409-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 -0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1YFoxM-00071u-29 Subject: [edk2] [PATCH v2 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.215.43 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 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 d7a4826d931a..b01de13e5f78 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 #