OvmfPkg: Switched SEC to UE format.

This commit is contained in:
Mikhail Krichanov 2023-10-03 20:02:22 +03:00 committed by MikhailKrichanov
parent f60c587094
commit 24a208db03
5 changed files with 22 additions and 5 deletions

View File

@ -89,6 +89,14 @@ UefiImageLoadImageInplaceUe (
IN OUT UEFI_IMAGE_LOADER_IMAGE_CONTEXT *Context
)
{
ASSERT (Context != NULL);
if (Context->Ctx.Ue.XIP) {
Context->Ctx.Ue.ImageBuffer = (UINT8 *) Context->Ctx.Ue.FileBuffer;
return RETURN_SUCCESS;
}
return RETURN_UNSUPPORTED;
}

View File

@ -416,7 +416,7 @@ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
[Rule.Common.SEC]
FILE SEC = $(NAMED_GUID) {
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
UE UE $(INF_OUTPUT)/$(MODULE_NAME).efi
UI STRING ="$(MODULE_NAME)" Optional
VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
}

View File

@ -419,7 +419,7 @@ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
[Rule.Common.SEC]
FILE SEC = $(NAMED_GUID) {
PE32 PE32 Align=Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
UE UE $(INF_OUTPUT)/$(MODULE_NAME).efi
UI STRING ="$(MODULE_NAME)" Optional
VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
}

View File

@ -451,7 +451,7 @@ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
[Rule.Common.SEC]
FILE SEC = $(NAMED_GUID) {
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
UE UE $(INF_OUTPUT)/$(MODULE_NAME).efi
UI STRING ="$(MODULE_NAME)" Optional
VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
}

View File

@ -150,10 +150,20 @@ getEntryPointOfFfsFileLoopForSections:
jmp getEntryPointOfFfsFileLoopForSections
getEntryPointOfFfsFileFoundPe32Section:
add eax, 4 ; EAX = Start of PE32 image
add eax, 4 ; EAX = Start of PE or UE image
cmp word [eax], 'MZ'
je getEntryPointOfFfsFileFoundPeFile
cmp word [eax], 'UE'
jne getEntryPointOfFfsFileErrorReturn
; *EntryPoint = (VOID *)((UINTN)UeData + UeHdr.EntryPointAddress)
mov ebx, dword [eax + 0x4]
add eax, ebx
jmp getEntryPointOfFfsFileReturn
getEntryPointOfFfsFileFoundPeFile:
movzx ebx, word [eax + 0x3c]
add ebx, eax
@ -171,4 +181,3 @@ getEntryPointOfFfsFileErrorReturn:
getEntryPointOfFfsFileReturn:
OneTimeCallRet GetEntryPointOfFfsFile