diff options
author | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-10-16 18:51:21 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-10-16 18:51:21 +0000 |
commit | dcb428da9e2c7e566dbaa4ae2b1e171c1d05283b (patch) | |
tree | 45397a552af95029151f2c08e2a49b1211cb28c8 | |
parent | 6fc74eaa6393ef107619ee19e2939cde6a8ee205 (diff) | |
download | edk2-dcb428da9e2c7e566dbaa4ae2b1e171c1d05283b.zip edk2-dcb428da9e2c7e566dbaa4ae2b1e171c1d05283b.tar.gz edk2-dcb428da9e2c7e566dbaa4ae2b1e171c1d05283b.tar.bz2 |
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
-rw-r--r-- | DuetPkg/DxeIpl/DxeInit.c | 6 | ||||
-rw-r--r-- | DuetPkg/EfiLdr/EfiLoader.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/DuetPkg/DxeIpl/DxeInit.c b/DuetPkg/DxeIpl/DxeInit.c index df360cb..b10e273 100644 --- a/DuetPkg/DxeIpl/DxeInit.c +++ b/DuetPkg/DxeIpl/DxeInit.c @@ -138,7 +138,11 @@ Returns: VOID *MemoryDescriptor;
VOID *NvStorageBase;
CHAR8 PrintBuffer[256];
-
+ EFILDRHANDOFF HandoffCopy;
+
+ CopyMem ((VOID*) &HandoffCopy, (VOID*) Handoff, sizeof (EFILDRHANDOFF));
+ Handoff = &HandoffCopy;
+
ClearScreen();
PrintString("Enter DxeIpl ...\n");
diff --git a/DuetPkg/EfiLdr/EfiLoader.c b/DuetPkg/EfiLdr/EfiLoader.c index 609e547..f10db53 100644 --- a/DuetPkg/EfiLdr/EfiLoader.c +++ b/DuetPkg/EfiLdr/EfiLoader.c @@ -50,7 +50,7 @@ EfiLoader ( UINTN BfvBase;
EFI_MAIN_ENTRYPOINT EfiMainEntrypoint;
CHAR8 PrintBuffer[256];
- STATIC EFILDRHANDOFF Handoff;
+ EFILDRHANDOFF Handoff;
ClearScreen();
|