From f598bf12660fc7e758710e6a484d7eea3bfee6ef Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Sat, 11 Jun 2011 12:10:19 +0000 Subject: ArmPlatformPkg: Code cleaning - Fix coding style to follow EDK2 coding convention - Remove deprecated function - Remove unused PCDs git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11808 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/MemoryInitPei/MemoryInit.c | 27 +++++++++++--------------- ArmPlatformPkg/MemoryInitPei/MemoryInitPei.inf | 2 +- 2 files changed, 12 insertions(+), 17 deletions(-) (limited to 'ArmPlatformPkg/MemoryInitPei') diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInit.c b/ArmPlatformPkg/MemoryInitPei/MemoryInit.c index e616c075e1..4b31de96b1 100644 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInit.c +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInit.c @@ -16,6 +16,7 @@ // The package level header files this module uses // #include + // // The protocols, PPI and GUID defintions for this module // @@ -35,28 +36,24 @@ #include #include -// -// Module globals -// - VOID InitMmu ( VOID ) { - ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable; - VOID *TranslationTableBase; - UINTN TranslationTableSize; + ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable; + VOID *TranslationTableBase; + UINTN TranslationTableSize; - // Get Virtual Memory Map from the Platform Library - ArmPlatformGetVirtualMemoryMap(&MemoryTable); + // Get Virtual Memory Map from the Platform Library + ArmPlatformGetVirtualMemoryMap(&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) - ArmConfigureMmu (MemoryTable, &TranslationTableBase, &TranslationTableSize); + //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) + ArmConfigureMmu (MemoryTable, &TranslationTableBase, &TranslationTableSize); } -// May want to put this into a library so you only need the PCD setings if you are using the feature? +// May want to put this into a library so you only need the PCD settings if you are using the feature? VOID BuildMemoryTypeInformationHob ( VOID @@ -87,10 +84,8 @@ BuildMemoryTypeInformationHob ( Info[9].Type = EfiMaxMemoryType; Info[9].NumberOfPages = 0; - BuildGuidDataHob (&gEfiMemoryTypeInformationGuid, &Info, sizeof (Info)); } - /*++ Routine Description: @@ -234,7 +229,7 @@ InitializeMemory ( InitMmu (); if (FeaturePcdGet (PcdPrePiProduceMemoryTypeInformationHob)) { - // Optional feature that helps prevent EFI memory map fragmentation. + // Optional feature that helps prevent EFI memory map fragmentation. BuildMemoryTypeInformationHob (); } diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPei.inf b/ArmPlatformPkg/MemoryInitPei/MemoryInitPei.inf index 87ea168db3..058a635bbe 100644 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPei.inf +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPei.inf @@ -1,6 +1,6 @@ #/** @file # -# Copyright (c) 2010, ARM Ltd. All rights reserved.
+# Copyright (c) 2011, ARM Ltd. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at -- cgit v1.2.3