diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ipxe/efi/efi_image.h | 27 | ||||
-rw-r--r-- | src/include/ipxe/efi/efi_shim.h | 23 | ||||
-rw-r--r-- | src/include/ipxe/errfile.h | 1 | ||||
-rw-r--r-- | src/include/ipxe/image.h | 9 | ||||
-rw-r--r-- | src/include/usr/shimmgmt.h | 16 |
5 files changed, 76 insertions, 0 deletions
diff --git a/src/include/ipxe/efi/efi_image.h b/src/include/ipxe/efi/efi_image.h new file mode 100644 index 000000000..0fc0402b1 --- /dev/null +++ b/src/include/ipxe/efi/efi_image.h @@ -0,0 +1,27 @@ +#ifndef _IPXE_EFI_IMAGE_H +#define _IPXE_EFI_IMAGE_H + +/** @file + * + * EFI images + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#include <ipxe/image.h> + +extern struct image_type efi_image_type[] __image_type ( PROBE_NORMAL ); + +/** + * Check if EFI image can be loaded directly + * + * @v image EFI image + * @ret can_load EFI image can be loaded directly + */ +static inline int efi_can_load ( struct image *image ) { + + return ( image->type == efi_image_type ); +} + +#endif /* _IPXE_EFI_IMAGE_H */ diff --git a/src/include/ipxe/efi/efi_shim.h b/src/include/ipxe/efi/efi_shim.h new file mode 100644 index 000000000..ad8d24dce --- /dev/null +++ b/src/include/ipxe/efi/efi_shim.h @@ -0,0 +1,23 @@ +#ifndef _IPXE_EFI_SHIM_H +#define _IPXE_EFI_SHIM_H + +/** @file + * + * UEFI shim special handling + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#include <ipxe/image.h> +#include <ipxe/efi/efi.h> + +extern int efi_shim_require_loader; +extern int efi_shim_allow_pxe; +extern struct image_tag efi_shim __image_tag; + +extern int efi_shim_install ( struct image *shim, EFI_HANDLE handle, + wchar_t **cmdline ); +extern void efi_shim_uninstall ( void ); + +#endif /* _IPXE_EFI_SHIM_H */ diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h index 235611a51..daa038c52 100644 --- a/src/include/ipxe/errfile.h +++ b/src/include/ipxe/errfile.h @@ -405,6 +405,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #define ERRFILE_dhe ( ERRFILE_OTHER | 0x005a0000 ) #define ERRFILE_efi_cmdline ( ERRFILE_OTHER | 0x005b0000 ) #define ERRFILE_efi_rng ( ERRFILE_OTHER | 0x005c0000 ) +#define ERRFILE_efi_shim ( ERRFILE_OTHER | 0x005d0000 ) /** @} */ diff --git a/src/include/ipxe/image.h b/src/include/ipxe/image.h index cd51188d3..bfbf23687 100644 --- a/src/include/ipxe/image.h +++ b/src/include/ipxe/image.h @@ -257,6 +257,15 @@ static inline void image_untrust ( struct image *image ) { } /** + * Mark image as hidden + * + * @v image Image + */ +static inline void image_hide ( struct image *image ) { + image->flags |= IMAGE_HIDDEN; +} + +/** * Tag image * * @v image Image diff --git a/src/include/usr/shimmgmt.h b/src/include/usr/shimmgmt.h new file mode 100644 index 000000000..5030607ae --- /dev/null +++ b/src/include/usr/shimmgmt.h @@ -0,0 +1,16 @@ +#ifndef _USR_SHIMMGMT_H +#define _USR_SHIMMGMT_H + +/** @file + * + * EFI shim management + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#include <ipxe/image.h> + +extern int shim ( struct image *image, int require_loader, int allow_pxe ); + +#endif /* _USR_SHIMMGMT_H */ |