From patchwork Tue Feb 3 19:19:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 44307 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CF19F2034D for ; Tue, 3 Feb 2015 19:23:08 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id f15sf7504090lbj.2 for ; Tue, 03 Feb 2015 11:23:07 -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:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=jMcComFSpLvnlmM2HXYglPuP3uZ8C0zu92moe+TsTQ0=; b=O4qWmz5uzQ7l465xprnk8Z/QlobRV7xruxcWTvHc9SkhQNSh01+9jhhrWQHFxtz+74 kjoMZDNBPfXCwicgnCMUtEcaymH+w2KZ51L1i83GLGOpm6UWNftQsvHrzJ6NAuIRsBOc XXIbEQ1ZKG8ksUgPZJVPFewDRLgfpuTmgQyFMAX2ZaI+tnxu4JYJVPzSjnjZscaH44z3 BKqN7aZ3hpgv++Kdx+pmYjZKEsm11DdcasNaNHgZCQkUx3gijyEcZ+C3p+N0zrntH1gJ 8VZv1f7A4gJYwM/YLOkbtUNyLTZ/NbDLVb8AlS0y1MNjWCiRaUk1BMCKOSzcgzsTHEdy mtLQ== X-Gm-Message-State: ALoCoQkoQtdd3y690KMXx5OuqAjHheYAzMj7ZgkwwCQVNvcsgNyul9MDaje18GwpXjuJSUX325c0 X-Received: by 10.152.116.80 with SMTP id ju16mr2379032lab.1.1422991387789; Tue, 03 Feb 2015 11:23:07 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.84 with SMTP id v20ls682608laz.57.gmail; Tue, 03 Feb 2015 11:23:07 -0800 (PST) X-Received: by 10.152.37.106 with SMTP id x10mr27249032laj.52.1422991387630; Tue, 03 Feb 2015 11:23:07 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id f10si20061197lbs.123.2015.02.03.11.23.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:23:07 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id ge10so54216077lab.11 for ; Tue, 03 Feb 2015 11:23:07 -0800 (PST) X-Received: by 10.152.219.37 with SMTP id pl5mr22555816lac.6.1422991387464; Tue, 03 Feb 2015 11:23:07 -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 h5csp34795lbj; Tue, 3 Feb 2015 11:23:06 -0800 (PST) X-Received: by 10.194.172.35 with SMTP id az3mr58624623wjc.43.1422991380452; Tue, 03 Feb 2015 11:23:00 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id fb7si32973402wid.107.2015.02.03.11.22.59 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:23:00 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YIj1r-0004FV-A0; Tue, 03 Feb 2015 19:20:55 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YIj1p-0004EH-FF for xen-devel@lists.xen.org; Tue, 03 Feb 2015 19:20:53 +0000 Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id D5/60-03163-49F11D45; Tue, 03 Feb 2015 19:20:52 +0000 X-Env-Sender: ard.biesheuvel@linaro.org X-Msg-Ref: server-9.tower-31.messagelabs.com!1422991251!8063447!1 X-Originating-IP: [209.85.212.175] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.12.5; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26927 invoked from network); 3 Feb 2015 19:20:52 -0000 Received: from mail-wi0-f175.google.com (HELO mail-wi0-f175.google.com) (209.85.212.175) by server-9.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 3 Feb 2015 19:20:52 -0000 Received: by mail-wi0-f175.google.com with SMTP id fb4so26890970wid.2 for ; Tue, 03 Feb 2015 11:20:51 -0800 (PST) X-Received: by 10.194.90.210 with SMTP id by18mr28100627wjb.80.1422991251868; Tue, 03 Feb 2015 11:20:51 -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.48 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 11:20:51 -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:50 +0000 Message-Id: <1422991212-9257-6-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> Cc: Ard Biesheuvel Subject: [Xen-devel] [PATCH v3 05/27] ArmVirtualizationPkg: allow patchable PCD for device tree base address X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org 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.52 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 List-Archive: To allow a runtime self relocating PrePi instance to discover the base address of the device tree at runtime, allow the use of a patchable PCD for gArmVirtualizationTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress. We will not be using the build time patch tool in this case, but using a patchable PCD will make the build system aware that its value is not a compile time constant. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin Reviewed-by: Laszlo Ersek Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec | 2 +- .../ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec index 99411548aff6..d83117fc6abe 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec @@ -34,7 +34,7 @@ gArmVirtualizationTokenSpaceGuid = { 0x0B6F5CA7, 0x4F53, 0x445A, { 0xB7, 0x6E, 0x2E, 0x36, 0x5B, 0x80, 0x63, 0x66 } } gEarlyPL011BaseAddressGuid = { 0xB199DEA9, 0xFD5C, 0x4A84, { 0x80, 0x82, 0x2F, 0x41, 0x70, 0x78, 0x03, 0x05 } } -[PcdsFixedAtBuild] +[PcdsFixedAtBuild, PcdsPatchableInModule] # # This is the physical address where the device tree is expected to be stored # upon first entry into UEFI. This needs to be a FixedAtBuild PCD, so that we diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c index aa4ced4582e8..3e3074af72f1 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c +++ b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c @@ -96,7 +96,7 @@ ArmPlatformInitializeSystemMemory ( ASSERT (HobData != NULL); *HobData = 0; - DeviceTreeBase = (VOID *)(UINTN)FixedPcdGet64 (PcdDeviceTreeInitialBaseAddress); + DeviceTreeBase = (VOID *)(UINTN)PcdGet64 (PcdDeviceTreeInitialBaseAddress); ASSERT (DeviceTreeBase != NULL); //