mirror of
https://github.com/ipxe/ipxe
synced 2026-01-28 11:44:14 +03:00
[efi] Add support for executing images via a shim
Add support for using a shim as a helper to execute an EFI image. When a shim has been specified via shim(), the shim image will be passed to LoadImage() instead of the selected EFI image and the command line will be prepended with the name of the selected EFI image. The selected EFI image will be accessible to the shim via the virtual filesystem as a hidden file. Reduce the Secure Boot attack surface by removing, where possible, the spurious requirement for a third party second stage loader binary such as GRUB to be used solely in order to call the "shim lock protocol" entry point. Do not install the EFI PXE APIs when using a shim, since if shim finds EFI_PXE_BASE_CODE_PROTOCOL on the loaded image's device handle then it will attempt to download files afresh instead of using the files already downloaded by iPXE and exposed via the EFI_SIMPLE_FILE_SYSTEM protocol. (Experience shows that there is no point in trying to get a fix for this upstreamed into shim.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
16
src/include/usr/shimmgmt.h
Normal file
16
src/include/usr/shimmgmt.h
Normal file
@@ -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 */
|
||||
Reference in New Issue
Block a user