Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Services — Boot Services
Version 1.10 12/01/02 5-85
ExitBootServices()
Summary
Terminates all boot services.
Prototype
EFI_STATUS
ExitBootServices (
IN EFI_HANDLE ImageHandle,
IN UINTN MapKey
);
Parameters
ImageHandle Handle that identifies the exiting image. Type EFI_HANDLE is defined
in the InstallProtocolInterface()
function description.
MapKey Key to the latest memory map.
Description
The ExitBootServices() function is called by the currently executing EFI OS loader image
to terminate all boot services. On success, the loader becomes responsible for the continued
operation of the system.
An EFI OS loader must ensure that it has the system’s current memory map at the time it calls
ExitBootServices(). This is done by passing in the current memory map’s MapKey value
as returned by GetMemoryMap()
. Care must be taken to ensure that the memory map does not
change between these two calls. It is suggested that GetMemoryMap()be called immediately
before calling ExitBootServices().
On success, the EFI OS loader owns all available memory in the system. In addition, the loader can
treat all memory in the map marked as EfiBootServicesCode and
EfiBootServicesData as available free memory. No further calls to boot service functions or
EFI device-handle-based protocols may be used, and the boot services watchdog timer is disabled.
On success, several fields of the EFI System Table should be set to NULL. These include
ConsoleInHandle, ConIn, ConsoleOutHandle, ConOut, StandardErrorHandle,
StdErr,andBootServicesTable. In addition, since fields of the EFI System Table are
being modified, the 32-bit CRC for the EFI System Table must be recomputed.
Status Codes Returned
EFI_SUCCESS Boot services have been terminated.
EFI_INVALID_PARAMETER
MapKey is incorrect.