diff --git a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c index 9043afaffa..da6e6225be 100644 --- a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c +++ b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c @@ -15,6 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. --*/ +#include #include "CpuDxe.h" #define TT_ATTR_INDX_INVALID ((UINT32)~0) @@ -122,6 +123,8 @@ GetNextEntryAttribute ( } } + FreePool (MemorySpaceMap); + return BaseAddress + (EntryCount * TT_ADDRESS_AT_LEVEL(TableLevel)); } @@ -185,5 +188,7 @@ SyncCacheConfig ( EndAddressGcdRegion - BaseAddressGcdRegion, PageAttributeToGcdAttribute (PageAttribute)); + FreePool (MemorySpaceMap); + return EFI_SUCCESS; } diff --git a/ArmPkg/Drivers/CpuDxe/ArmV6/Mmu.c b/ArmPkg/Drivers/CpuDxe/ArmV6/Mmu.c index 2dbdb689fe..ce8bd65c24 100644 --- a/ArmPkg/Drivers/CpuDxe/ArmV6/Mmu.c +++ b/ArmPkg/Drivers/CpuDxe/ArmV6/Mmu.c @@ -2,18 +2,20 @@ Copyright (c) 2009, Hewlett-Packard Company. All rights reserved.
Portions copyright (c) 2010, Apple Inc. All rights reserved.
+Portions copyright (c) 2013, 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 -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +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 +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. --*/ +#include #include "CpuDxe.h" // First Level Descriptors @@ -330,6 +332,8 @@ SyncCacheConfig ( SetGcdMemorySpaceAttributes (MemorySpaceMap, NumberOfDescriptors, NextRegionBase, NextRegionLength, GcdAttributes); } + FreePool (MemorySpaceMap); + return EFI_SUCCESS; } diff --git a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c b/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c index b45e85d9af..9319050b06 100644 --- a/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c +++ b/ArmPlatformPkg/Library/EblCmdLib/EblCmdLib.c @@ -337,6 +337,8 @@ EblDumpGcd ( AsciiPrint ("\n"); } + FreePool (MemorySpaceMap); + Status = gDS->GetIoSpaceMap(&NumberOfDescriptors,&IoSpaceMap); if (EFI_ERROR (Status)) { return Status; @@ -355,6 +357,8 @@ EblDumpGcd ( AsciiPrint ("\n"); } + FreePool (IoSpaceMap); + return EFI_SUCCESS; }