Add capsule > 4GB support. When capsule data is put above 4GB, IA32 PEI transfers to long mode to get capsule data.
Signed-off-by: li-elvin Reviewed-by: lgao4, mdkinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12264 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
It installs the Capsule Architectural Protocol defined in PI1.0a to signify
|
||||
the capsule runtime services are ready.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@ -40,6 +40,15 @@ EFI_HANDLE mNewHandle = NULL;
|
||||
//
|
||||
UINTN mTimes = 0;
|
||||
|
||||
/**
|
||||
Create the variable to save the base address of page table and stack
|
||||
for transferring into long mode in IA32 PEI.
|
||||
**/
|
||||
VOID
|
||||
SaveLongModeContext (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended
|
||||
consumption, the firmware may process the capsule immediately. If the payload should persist
|
||||
@ -333,6 +342,15 @@ CapsuleServiceInitialize (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// When PEI phase is IA32, DXE phase is X64, it is possible that capsule data are
|
||||
// put above 4GB, so capsule PEI will transfer to long mode to get capsule data.
|
||||
// The page table and stack is used to transfer processor mode from IA32 to long mode.
|
||||
// Create the base address of page table and stack, and save them into variable.
|
||||
// This is not needed when capsule with reset type is not supported.
|
||||
//
|
||||
SaveLongModeContext ();
|
||||
|
||||
//
|
||||
// Install capsule runtime services into UEFI runtime service tables.
|
||||
//
|
||||
|
Reference in New Issue
Block a user