From patchwork Tue Feb 24 18:02:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 44962 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3202E2029F for ; Tue, 24 Feb 2015 18:05:20 +0000 (UTC) Received: by wesk11 with SMTP id k11sf18390122wes.3 for ; Tue, 24 Feb 2015 10:05:19 -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=D35uufxJqVn4kYu7N5b65rIPiJHPbcw+PA9G1jh3nc4=; b=AOt8pWwGtpOTBmCSRRc4/tPeVTrXfSButtRrL+45iNo5nnF8RTns6UEFJvvWc5i/IA lY8Wf752rsFTdVd1nQPnWekIuPxmNEwnZeJ1bKFi0ceexvekx4bM++/AlYqaCD76t/Xw hSl6FO1K3nDRc8KuU7VM4OSggw2pvUJpJmcYeIeg0ATgMxYo2820vCDFLxRJg+2Sj6Tu PlNvXRxo8z9f8cIk+eLUqBQH0nil715Ap6lJZJoUwFG1coEJYXCvEHt2Sn1QWMujgv7e 6t2keycIELsYqkMoR/tTnFnYVXZwqMh+YtLy0Sj2xkVQ4MUBT1hFZr4/kYrqPM1i0qpB aaog== X-Gm-Message-State: ALoCoQlb2rmj0mwo+fIFMOt4eNy3NnrYNnBRgs/5coY42bTNRNHC2saz94j9BEwfodAgjvqC9Y7T X-Received: by 10.180.13.98 with SMTP id g2mr2295992wic.3.1424801119515; Tue, 24 Feb 2015 10:05:19 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.5 with SMTP id e5ls631187lab.37.gmail; Tue, 24 Feb 2015 10:05:19 -0800 (PST) X-Received: by 10.112.167.231 with SMTP id zr7mr15510614lbb.123.1424801119334; Tue, 24 Feb 2015 10:05:19 -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 lf12si14515864lac.171.2015.02.24.10.05.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 10:05:19 -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 lams18 with SMTP id s18so27528959lam.11 for ; Tue, 24 Feb 2015 10:05:19 -0800 (PST) X-Received: by 10.112.204.197 with SMTP id la5mr742724lbc.29.1424801119203; Tue, 24 Feb 2015 10:05:19 -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 h5csp2078471lbj; Tue, 24 Feb 2015 10:05:18 -0800 (PST) X-Received: by 10.140.88.17 with SMTP id s17mr36835534qgd.79.1424801117605; Tue, 24 Feb 2015 10:05:17 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id e10si28356058qco.26.2015.02.24.10.05.16 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 24 Feb 2015 10:05:17 -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 1YQJqL-0001eP-Kf; Tue, 24 Feb 2015 18:04:25 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YQJqK-0001dA-33 for xen-devel@lists.xen.org; Tue, 24 Feb 2015 18:04:24 +0000 Received: from [85.158.139.211] by server-2.bemta-5.messagelabs.com id 2A/75-03511-72DBCE45; Tue, 24 Feb 2015 18:04:23 +0000 X-Env-Sender: ard.biesheuvel@linaro.org X-Msg-Ref: server-15.tower-206.messagelabs.com!1424801062!7743463!1 X-Originating-IP: [209.85.212.172] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 9507 invoked from network); 24 Feb 2015 18:04:22 -0000 Received: from mail-wi0-f172.google.com (HELO mail-wi0-f172.google.com) (209.85.212.172) by server-15.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 24 Feb 2015 18:04:22 -0000 Received: by mail-wi0-f172.google.com with SMTP id l15so27489043wiw.5 for ; Tue, 24 Feb 2015 10:04:22 -0800 (PST) X-Received: by 10.180.74.111 with SMTP id s15mr32075123wiv.61.1424801062431; Tue, 24 Feb 2015 10:04:22 -0800 (PST) Received: from ards-macbook-pro.lan (bl11-65-113.dsl.telepac.pt. [85.244.65.113]) by mx.google.com with ESMTPSA id w8sm12792521wja.4.2015.02.24.10.04.19 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 24 Feb 2015 10:04:21 -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 Date: Tue, 24 Feb 2015 18:02:46 +0000 Message-Id: <1424800990-15777-6-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1424800990-15777-1-git-send-email-ard.biesheuvel@linaro.org> References: <1424800990-15777-1-git-send-email-ard.biesheuvel@linaro.org> Cc: wei.liu2@citrix.com, Ard Biesheuvel Subject: [Xen-devel] [PATCH v5 05/29] 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.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 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 d53dab9f65e1..ddb79904fa85 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); //