From patchwork Tue Jul 12 13:00:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 71836 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp461373qga; Tue, 12 Jul 2016 06:00:21 -0700 (PDT) X-Received: by 10.66.66.13 with SMTP id b13mr3765718pat.45.1468328418962; Tue, 12 Jul 2016 06:00:18 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id o129si3929041pfb.247.2016.07.12.06.00.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jul 2016 06:00:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 36DA81A1E01; Tue, 12 Jul 2016 06:01:03 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C8C861A1DFC for ; Tue, 12 Jul 2016 06:01:01 -0700 (PDT) Received: by mail-wm0-x22e.google.com with SMTP id o80so24327343wme.1 for ; Tue, 12 Jul 2016 06:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=6EmNWPRHhhM+Ne0DaqvsSlwrUORd9VU92oBMHjm1q0s=; b=YG3Z/F2oQJVkTDV8D0IivMyVtDunI3U2uMO1j+fSiXIShCtntDTczSHOMj6UGofUGl gQc4scWyBYEWE/nvx8FnRFdg+B4HVuKECYDjAYCK2MWvRggr381WFbABgNl/2fwqCzm/ u7TWJG08Ysa/dkb2VrpTy70x2j1Q6DzAhUMMU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6EmNWPRHhhM+Ne0DaqvsSlwrUORd9VU92oBMHjm1q0s=; b=KJu8ZNummEm+NlvJ6roBlJwtTIZ4XCrRWoB2liz5gdUU8t9335OVStPstNQj9YmWn7 jfzPjYmfhFk8qgt4MyEtzFYa+AsMECIBKS/RhPlEKtftawpNZoBC2DdBLwGqX8JC/A0r MEPEfYtnLWbrFgjoroHRyoE2QgNrnI3jQmYbgcDfz2KbPzVKCLM87fffFQwXGdURCVCe alLJAdSV2J9cb5tQZAIpAMKKsHI0a2dSxtRdPbmu2ODazvwdtql1HNj/+PS2JVMfUMUg kjadDtuaCKaYlb9MOvzrxl3CULpZ1Zi2deoxscEF6eCC5hEIQagwKQUCNYsgefOSt803 birA== X-Gm-Message-State: ALyK8tLwHNAMUWQyhjOEkMQ64sgrxoOsV43eUwzGWrTstbjk087+yGt2ND/K9/Z73kHssaWI X-Received: by 10.28.74.20 with SMTP id x20mr21515679wma.14.1468328415545; Tue, 12 Jul 2016 06:00:15 -0700 (PDT) Received: from localhost.localdomain ([188.203.148.129]) by smtp.gmail.com with ESMTPSA id m125sm1850533wmm.8.2016.07.12.06.00.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jul 2016 06:00:14 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Tue, 12 Jul 2016 15:00:13 +0200 Message-Id: <1468328413-6010-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 Subject: [edk2] [PATCH] ArmVirtPkg/HighMemDxe: allow patchable PCD for PcdSystemMemoryBase X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Redefine the reference to PcdSystemMemoryBase in HighMemDxe.inf as a plain [Pcd] rather than [FixedPcd] (and fix up the code as appropriate). This allows us to align ArmVirtQemuKernel with ArmVirtQemu, given that the former uses a patchable PCD not a fixed PCD. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Apologies for the sloppiness on my part, but at least I caught it in time :-) This change is required before we can start using HighMemDxe in ArmVirtQemuKernel. ArmVirtPkg/HighMemDxe/HighMemDxe.c | 2 +- ArmVirtPkg/HighMemDxe/HighMemDxe.inf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek diff --git a/ArmVirtPkg/HighMemDxe/HighMemDxe.c b/ArmVirtPkg/HighMemDxe/HighMemDxe.c index 4963164fbd8a..7fd7e8e9a539 100644 --- a/ArmVirtPkg/HighMemDxe/HighMemDxe.c +++ b/ArmVirtPkg/HighMemDxe/HighMemDxe.c @@ -74,7 +74,7 @@ InitializeHighMemDxe ( CurBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]); CurSize = fdt64_to_cpu (((UINT64 *)RegProp)[1]); - if (FixedPcdGet64 (PcdSystemMemoryBase) != CurBase) { + if (PcdGet64 (PcdSystemMemoryBase) != CurBase) { Status = gDS->AddMemorySpace ( EfiGcdMemoryTypeSystemMemory, CurBase, CurSize, diff --git a/ArmVirtPkg/HighMemDxe/HighMemDxe.inf b/ArmVirtPkg/HighMemDxe/HighMemDxe.inf index 2b397626a450..ae632a8bee93 100644 --- a/ArmVirtPkg/HighMemDxe/HighMemDxe.inf +++ b/ArmVirtPkg/HighMemDxe/HighMemDxe.inf @@ -45,7 +45,7 @@ [LibraryClasses] [Guids] gFdtHobGuid -[FixedPcd] +[Pcd] gArmTokenSpaceGuid.PcdSystemMemoryBase [Depex]