Ronak Kanabar | 1ae366f | 2023-06-07 01:21:56 +0530 | [diff] [blame^] | 1 | /** @file |
| 2 | UEFI 2.2 Deferred Image Load Protocol definition. |
| 3 | |
| 4 | This protocol returns information about images whose load was denied because of security |
| 5 | considerations. This information can be used by the Boot Manager or another agent to reevaluate the |
| 6 | images when the current security profile has been changed, such as when the current user profile |
| 7 | changes. There can be more than one instance of this protocol installed. |
| 8 | |
| 9 | Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR> |
| 10 | SPDX-License-Identifier: BSD-2-Clause-Patent |
| 11 | |
| 12 | **/ |
| 13 | |
| 14 | #ifndef __DEFERRED_IMAGE_LOAD_H__ |
| 15 | #define __DEFERRED_IMAGE_LOAD_H__ |
| 16 | |
| 17 | /// |
| 18 | /// Global ID for the Deferred Image Load Protocol |
| 19 | /// |
| 20 | #define EFI_DEFERRED_IMAGE_LOAD_PROTOCOL_GUID \ |
| 21 | { \ |
| 22 | 0x15853d7c, 0x3ddf, 0x43e0, { 0xa1, 0xcb, 0xeb, 0xf8, 0x5b, 0x8f, 0x87, 0x2c } \ |
| 23 | }; |
| 24 | |
| 25 | typedef struct _EFI_DEFERRED_IMAGE_LOAD_PROTOCOL EFI_DEFERRED_IMAGE_LOAD_PROTOCOL; |
| 26 | |
| 27 | /** |
| 28 | Returns information about a deferred image. |
| 29 | |
| 30 | This function returns information about a single deferred image. The deferred images are numbered |
| 31 | consecutively, starting with 0. If there is no image which corresponds to ImageIndex, then |
| 32 | EFI_NOT_FOUND is returned. All deferred images may be returned by iteratively calling this |
| 33 | function until EFI_NOT_FOUND is returned. |
| 34 | Image may be NULL and ImageSize set to 0 if the decision to defer execution was made because |
| 35 | of the location of the executable image rather than its actual contents. record handle until |
| 36 | there are no more, at which point UserInfo will point to NULL. |
| 37 | |
| 38 | @param[in] This Points to this instance of the EFI_DEFERRED_IMAGE_LOAD_PROTOCOL. |
| 39 | @param[in] ImageIndex Zero-based index of the deferred index. |
| 40 | @param[out] ImageDevicePath On return, points to a pointer to the device path of the image. |
| 41 | The device path should not be freed by the caller. |
| 42 | @param[out] Image On return, points to the first byte of the image or NULL if the |
| 43 | image is not available. The image should not be freed by the caller |
| 44 | unless LoadImage() has been called successfully. |
| 45 | @param[out] ImageSize On return, the size of the image, or 0 if the image is not available. |
| 46 | @param[out] BootOption On return, points to TRUE if the image was intended as a boot option |
| 47 | or FALSE if it was not intended as a boot option. |
| 48 | |
| 49 | @retval EFI_SUCCESS Image information returned successfully. |
| 50 | @retval EFI_NOT_FOUND ImageIndex does not refer to a valid image. |
| 51 | @retval EFI_INVALID_PARAMETER ImageDevicePath is NULL or Image is NULL or ImageSize is NULL or |
| 52 | BootOption is NULL. |
| 53 | **/ |
| 54 | typedef |
| 55 | EFI_STATUS |
| 56 | (EFIAPI *EFI_DEFERRED_IMAGE_INFO)( |
| 57 | IN EFI_DEFERRED_IMAGE_LOAD_PROTOCOL *This, |
| 58 | IN UINTN ImageIndex, |
| 59 | OUT EFI_DEVICE_PATH_PROTOCOL **ImageDevicePath, |
| 60 | OUT VOID **Image, |
| 61 | OUT UINTN *ImageSize, |
| 62 | OUT BOOLEAN *BootOption |
| 63 | ); |
| 64 | |
| 65 | /// |
| 66 | /// This protocol returns information about a deferred image. |
| 67 | /// |
| 68 | struct _EFI_DEFERRED_IMAGE_LOAD_PROTOCOL { |
| 69 | EFI_DEFERRED_IMAGE_INFO GetImageInfo; |
| 70 | }; |
| 71 | |
| 72 | extern EFI_GUID gEfiDeferredImageLoadProtocolGuid; |
| 73 | |
| 74 | #endif |