Extensible Firmware Interface Specification
76 12/12/00 Version 1.02
3.4.6 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 Section 3.3.1.
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 systems current memory map at the time it calls
ExitBootServices(). This is done by passing in the current memory maps 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 serviceswatchdog timer is disabled.
Status Codes Returned
EFI_SUCCESS Boot services have been terminated.
EFI_INVALID_PARAMETER MapKey is incorrect.