summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bce3e2a)
Signed-off-by: li-elvin <elvin.li@intel.com>
Reviewed-by: jyao1 <jiewen.yao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13352
6f19259b-4bc3-4df7-8a09-
765794883524
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, 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
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
EfiToLegacy16InitTable->LowPmmMemory = (UINT32) MemoryAddressUnder1MB;\r
EfiToLegacy16InitTable->LowPmmMemorySizeInBytes = MemorySize;\r
\r
EfiToLegacy16InitTable->LowPmmMemory = (UINT32) MemoryAddressUnder1MB;\r
EfiToLegacy16InitTable->LowPmmMemorySizeInBytes = MemorySize;\r
\r
+ MemorySize = PcdGet32 (PcdHighPmmMemorySize);\r
+ ASSERT ((MemorySize & 0xFFF) == 0);\r
//\r
// Allocate high PMM Memory under 16 MB\r
//\r
// Allocate high PMM Memory under 16 MB\r
- //\r
- MemorySize = PcdGet32 (PcdHighPmmMemorySize);\r
- ASSERT ((MemorySize & 0xFFF) == 0); \r
Status = AllocateLegacyMemory (\r
AllocateMaxAddress,\r
0x1000000,\r
EFI_SIZE_TO_PAGES (MemorySize),\r
&MemoryAddress\r
);\r
Status = AllocateLegacyMemory (\r
AllocateMaxAddress,\r
0x1000000,\r
EFI_SIZE_TO_PAGES (MemorySize),\r
&MemoryAddress\r
);\r
+ if (EFI_ERROR (Status)) {\r
+ //\r
+ // If it fails, allocate high PMM Memory under 4GB\r
+ // \r
+ Status = AllocateLegacyMemory (\r
+ AllocateMaxAddress,\r
+ 0xFFFFFFFF,\r
+ EFI_SIZE_TO_PAGES (MemorySize),\r
+ &MemoryAddress\r
+ ); \r
+ }\r
if (!EFI_ERROR (Status)) {\r
EfiToLegacy16InitTable->HiPmmMemory = (UINT32) (EFI_PHYSICAL_ADDRESS) (UINTN) MemoryAddress;\r
EfiToLegacy16InitTable->HiPmmMemorySizeInBytes = MemorySize;\r
if (!EFI_ERROR (Status)) {\r
EfiToLegacy16InitTable->HiPmmMemory = (UINT32) (EFI_PHYSICAL_ADDRESS) (UINTN) MemoryAddress;\r
EfiToLegacy16InitTable->HiPmmMemorySizeInBytes = MemorySize;\r
\r
//\r
// ShutdownAPs();\r
\r
//\r
// ShutdownAPs();\r