diff options
| author | Peter Jones <pjones@redhat.com> | 2023-06-30 13:24:57 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2025-02-11 10:43:37 -0500 |
| commit | e7b3598311c4b002417ac6364093cfab218ced88 (patch) | |
| tree | 370ff1063bc624626a439303c6a2e27efd5a0e78 /include/loader-proto.h | |
| parent | bb114a3b92a96875dc71e5e4925bedba5c02f958 (diff) | |
| download | efi-boot-shim-e7b3598311c4b002417ac6364093cfab218ced88.tar.gz efi-boot-shim-e7b3598311c4b002417ac6364093cfab218ced88.zip | |
Move some stuff around
This moves some things around to help with loader protocol changes:
- Move replacements.c to loader-proto.c
- likewise with replacements.h
- move the SHIM_IMAGE_LOADER decl to loader-proto.h
- move the LoadImage / StartImage interface setup to an init function
- move shim_load_image() / shim_start_image() to loader-proto.c
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'include/loader-proto.h')
| -rw-r--r-- | include/loader-proto.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/loader-proto.h b/include/loader-proto.h new file mode 100644 index 00000000..d3afa2f5 --- /dev/null +++ b/include/loader-proto.h @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: BSD-2-Clause-Patent + +/* + * Copyright Red Hat, Inc + * Copyright Peter Jones <pjones@redhat.com> + */ +#ifndef SHIM_REPLACEMENTS_H +#define SHIM_REPLACEMENTS_H + +extern EFI_SYSTEM_TABLE *get_active_systab(void); + +typedef enum { + VERIFIED_BY_NOTHING, + VERIFIED_BY_CERT, + VERIFIED_BY_HASH +} verification_method_t; + +extern verification_method_t verification_method; +extern int loader_is_participating; + +extern void hook_system_services(EFI_SYSTEM_TABLE *local_systab); +extern void unhook_system_services(void); + +extern void hook_exit(EFI_SYSTEM_TABLE *local_systab); +extern void unhook_exit(void); + +typedef struct _SHIM_IMAGE_LOADER { + EFI_IMAGE_LOAD LoadImage; + EFI_IMAGE_START StartImage; +} SHIM_IMAGE_LOADER; + +extern SHIM_IMAGE_LOADER shim_image_loader_interface; +extern void init_image_loader(void); + +#endif /* SHIM_REPLACEMENTS_H */ |
