3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
28 #if defined (MDE_CPU_IPF)
30 // For Itanium machines make the default allocations 8K aligned
32 #define EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT (EFI_PAGE_SIZE * 2)
33 #define DEFAULT_PAGE_ALLOCATION (EFI_PAGE_SIZE * 2)
37 // For genric EFI machines make the default allocations 4K aligned
39 #define EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT (EFI_PAGE_SIZE)
40 #define DEFAULT_PAGE_ALLOCATION (EFI_PAGE_SIZE)
49 #define MEMORY_MAP_SIGNATURE EFI_SIGNATURE_32('m','m','a','p')
64 // Internal prototypes
68 CoreAllocatePoolPages (
69 IN EFI_MEMORY_TYPE PoolType
,
70 IN UINTN NumberOfPages
,
77 Internal function. Used by the pool functions to allocate pages
78 to back pool allocation requests.
82 PoolType - The type of memory for the new pool pages
84 NumberOfPages - No of pages to allocate
86 Alignment - Bits to align.
90 The allocated memory, or NULL
98 IN EFI_PHYSICAL_ADDRESS Memory
,
99 IN UINTN NumberOfPages
105 Internal function. Frees pool pages allocated via AllocatePoolPages ()
109 Memory - The base address to free
111 NumberOfPages - The number of pages to free
123 IN EFI_MEMORY_TYPE PoolType
,
130 Internal function to allocate pool of a particular type.
132 Caller must have the memory lock held
137 PoolType - Type of pool to allocate
139 Size - The amount of pool to allocate
143 The allocate pool, or NULL
157 Internal function to free a pool entry.
159 Caller must have the memory lock held
164 Buffer - The allocated pool entry to free
168 EFI_INVALID_PARAMETER - Buffer not valid
170 EFI_SUCCESS - Buffer successfully freed.
177 CoreAcquireMemoryLock (
184 Enter critical section by gaining lock on gMemoryLock
198 CoreReleaseMemoryLock (
205 Exit critical section by releasing lock on gMemoryLock
220 // Internal Global data
223 extern EFI_LOCK gMemoryLock
;
224 extern LIST_ENTRY gMemoryMap
;
225 extern MEMORY_MAP
*gMemoryLastConvert
;
226 extern LIST_ENTRY mGcdMemorySpaceMap
;