#include <Protocol/LoadPe32Image.h>\r
#include <Protocol/Security.h>\r
#include <Protocol/Security2.h>\r
-#include <Protocol/Ebc.h>\r
#include <Protocol/Reset.h>\r
#include <Protocol/Cpu.h>\r
#include <Protocol/Metronome.h>\r
BASE_LIBRARY_JUMP_BUFFER *JumpContext;\r
/// Machine type from PE image\r
UINT16 Machine;\r
- /// EBC Protocol pointer\r
- EFI_EBC_PROTOCOL *Ebc;\r
/// PE/COFF Image Emulator Protocol pointer\r
EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL *PeCoffEmu;\r
/// Runtime image list\r
NULL, // JumpBuffer\r
NULL, // JumpContext\r
0, // Machine\r
- NULL, // Ebc\r
NULL, // PeCoffEmu\r
NULL, // RuntimeData\r
NULL // LoadedImageDevicePath\r
CHAR16 *MachineTypeName;\r
} MACHINE_TYPE_INFO;\r
\r
-//\r
-// EBC machine is not listed in this table, because EBC is in the default supported scopes of other machine type.\r
-//\r
GLOBAL_REMOVE_IF_UNREFERENCED MACHINE_TYPE_INFO mMachineTypeInfo[] = {\r
{EFI_IMAGE_MACHINE_IA32, L"IA32"},\r
{EFI_IMAGE_MACHINE_IA64, L"IA64"},\r
InvalidateInstructionCacheRange ((VOID *)(UINTN)Image->ImageContext.ImageAddress, (UINTN)Image->ImageContext.ImageSize);\r
\r
//\r
- // Copy the machine type from the context to the image private data. This\r
- // is needed during image unload to know if we should call an EBC protocol\r
- // to unload the image.\r
+ // Copy the machine type from the context to the image private data.\r
//\r
Image->Machine = Image->ImageContext.Machine;\r
\r
//\r
- // Get the image entry point. If it's an EBC image, then call into the\r
- // interpreter to create a thunk for the entry point and use the returned\r
- // value for the entry point.\r
+ // Get the image entry point.\r
//\r
Image->EntryPoint = (EFI_IMAGE_ENTRY_POINT)(UINTN)Image->ImageContext.EntryPoint;\r
- if (Image->ImageContext.Machine == EFI_IMAGE_MACHINE_EBC) {\r
- //\r
- // Locate the EBC interpreter protocol\r
- //\r
- Status = CoreLocateProtocol (&gEfiEbcProtocolGuid, NULL, (VOID **)&Image->Ebc);\r
- if (EFI_ERROR(Status) || Image->Ebc == NULL) {\r
- DEBUG ((DEBUG_LOAD | DEBUG_ERROR, "CoreLoadPeImage: There is no EBC interpreter for an EBC image.\n"));\r
- goto Done;\r
- }\r
-\r
- //\r
- // Register a callback for flushing the instruction cache so that created\r
- // thunks can be flushed.\r
- //\r
- Status = Image->Ebc->RegisterICacheFlush (Image->Ebc, (EBC_ICACHE_FLUSH)InvalidateInstructionCacheRange);\r
- if (EFI_ERROR(Status)) {\r
- goto Done;\r
- }\r
-\r
- //\r
- // Create a thunk for the image's entry point. This will be the new\r
- // entry point for the image.\r
- //\r
- Status = Image->Ebc->CreateThunk (\r
- Image->Ebc,\r
- Image->Handle,\r
- (VOID *)(UINTN) Image->ImageContext.EntryPoint,\r
- (VOID **) &Image->EntryPoint\r
- );\r
- if (EFI_ERROR(Status)) {\r
- goto Done;\r
- }\r
- } else if (Image->PeCoffEmu != NULL) {\r
+ if (Image->PeCoffEmu != NULL) {\r
Status = Image->PeCoffEmu->RegisterImage (Image->PeCoffEmu,\r
Image->ImageBasePage,\r
EFI_PAGES_TO_SIZE (Image->NumberOfPages),\r
\r
UnprotectUefiImage (&Image->Info, Image->LoadedImageDevicePath);\r
\r
- if (Image->Ebc != NULL) {\r
- //\r
- // If EBC protocol exists we must perform cleanups for this image.\r
- //\r
- Image->Ebc->UnloadImage (Image->Ebc, Image->Handle);\r
- }\r
-\r
if (Image->PeCoffEmu != NULL) {\r
//\r
// If the PE/COFF Emulator protocol exists we must unregister the image.\r