Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Extensible Firmware Interface Specification
5-80 12/01/02 Version 1.10
StartImage()
Summary
Transfers control to a loaded image’s entry point.
Prototype
EFI_STATUS
StartImage (
IN EFI_HANDLE ImageHandle,
OUT UINTN *ExitDataSize,
OUT CHAR16 **ExitData OPTIONAL
);
Parameters
ImageHandle Handle of image to be started. Type EFI_HANDLE is defined in the
InstallProtocolInterface()
function description.
ExitDataSize Pointer to the size, in bytes, of ExitData.IfExitData is NULL,
then this parameter is ignored and the contents of ExitDataSize are
not modified.
ExitData Pointer to a pointer to a data buffer that includes a Null-terminated
Unicode string, optionally followed by additional binary data. The string
is a description that the caller may use to further indicate the reason for
the image’s exit.
Description
The StartImage() function transfers control to the entry point of an image that was loaded by
LoadImage()
. The image may only be started one time.
Control returns from StartImage() when the loaded image calls Exit()
. When that call is
made, the ExitData buffer and ExitDataSize from Exit() are passed back through the
ExitData buffer and ExitDataSize in this function. The caller of this function is responsible
for returning the ExitData buffer to the pool by calling FreePool()
when the buffer is no
longer needed.
EFI 1.10 Extension
To maintain compatibility with EFI drivers that are written to the EFI 1.02 Specification,
StartImage() must monitor the handle database before and after each image is started. If any
handles are created or modified when an image is started, then ConnectController()
must be
called for each of the newly created or modified handles before StartImage() returns.
Status Codes Returned
EFI_INVALID_PARAMETER
ImageHandle is not a handle to an unstarted image.
Exit code from image Exit code from image.