mirror of https://github.com/acidanthera/audk.git
Update DxeCore to set efi memory type for the different image to be loaded.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3977 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
c62a593c90
commit
a0ae8996bc
|
@ -39,7 +39,21 @@ EDK_0000: Compatible: owner
|
|||
##########################################################################################
|
||||
|
||||
==========================================================================================
|
||||
EDK_39331: Non-Compatible: klu2
|
||||
EDK_3967: Non-Compatible: lgao4
|
||||
|
||||
Class_Library: Remove PeCoffLoader library class and its instances.
|
||||
|
||||
Code Change :
|
||||
1) Remove MdeModulePkg/Include/Library/PeCoffLoaderLib.h
|
||||
2) Remove MdeModulePkg/Library/DxePeCoffLoaderFromHobLib and PeiDxePeCoffLoaderLib instance
|
||||
3) Modify PeiCore, DxeIpl and DxeCore to use PeCoffLib in place of PeCoffLoaderLib.
|
||||
|
||||
Possible Impacts:
|
||||
1) All modules don't use PeCoffloader library class any longer to load PeImage.
|
||||
If necessary, they should use PeCoffLib of MdePkg to load PeImage.
|
||||
|
||||
==========================================================================================
|
||||
EDK_3931: Non-Compatible: klu2
|
||||
|
||||
Class_PIEnable[5]: New library class for S3Resume and Recovery for DxeIpl PEIM.
|
||||
|
||||
|
@ -147,17 +161,3 @@ EDK_3773: Non-Compatible: qwang12
|
|||
3) The gEfiFirmwareVolumeProtocolGuid in [Depex] section of INF file should updated.
|
||||
And the package dependency should also be changed if needed due to this protocol
|
||||
GUID change.
|
||||
|
||||
==========================================================================================
|
||||
EDK_3967: Non-Compatible: lgao4
|
||||
|
||||
Class_Library: Remove PeCoffLoader library class and its instances.
|
||||
|
||||
Code Change :
|
||||
1) Remove MdeModulePkg/Include/Library/PeCoffLoaderLib.h
|
||||
2) Remove MdeModulePkg/Library/DxePeCoffLoaderFromHobLib and PeiDxePeCoffLoaderLib instance
|
||||
3) Modify PeiCore, DxeIpl and DxeCore to use PeCoffLib in place of PeCoffLoaderLib.
|
||||
|
||||
Possible Impacts:
|
||||
1) All modules don't use PeCoffloader library class any longer to load PeImage.
|
||||
If necessary, they should use PeCoffLib of MdePkg to load PeImage.
|
||||
|
|
|
@ -226,6 +226,27 @@ Returns:
|
|||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Set EFI memory type based on ImageType
|
||||
//
|
||||
switch (Image->ImageContext.ImageType) {
|
||||
case EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION:
|
||||
Image->ImageContext.ImageCodeMemoryType = EfiLoaderCode;
|
||||
Image->ImageContext.ImageDataMemoryType = EfiLoaderData;
|
||||
break;
|
||||
case EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER:
|
||||
Image->ImageContext.ImageCodeMemoryType = EfiBootServicesCode;
|
||||
Image->ImageContext.ImageDataMemoryType = EfiBootServicesData;
|
||||
break;
|
||||
case EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER:
|
||||
case EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER:
|
||||
Image->ImageContext.ImageCodeMemoryType = EfiRuntimeServicesCode;
|
||||
Image->ImageContext.ImageDataMemoryType = EfiRuntimeServicesData;
|
||||
break;
|
||||
default:
|
||||
Image->ImageContext.ImageError = IMAGE_ERROR_INVALID_SUBSYSTEM;
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Allocate memory of the correct memory type aligned on the required image boundry
|
||||
|
|
Loading…
Reference in New Issue