DuetPkg: Move EfiLdr Handoff data to stack

The EfiLdr image may be overwritten later in the boot process.
This can lead to the Handoff structure being corrupted before
DxeIpl is finished with it.

To help prevent this, we move the Handoff structure to the
stack, and in DxeIpl make a copy of it.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10950 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jljusten 2010-10-16 18:51:21 +00:00
parent 6fc74eaa63
commit dcb428da9e
2 changed files with 6 additions and 2 deletions

View File

@ -138,6 +138,10 @@ Returns:
VOID *MemoryDescriptor;
VOID *NvStorageBase;
CHAR8 PrintBuffer[256];
EFILDRHANDOFF HandoffCopy;
CopyMem ((VOID*) &HandoffCopy, (VOID*) Handoff, sizeof (EFILDRHANDOFF));
Handoff = &HandoffCopy;
ClearScreen();
PrintString("Enter DxeIpl ...\n");

View File

@ -50,7 +50,7 @@ EfiLoader (
UINTN BfvBase;
EFI_MAIN_ENTRYPOINT EfiMainEntrypoint;
CHAR8 PrintBuffer[256];
STATIC EFILDRHANDOFF Handoff;
EFILDRHANDOFF Handoff;
ClearScreen();