Create the variable to save the base address of page table and stack\r
for transferring into long mode in IA32 capsule PEI.\r
\r
-Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
This function allocates EfiReservedMemoryType below 4G memory address.\r
\r
@param Size Size of memory to allocate.\r
- \r
+\r
@return Allocated Address for output.\r
\r
**/\r
TotalPagesNum = NumberOfPml4EntriesNeeded + 1;\r
}\r
TotalPagesNum += ExtraPageTablePages;\r
- DEBUG ((EFI_D_ERROR, "CapsuleRuntimeDxe X64 TotalPagesNum - 0x%x pages\n", TotalPagesNum));\r
+ DEBUG ((DEBUG_INFO, "CapsuleRuntimeDxe X64 TotalPagesNum - 0x%x pages\n", TotalPagesNum));\r
\r
LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum));\r
ASSERT (LongModeBuffer.PageTableAddress != 0);\r
- \r
+\r
//\r
// Allocate stack\r
//\r
LongModeBuffer.StackSize = PcdGet32 (PcdCapsulePeiLongModeStackSize);\r
LongModeBuffer.StackBaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (PcdGet32 (PcdCapsulePeiLongModeStackSize));\r
- ASSERT (LongModeBuffer.StackBaseAddress != 0); \r
- \r
+ ASSERT (LongModeBuffer.StackBaseAddress != 0);\r
+\r
Status = gRT->SetVariable (\r
EFI_CAPSULE_LONG_MODE_BUFFER_NAME,\r
&gEfiCapsuleVendorGuid,\r
VariableLockCapsuleLongModeBufferVariable,\r
NULL,\r
&Registration\r
- ); \r
+ );\r
} else {\r
- DEBUG ((EFI_D_ERROR, "FATAL ERROR: CapsuleLongModeBuffer cannot be saved: %r. Capsule in PEI may fail!\n", Status));\r
+ DEBUG ((DEBUG_ERROR, "FATAL ERROR: CapsuleLongModeBuffer cannot be saved: %r. Capsule in PEI may fail!\n", Status));\r
gBS->FreePages (LongModeBuffer.StackBaseAddress, EFI_SIZE_TO_PAGES (LongModeBuffer.StackSize));\r
}\r
}\r