EFI_SUCCESS, // Status\r
0, // ExitDataSize\r
NULL, // ExitData\r
+ NULL, // JumpBuffer\r
NULL, // JumpContext\r
0, // Machine\r
NULL, // Ebc\r
UINTN StartIndex;\r
CHAR8 EfiFileName[256];\r
\r
- DEBUG ((EFI_D_INFO | EFI_D_LOAD, "Loading driver at 0x%08x EntryPoint=0x%08x ", (UINTN)Image->ImageContext.ImageAddress, (UINTN)Image->ImageContext.EntryPoint));\r
+ DEBUG ((EFI_D_INFO | EFI_D_LOAD, "Loading driver at 0x%10p EntryPoint=0x%10p ", (VOID *)(UINTN)Image->ImageContext.ImageAddress, (VOID *)(UINTN)Image->ImageContext.EntryPoint));\r
if (Image->ImageContext.PdbPointer != NULL) {\r
StartIndex = 0;\r
for (Index = 0; Image->ImageContext.PdbPointer[Index] != 0; Index++) {\r
EFI_DEVICE_PATH_PROTOCOL *HandleFilePath;\r
UINTN FilePathSize;\r
\r
+ SecurityStatus = EFI_SUCCESS;\r
\r
ASSERT (gEfiCurrentTpl < EFI_TPL_NOTIFY);\r
ParentImage = NULL;\r
CoreUnloadAndCloseImage (Image, (BOOLEAN)(DstBuffer == 0));\r
*ImageHandle = NULL;\r
}\r
+ } else if (EFI_ERROR (SecurityStatus)) {\r
+ Status = SecurityStatus;\r
}\r
\r
return Status;\r
ExitData - Pointer to a pointer to a data buffer that includes a Null-terminated\r
Unicode string, optionally followed by additional binary data. The string\r
is a description that the caller may use to further indicate the reason for\r
- the image¡¯s exit.\r
+ the image's exit.\r
\r
Returns:\r
\r
\r
//\r
// Set long jump for Exit() support\r
+ // JumpContext must be aligned on a CPU specific boundary.\r
+ // Overallocate the buffer and force the required alignment\r
//\r
- Image->JumpContext = CoreAllocateBootServicesPool (sizeof (*Image->JumpContext));\r
- if (Image->JumpContext == NULL) {\r
+ Image->JumpBuffer = CoreAllocateBootServicesPool (sizeof (*Image->JumpContext) + BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);\r
+ if (Image->JumpBuffer == NULL) {\r
PERF_END (ImageHandle, START_IMAGE_TOK, NULL, 0);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
+ Image->JumpContext = (VOID *)((UINTN)(ALIGN_POINTER (Image->JumpBuffer, BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT)) + BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);\r
\r
SetJumpFlag = SetJump (Image->JumpContext);\r
//\r
//\r
DEBUG_CODE_BEGIN ();\r
if (EFI_ERROR (Image->Status)) {\r
- DEBUG ((EFI_D_ERROR, "Error: Image at %08X start failed: %x\n", Image->Info.ImageBase, Image->Status));\r
+ DEBUG ((EFI_D_ERROR, "Error: Image at %10p start failed: %r\n", Image->Info.ImageBase, Image->Status));\r
}\r
DEBUG_CODE_END ();\r
\r
ASSERT (Image->Tpl == gEfiCurrentTpl);\r
CoreRestoreTpl (Image->Tpl);\r
\r
- CoreFreePool (Image->JumpContext);\r
+ CoreFreePool (Image->JumpBuffer);\r
\r
//\r
// Pop the current start image context\r
\r
ImageHandle - Handle that identifies the image. This parameter is passed to the image\r
on entry.\r
- Status - The image¡¯s exit code.\r
+ Status - The image's exit code.\r
ExitDataSize - The size, in bytes, of ExitData. Ignored if ExitStatus is\r
EFI_SUCCESS.\r
ExitData - Pointer to a data buffer that includes a Null-terminated Unicode string,\r
optionally followed by additional binary data. The string is a\r
description that the caller may use to further indicate the reason for\r
- the image¡¯s exit.\r
+ the image's exit.\r
\r
Returns:\r
\r