From patchwork Fri Nov 17 16:09:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 119186 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp703949qgn; Fri, 17 Nov 2017 08:10:15 -0800 (PST) X-Google-Smtp-Source: AGs4zMYU1dnJGvFzPAhbMkeyM2QWNNYoxrhqqUiDiUKIqZ5TndiA1o6hTFtqTf70fLzzzg6XTNaC X-Received: by 10.99.108.67 with SMTP id h64mr5615475pgc.119.1510935015170; Fri, 17 Nov 2017 08:10:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510935015; cv=none; d=google.com; s=arc-20160816; b=t4yB4XpW/MO5UsbTvFnuZdsXvI7K1n4oMB2MG6xnzUhyYtPnsmiA7c0luEb9dM9fSG fDdVcJdkakNkPfrXquLv5K3iGDP5wlxLQryVNjN7BmlqrwBdSgMFiFP17rx97n5aL4S3 kowaGmEqZeZXUQZqb1SY0CDs+cB6LKOUz7ElHKNBHwLaOLCZK6/QGZmIyDELIx4LIQTy M8cpXIgHGEy7HmtEHK/pvOB853I1mUA1VYc38+Sfur6VFau3uIK/0BJLkaFSxEBGmfDv cjEmlCJ0nOHZoQ5uyCfBgFm2DZhovcWjC3ZQ6NwBKabr2YACBhFmwBUdEll4zADzvzK4 y7AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=cgkzFDxfYnZumeLqLYhd+A4MQT0NRgRlRiHXiwVttNo=; b=LrhkouSalvXKTU3Mj9NUbYXic8Ojf8KrpBPMQmlYTGo3hQZO1SXaQwUU8B5wU5plJ+ gFICdfO0PGPRio/mpZN7nhq/bVyTRJy7zGyyzvbLRyEntiQxyGYb3NK59lWPXWkXDDL9 wo/OFkuvlke0L5sx23eO7QNLSN85PQhLwafVmQzSu+8gMs6vEcZcJC2b5YWeq4ZE73sq rxQG2eWpIw1XUm8fP99CI/ikMVXqDERA2Po2HJ/6z+BY0KMdxcOp7eFQXhtsohJfDmUE XmUR4qg1sdp3vnz1K0IKF/zx3pBdD3Vdn6vOMfcQz2bbFYx4QuhZnZsa/Xs92/2ieThn kf8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VM4qIGaQ; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id a8si3041581pll.474.2017.11.17.08.10.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 08:10:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VM4qIGaQ; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 03C922035BB33; Fri, 17 Nov 2017 08:05:41 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 DE6252035BB31 for ; Fri, 17 Nov 2017 08:05:38 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id z3so7449220wme.3 for ; Fri, 17 Nov 2017 08:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vA20VwNwe0y6VHpl3NvFP1xiJXbZcXkE8iHeycZQow8=; b=VM4qIGaQhvV6xM+h2M3KCXcAoBmBf5N7QMiskLwUpIJFFDWxFwTvh1JQBefkQMBGBh vsQf6mXBtdprofYc5R/Zuvg6P9jc+8zoqnPn4V5PKTCc1IKPiOROw8FRHEGGaLlnDV15 iJKZgnJ5XiJFoanaRe2rcnVPvtMuBFkSs5J1I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vA20VwNwe0y6VHpl3NvFP1xiJXbZcXkE8iHeycZQow8=; b=E0VRX09h379ZDBQbvgKFk12J/+hiJaApOh2ZOp/oF5y7Ni4BtnY7sOSSrpCHPmKhwR DwHie2EbEy0VaMr159wHSiXg1KzjT6cIAuwfWRHFTGRtTb6VHjYNTJcEcaJe5vWxwF2b b7NxOOSyoEUY6AwB4bqbzufac1LYn49r3bjXdoB6NEEX+VjES2cr3MTyZmK5b69qYHWD qltBBeEYVv6ieDq3LzCaY8tUaR7RQm4CZIZwZGQJYbM8SICebfW7gLdVFdtfGkO+cTKg AZT8TmXvBhPFJzAGQwfs4oJLATFdTyYnmoC2TwpN4ULdIYiRdvKKwCuqAw8ys0so51U4 wWPA== X-Gm-Message-State: AJaThX5DqsJ/Yu2YojH/8p6r0Seyu2ipt8EHtpxk2zxmaQIQjmEYx+Sw CErLmYbhIGGvWlKfMZNC9EvfgJTg89g= X-Received: by 10.28.132.66 with SMTP id g63mr4354495wmd.22.1510934988198; Fri, 17 Nov 2017 08:09:48 -0800 (PST) Received: from localhost.localdomain ([160.167.170.128]) by smtp.gmail.com with ESMTPSA id p42sm5575959wrb.28.2017.11.17.08.09.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 08:09:47 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com Date: Fri, 17 Nov 2017 16:09:12 +0000 Message-Id: <20171117160913.17292-15-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171117160913.17292-1-ard.biesheuvel@linaro.org> References: <20171117160913.17292-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 14/15] ArmVirtPkg/ArmVirtMemoryInitPeiLib: move to ArmVirtMemInfoLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Move to the new ArmVirtMemInfoLib library to retrieve DRAM information from the platform, so that we can phase out ArmPlatformLib going forward. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtQemu.dsc | 7 ++++++- ArmVirtPkg/ArmVirtQemu.fdf | 1 + ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c | 4 ++-- ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index d14a0dd0d1d9..5c59f05187fa 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -48,7 +48,8 @@ [LibraryClasses.common] QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf - ArmPlatformLib|ArmVirtPkg/Library/ArmVirtPlatformLib/ArmVirtPlatformLib.inf + ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf + ArmVirtMemInfoLib|ArmVirtPkg/Library/PeiVirtMemInfoLib/PeiVirtMemInfoLib.inf TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf @@ -233,6 +234,10 @@ [Components.common] NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf } + ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.inf { + + ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.inf + } # # DXE diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf index c6a22dc018f3..696dec264639 100644 --- a/ArmVirtPkg/ArmVirtQemu.fdf +++ b/ArmVirtPkg/ArmVirtQemu.fdf @@ -109,6 +109,7 @@ [FV.FVMAIN_COMPACT] INF ArmPkg/Drivers/CpuPei/CpuPei.inf INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf + INF ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.inf INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { diff --git a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c index 6f3e54b7afcb..05afd1282422 100644 --- a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c +++ b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include @@ -39,7 +39,7 @@ InitMmu ( RETURN_STATUS Status; // Get Virtual Memory Map from the Platform Library - ArmPlatformGetVirtualMemoryMap (&MemoryTable); + ArmVirtGetMemoryMap (&MemoryTable); //Note: Because we called PeiServicesInstallPeiMemory() before to call InitMmu() the MMU Page Table resides in // DRAM (even at the top of DRAM as it is the first permanent memory allocation) diff --git a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf index 028d6fb5ac28..54879d590a8a 100644 --- a/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf +++ b/ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf @@ -29,13 +29,14 @@ [Packages] EmbeddedPkg/EmbeddedPkg.dec ArmPkg/ArmPkg.dec ArmPlatformPkg/ArmPlatformPkg.dec + ArmVirtPkg/ArmVirtPkg.dec [LibraryClasses] DebugLib HobLib ArmLib ArmMmuLib - ArmPlatformLib + ArmVirtMemInfoLib CacheMaintenanceLib [Guids]