mirror of https://github.com/acidanthera/audk.git
Fix bug in DxeMain module and EdkMemoryStatusCodeLib library.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@581 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
687e98f726
commit
8aeaf59524
|
@ -1019,11 +1019,13 @@ Returns:
|
||||||
if (gDxeCoreLoadedImage->FilePath == NULL) {
|
if (gDxeCoreLoadedImage->FilePath == NULL) {
|
||||||
if (CompareGuid (&NameGuid, gDxeCoreFileName)) {
|
if (CompareGuid (&NameGuid, gDxeCoreFileName)) {
|
||||||
//
|
//
|
||||||
// Because mFvDevicePath has been initialized when discoveried
|
// Maybe One specail Fv cantains only one DXE_CORE module, so its device path must
|
||||||
// EFI_FV_FILETYPE_DRIVER file. So only need to update the name
|
// be initialized completely.
|
||||||
// guid of device path.
|
|
||||||
//
|
//
|
||||||
CopyGuid (&mFvDevicePath.File.NameGuid, &NameGuid);
|
EfiInitializeFwVolDevicepathNode (&mFvDevicePath.File, &NameGuid);
|
||||||
|
mFvDevicePath.End.Type = EFI_END_ENTIRE_DEVICE_PATH;
|
||||||
|
mFvDevicePath.End.SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE;
|
||||||
|
SetDevicePathNodeLength (&mFvDevicePath.End, sizeof (EFI_DEVICE_PATH_PROTOCOL));
|
||||||
|
|
||||||
gDxeCoreLoadedImage->FilePath = CoreDuplicateDevicePath (
|
gDxeCoreLoadedImage->FilePath = CoreDuplicateDevicePath (
|
||||||
(EFI_DEVICE_PATH_PROTOCOL *)&mFvDevicePath
|
(EFI_DEVICE_PATH_PROTOCOL *)&mFvDevicePath
|
||||||
|
|
|
@ -39,6 +39,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">PeiServicesLib</LibraryClass>
|
<LibraryClass Usage="ALWAYS_CONSUMED">PeiServicesLib</LibraryClass>
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">PeiServicesTablePointerLib</LibraryClass>
|
<LibraryClass Usage="ALWAYS_CONSUMED">PeiServicesTablePointerLib</LibraryClass>
|
||||||
<LibraryClass Usage="ALWAYS_CONSUMED">BaseMemoryLib</LibraryClass>
|
<LibraryClass Usage="ALWAYS_CONSUMED">BaseMemoryLib</LibraryClass>
|
||||||
|
<LibraryClass Usage="ALWAYS_CONSUMED">PeimEntryPoint</LibraryClass>
|
||||||
</LibraryClassDefinitions>
|
</LibraryClassDefinitions>
|
||||||
<SourceFiles>
|
<SourceFiles>
|
||||||
<Filename>MemoryStatusCode.c</Filename>
|
<Filename>MemoryStatusCode.c</Filename>
|
||||||
|
|
|
@ -486,7 +486,7 @@ Returns:
|
||||||
#ifdef EFI_NT_EMULATOR
|
#ifdef EFI_NT_EMULATOR
|
||||||
gRunningFromMemory = TRUE;
|
gRunningFromMemory = TRUE;
|
||||||
#else
|
#else
|
||||||
* (BOOLEAN *) ((UINTN) &gRunningFromMemory + (UINTN) EntryPoint - (UINTN) InstallMonoStatusCode) = TRUE;
|
* (BOOLEAN *) ((UINTN) &gRunningFromMemory + (UINTN) EntryPoint - (UINTN) _ModuleEntryPoint) = TRUE;
|
||||||
#endif
|
#endif
|
||||||
Status = ((EFI_PEIM_ENTRY_POINT )(UINTN) EntryPoint) (PrivateData->FfsHeader, PeiServices);
|
Status = ((EFI_PEIM_ENTRY_POINT )(UINTN) EntryPoint) (PrivateData->FfsHeader, PeiServices);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
|
Loading…
Reference in New Issue