]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix bug in DxeMain module and EdkMemoryStatusCodeLib library.
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 21 Jun 2006 02:59:51 +0000 (02:59 +0000)
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 21 Jun 2006 02:59:51 +0000 (02:59 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@581 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
EdkModulePkg/Library/EdkMemoryStatusCodeLib/EdkMemoryStatusCodeLib.msa
EdkModulePkg/Library/EdkMemoryStatusCodeLib/MemoryStatusCode.c

index fec794821b4dd2474dc53b5c782ff5beff798d68..82b776f901d98d5a7bc93290b5409855a1ce8801 100644 (file)
@@ -1019,11 +1019,13 @@ Returns:
             if (gDxeCoreLoadedImage->FilePath == NULL) {\r
               if (CompareGuid (&NameGuid, gDxeCoreFileName)) {\r
                 //\r
-                // Because mFvDevicePath has been initialized when discoveried \r
-                // EFI_FV_FILETYPE_DRIVER file. So only need to update the name \r
-                // guid of device path.\r
+                // Maybe One specail Fv cantains only one DXE_CORE module, so its device path must\r
+                // be initialized completely.\r
                 //\r
-                CopyGuid (&mFvDevicePath.File.NameGuid, &NameGuid);\r
+                EfiInitializeFwVolDevicepathNode (&mFvDevicePath.File, &NameGuid);\r
+                mFvDevicePath.End.Type = EFI_END_ENTIRE_DEVICE_PATH;\r
+                mFvDevicePath.End.SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE;\r
+                SetDevicePathNodeLength (&mFvDevicePath.End, sizeof (EFI_DEVICE_PATH_PROTOCOL));\r
 \r
                 gDxeCoreLoadedImage->FilePath = CoreDuplicateDevicePath (\r
                                                   (EFI_DEVICE_PATH_PROTOCOL *)&mFvDevicePath\r
index 7d60671c908c1b4fef311007a30d6f1f88b3d0c5..ac6a6dd49e1eb69401d859fcb017e335533b2ce6 100644 (file)
@@ -39,6 +39,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     <LibraryClass Usage="ALWAYS_CONSUMED">PeiServicesLib</LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">PeiServicesTablePointerLib</LibraryClass>\r
     <LibraryClass Usage="ALWAYS_CONSUMED">BaseMemoryLib</LibraryClass>\r
+    <LibraryClass Usage="ALWAYS_CONSUMED">PeimEntryPoint</LibraryClass>\r
   </LibraryClassDefinitions>\r
   <SourceFiles>\r
     <Filename>MemoryStatusCode.c</Filename>\r
index 087ef53aeaa45e8797f359bec01f27801780dcf8..45a322b89dd170f3ea697dd33986d85e600edcf0 100644 (file)
@@ -486,7 +486,7 @@ Returns:
 #ifdef EFI_NT_EMULATOR\r
     gRunningFromMemory = TRUE;\r
 #else\r
-    * (BOOLEAN *) ((UINTN) &gRunningFromMemory + (UINTN) EntryPoint - (UINTN) InstallMonoStatusCode) = TRUE;\r
+    * (BOOLEAN *) ((UINTN) &gRunningFromMemory + (UINTN) EntryPoint - (UINTN) _ModuleEntryPoint) = TRUE;\r
 #endif\r
     Status = ((EFI_PEIM_ENTRY_POINT )(UINTN) EntryPoint) (PrivateData->FfsHeader, PeiServices);\r
     if (EFI_ERROR (Status)) {\r