@@ -615,6 +615,9 @@ efi_status_t efi_load_initrd(efi_loaded_image_t *image,
efi_status_t status = EFI_SUCCESS;
struct linux_efi_initrd initrd, *tbl;
+ efi_info("cheat in efi_load_initrd()\n");
+ return EFI_SUCCESS;
+
if (!IS_ENABLED(CONFIG_BLK_DEV_INITRD) || efi_noinitrd)
return EFI_SUCCESS;
@@ -59,6 +59,8 @@ static struct screen_info *setup_graphics(void)
void **gop_handle = NULL;
struct screen_info *si = NULL;
+ efi_info("cheat in setup_graphics\n");
+ return NULL;
size = 0;
status = efi_bs_call(locate_handle, EFI_LOCATE_BY_PROTOCOL,
&gop_proto, NULL, &size, gop_handle);
@@ -73,6 +73,8 @@ efi_status_t efi_random_get_seed(void)
efi_rng_protocol_t *rng = NULL;
efi_status_t status;
+ efi_info("cheat in efi_random_get_seed\n");
+ return EFI_UNSUPPORTED;
status = efi_bs_call(locate_protocol, &rng_proto, NULL, (void **)&rng);
if (status != EFI_SUCCESS)
seed_size = 0;
@@ -33,6 +33,8 @@ void efi_enable_reset_attack_mitigation(void)
efi_status_t status;
unsigned long datasize = 0;
+ efi_info("cheat in efi_enable_reset_attack_mitigation\n");
+ return;
status = get_efi_var(efi_MemoryOverWriteRequest_name, &var_guid,
NULL, &datasize, NULL);
@@ -155,6 +157,8 @@ void efi_retrieve_eventlog(void)
efi_bool_t truncated;
efi_status_t status;
+ efi_info("cheat in efi_retrieve_eventlog\n");
+ return;
status = efi_bs_call(locate_protocol, &tpm2_guid, NULL, (void **)&tpm2);
if (status == EFI_SUCCESS) {
status = efi_call_proto(tpm2, get_event_log, version, &log_location,
For POC, step around these four function, hence the corresponding boot services. Later those services should be implemented and this patch should be drop. Signed-off-by: Pingfan Liu <piliu@redhat.com> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Jan Hendrik Farr <kernel@jfarr.cc> Cc: Philipp Rudo <prudo@redhat.com> Cc: Lennart Poettering <mzxreary@0pointer.de> Cc: Jarkko Sakkinen <jarkko@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com> To: linux-arm-kernel@lists.infradead.org To: kexec@lists.infradead.org To: linux-efi@vger.kernel.org --- drivers/firmware/efi/libstub/efi-stub-helper.c | 3 +++ drivers/firmware/efi/libstub/efi-stub.c | 2 ++ drivers/firmware/efi/libstub/random.c | 2 ++ drivers/firmware/efi/libstub/tpm.c | 4 ++++ 4 files changed, 11 insertions(+)