From patchwork Thu Nov 30 14:15:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 120203 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp721754qgn; Thu, 30 Nov 2017 06:15:37 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ7mfA7YjV7mImZ2bdd5un8Nwc7sya4+TVhqaybA5eWVhkAuw8GJkRr9TlfDFpQk+zyu88L X-Received: by 10.98.60.27 with SMTP id j27mr6789639pfa.68.1512051337338; Thu, 30 Nov 2017 06:15:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512051337; cv=none; d=google.com; s=arc-20160816; b=n0CSnQjYGGWSNKoXqkmkDl04Zg41U1S8HUwDThE3Ep7UPD7/M64BvhA3YDYtZUaNDx tpUbE2aPgbqTxnZPhly2ibKlxhl6XVYDPWxXFtP+dARM2vhex475jeeUl/m+YD7WB/6T 6cSi9BwfZuIxC7pT5QV5x7ZtWBTqbGtzTsFndpp7BFLvCjP3AkACBAxtEoNn9x6ggmsy jr72XsSYDGoW0wKYNU/4PU2C2f+RaX68kiRp2blyQySQPKopmcpYO+NVYVu2T+qQOyyn 1SSnywZLC40HdSMvd4oA4Jd2rz2PTpLBFNkanGdfsqkJbu72doFrscWYOxYhqKoZH2of LT0A== 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=HjG+kpXTdmui560ZPQtlbVwEzBtc8kD+Hc1MTQSZzVY=; b=HzqxsCkQq9cNiQWRURLvqPowOLB3NKxc1cvRPSgS3szefM1grcnxenQ4g3gFLGIjxT 3jVAfoaObYdMDsuathAPPRZa8VoYE4JEpQsc70+9yYTD6FDQ/T1BGdzVY3cYRmui6dj/ iKfWw1XMS1Obm/OdIaJKLFKLPtjd/pRY4yq4YFi2YFHaPAACkPdAP44Ey5ql7x9OvKUi f45W8BomP5u7mScfB89shwWr/BQcw0OjM1UjbyOCIjeocTcHzrw7DKJTfOPNhrYVD1XH pW7ElOmbwdT7wYbe/UAASRciCbCzGCHKI2qRVSyCRdbTlavaak1h8e2q/G2GzBzh2gWh s4ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=f1npmZh+; 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 r63si3152959plb.174.2017.11.30.06.15.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Nov 2017 06:15:37 -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=f1npmZh+; 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 130C72211B425; Thu, 30 Nov 2017 06:11:10 -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:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::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 AC6EA220F3C3D for ; Thu, 30 Nov 2017 06:11:08 -0800 (PST) Received: by mail-wr0-x243.google.com with SMTP id x49so6719849wrb.13 for ; Thu, 30 Nov 2017 06:15:34 -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=I+Dh4upPrO+3A8kSXTtJANdPPmfE2ysDydCu0CN1X64=; b=f1npmZh+xeWEFKPp0RHeI9nbiBIJQ6rdhPq/h10aOjMlK1h0ONSz1oCVhjobYBoaPo WDiqV2zWioASt0uWiZqdOH7npwQp+Jlzy04syY2Res4warsX75q7iXZQ21OZvXs2HwSd 45WTamJM9ybOdUI8HzMsV9vUd2Ze4ozpnGN5s= 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=I+Dh4upPrO+3A8kSXTtJANdPPmfE2ysDydCu0CN1X64=; b=uEJLhwIvTQFiJBrPFXlJm8I5XTu8UU8Bi26+ATTbh1wNEhvMJe+tf2UaEb797+ek07 zq2ZzL+zUVWTFG9eo8KX1ZA413MXaN/jU1ieobMb8h2+RqewjhOTG730mAxZ1pDFMh6h ZkBAucFWkLECc/IvUS5Ll9NzJwy7L4AIPK/RbjSmxImEUr7u8EEv6dfJkdc4etma4Qno 6Wl2kS8tQU1H0XF5/wphlGf71LQgRWqadKtZimz8qY52a20LHd7xmB8Ugjfe/6X/4b7d ZCHyQZA8jAxWiB3Zun1BXl6bVEqhG6bd7r9WEgdw9eV0gjVWKApLYlP71eZDRa9btsIW WwlA== X-Gm-Message-State: AJaThX716yFUVMVXw5Vuhj9B00ebErPiiNllYd4DNNSSOi6HB9rZaF+g tkgUqC9e87GDChJGMGlmPDd6oHz22Yk= X-Received: by 10.223.171.177 with SMTP id s46mr2098052wrc.194.1512051332104; Thu, 30 Nov 2017 06:15:32 -0800 (PST) Received: from localhost.localdomain ([105.150.171.234]) by smtp.gmail.com with ESMTPSA id f19sm2303555wmf.5.2017.11.30.06.15.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Nov 2017 06:15:31 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 30 Nov 2017 14:15:06 +0000 Message-Id: <20171130141509.27230-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171130141509.27230-1-ard.biesheuvel@linaro.org> References: <20171130141509.27230-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 4/7] ArmPlatformPkg: remove ArmPlatformInitializeSystemMemory 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" The function ArmPlatformInitializeSystemMemory() is defined by ArmPlatformLib, but is only ever called when using the PrePeiCore flavor of the startup code. Also, none of the remaining upstream platforms actually implement anything in that function in the first place. So let's just remove it altogether. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmPlatformPkg.dec | 1 - ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c | 13 ------------- ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c | 14 -------------- ArmPlatformPkg/Include/Library/ArmPlatformLib.h | 11 ----------- ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c | 14 -------------- ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c | 8 -------- ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf | 1 - BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c | 14 -------------- 8 files changed, 76 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec index e282e76667b1..9d47e459eadc 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dec +++ b/ArmPlatformPkg/ArmPlatformPkg.dec @@ -48,7 +48,6 @@ [PcdsFeatureFlag.common] gArmPlatformTokenSpaceGuid.PcdNorFlashRemapping|FALSE|BOOLEAN|0x00000012 gArmPlatformTokenSpaceGuid.PcdStandalone|TRUE|BOOLEAN|0x00000001 - gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec|FALSE|BOOLEAN|0x00000002 gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores|FALSE|BOOLEAN|0x00000004 gArmPlatformTokenSpaceGuid.PcdNorFlashCheckBlockLocked|FALSE|BOOLEAN|0x0000003C diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c index 93f4d82f1988..a6ddd1b792c9 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c @@ -149,19 +149,6 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ -} - EFI_STATUS PrePeiCoreGetMpCoreInfo ( OUT UINTN *CoreCount, diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c index 11dd7ff1bfb0..7760e8252125 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c @@ -155,20 +155,6 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ - // Nothing to do here -} - EFI_STATUS PrePeiCoreGetMpCoreInfo ( OUT UINTN *CoreCount, diff --git a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h index c74d53506fee..3ad4c16066b6 100644 --- a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h +++ b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h @@ -112,17 +112,6 @@ ArmPlatformInitialize ( ); /** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ); - -/** Return the Virtual Memory Map of your platform This Virtual Memory Map is used by MemoryInitPei Module to initialize the MMU on your platform. diff --git a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c b/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c index f80a276a04d6..038e955db50a 100644 --- a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c +++ b/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c @@ -106,20 +106,6 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ - //TODO: Implement me -} - EFI_STATUS PrePeiCoreGetMpCoreInfo ( OUT UINTN *CoreCount, diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c index e7880d30b1c8..389a2e6f1abd 100644 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c @@ -103,14 +103,6 @@ InitializeMemory ( DEBUG ((EFI_D_LOAD | EFI_D_INFO, "Memory Init PEIM Loaded\n")); - // - // Initialize the System Memory (DRAM) - // - if (!FeaturePcdGet (PcdSystemMemoryInitializeInSec)) { - // In case the DRAM has not been initialized by the secure firmware - ArmPlatformInitializeSystemMemory (); - } - // Ensure PcdSystemMemorySize has been set ASSERT (PcdGet64 (PcdSystemMemorySize) != 0); ASSERT (PcdGet64 (PcdSystemMemoryBase) < (UINT64)MAX_ADDRESS); diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf index 2c14a9c826ff..e9b4ea1114be 100644 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf @@ -49,7 +49,6 @@ [Guids] [FeaturePcd] gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob - gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec [FixedPcd] gArmTokenSpaceGuid.PcdFdBaseAddress diff --git a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c b/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c index 3b0244004853..d8eec72b7c2c 100644 --- a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c +++ b/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c @@ -101,20 +101,6 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ - // We do not need to initialize the System Memory on RTSM -} - VOID ArmPlatformGetPlatformPpiList ( OUT UINTN *PpiListSize,