/** @file\r
\r
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
BOOLEAN mEndOfDxe = FALSE;\r
\r
/**\r
- Do an AllocatePages () of type AllocateMaxAddress for EfiBootServicesCode\r
- memory.\r
+ Allocate memory for legacy usage.\r
\r
- @param AllocateType Allocated Legacy Memory Type\r
+ @param AllocateType The type of allocation to perform.\r
+ @param MemoryType The type of memory to allocate.\r
@param StartPageAddress Start address of range\r
@param Pages Number of pages to allocate\r
@param Result Result of allocation\r
EFI_STATUS\r
AllocateLegacyMemory (\r
IN EFI_ALLOCATE_TYPE AllocateType,\r
+ IN EFI_MEMORY_TYPE MemoryType,\r
IN EFI_PHYSICAL_ADDRESS StartPageAddress,\r
IN UINTN Pages,\r
OUT EFI_PHYSICAL_ADDRESS *Result\r
MemPage = (EFI_PHYSICAL_ADDRESS) (UINTN) StartPageAddress;\r
Status = gBS->AllocatePages (\r
AllocateType,\r
- EfiBootServicesCode,\r
+ MemoryType,\r
Pages,\r
&MemPage\r
);\r
//\r
AllocateLegacyMemory (\r
AllocateAddress,\r
+ EfiReservedMemoryType,\r
0,\r
1,\r
&MemoryAddress\r
\r
Status = AllocateLegacyMemory (\r
AllocateAddress,\r
+ EfiReservedMemoryType,\r
CONVENTIONAL_MEMORY_TOP - MemorySize,\r
EFI_SIZE_TO_PAGES (MemorySize),\r
&MemoryAddress\r
for (MemStart = MemoryAddress; MemStart < MemoryAddress + MemorySize; MemStart += 0x1000) {\r
Status = AllocateLegacyMemory (\r
AllocateAddress,\r
+ EfiBootServicesCode,\r
MemStart,\r
1,\r
&StartAddress\r
ASSERT ((MemorySize & 0xFFF) == 0); \r
Status = AllocateLegacyMemory (\r
AllocateMaxAddress,\r
+ EfiBootServicesCode,\r
CONVENTIONAL_MEMORY_TOP,\r
EFI_SIZE_TO_PAGES (MemorySize),\r
&MemoryAddressUnder1MB\r
//\r
Status = AllocateLegacyMemory (\r
AllocateMaxAddress,\r
+ EfiReservedMemoryType,\r
CONVENTIONAL_MEMORY_TOP,\r
(sizeof (LOW_MEMORY_THUNK) / EFI_PAGE_SIZE) + 2,\r
&MemoryAddress\r
// \r
Status = AllocateLegacyMemory (\r
AllocateMaxAddress,\r
+ EfiBootServicesCode,\r
0x1000000,\r
EFI_SIZE_TO_PAGES (MemorySize),\r
&MemoryAddress\r
// \r
Status = AllocateLegacyMemory (\r
AllocateMaxAddress,\r
+ EfiBootServicesCode,\r
0xFFFFFFFF,\r
EFI_SIZE_TO_PAGES (MemorySize),\r
&MemoryAddress\r
/** @file\r
\r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
);\r
\r
/**\r
- Do an AllocatePages () of type AllocateMaxAddress for EfiBootServicesCode\r
- memory.\r
+ Allocate memory for legacy usage.\r
\r
- @param AllocateType Allocated Legacy Memory Type\r
+ @param AllocateType The type of allocation to perform.\r
+ @param MemoryType The type of memory to allocate.\r
@param StartPageAddress Start address of range\r
@param Pages Number of pages to allocate\r
@param Result Result of allocation\r
EFI_STATUS\r
AllocateLegacyMemory (\r
IN EFI_ALLOCATE_TYPE AllocateType,\r
+ IN EFI_MEMORY_TYPE MemoryType,\r
IN EFI_PHYSICAL_ADDRESS StartPageAddress,\r
IN UINTN Pages,\r
OUT EFI_PHYSICAL_ADDRESS *Result\r