efi: Allow excluding efi_main()
In some cases this function may be provided outside the library, e.g. by a Rust main program. Add a Kconfig to control this and refactor the code so that it is optional. Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
@@ -945,4 +945,22 @@ int efi_decode_key(struct efi_input_key *key);
|
||||
*/
|
||||
int efi_decode_key_ex(struct efi_key_data *key_data);
|
||||
|
||||
/**
|
||||
* efi_startup() - Start up the app
|
||||
*
|
||||
* This is called from efi_main() to start up an image
|
||||
*
|
||||
* @image: Image handle for the app
|
||||
* @systab: EFI system table to use with the app
|
||||
* Return: Error code
|
||||
*/
|
||||
efi_status_t efi_startup(efi_handle_t image, struct efi_system_table *systab);
|
||||
|
||||
/**
|
||||
* efi_shutdown() - Shut down the app
|
||||
*
|
||||
* Call this to shut down the app - freeing memory and exiting back to EFI
|
||||
*/
|
||||
void efi_shutdown(void);
|
||||
|
||||
#endif /* _LINUX_EFI_H */
|
||||
|
||||
Reference in New Issue
Block a user