public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH 4/7] ArmPlatformPkg: remove ArmPlatformInitializeSystemMemory
Date: Thu, 30 Nov 2017 14:15:06 +0000	[thread overview]
Message-ID: <20171130141509.27230-5-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20171130141509.27230-1-ard.biesheuvel@linaro.org>

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 <ard.biesheuvel@linaro.org>
---
 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(-)

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,
-- 
2.11.0



  parent reply	other threads:[~2017-11-30 14:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30 14:15 [PATCH 0/7] ArmPlatformPkg cleanup - phase II Ard Biesheuvel
2017-11-30 14:15 ` [PATCH 1/7] ArmPlatformPkg/Documentation: remove outdated porting manual Ard Biesheuvel
2017-11-30 14:15 ` [PATCH 2/7] ArmPlatformPkg: remove unused ArmVExpressLibCTA9x4 code Ard Biesheuvel
2017-11-30 14:15 ` [PATCH 3/7] ArmPlatformPkg/ArmPlatformLib: remove ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR Ard Biesheuvel
2017-11-30 14:15 ` Ard Biesheuvel [this message]
2017-11-30 14:15 ` [PATCH 5/7] ArmPlatformPkg: move internal PL061 header into driver directory Ard Biesheuvel
2017-11-30 14:15 ` [PATCH 6/7] ArmPlatformPkg: move internal SP805 " Ard Biesheuvel
2017-11-30 14:15 ` [PATCH 7/7] ArmPlatformPkg: move internal PL031 " Ard Biesheuvel
2017-11-30 15:55 ` [PATCH 0/7] ArmPlatformPkg cleanup - phase II Leif Lindholm
2017-11-30 16:10   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171130141509.27230-5-ard.biesheuvel@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox