Skip to content

Commit ff07186

Browse files
Nikolay Borisovardbiesheuvel
authored andcommitted
x86/efistub: Don't try to print after ExitBootService()
setup_e820() is executed after UEFI's ExitBootService has been called. This causes the firmware to throw an exception because the Console IO protocol is supposed to work only during boot service environment. As per UEFI 2.9, section 12.1: "This protocol is used to handle input and output of text-based information intended for the system user during the operation of code in the boot services environment." So drop the diagnostic warning from this function. We might add back a warning that is issued later when initializing the kernel itself. Signed-off-by: Nikolay Borisov <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 0bb80ec commit ff07186

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/firmware/efi/libstub/x86-stub.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,11 +605,8 @@ setup_e820(struct boot_params *params, struct setup_data *e820ext, u32 e820ext_s
605605
break;
606606

607607
case EFI_UNACCEPTED_MEMORY:
608-
if (!IS_ENABLED(CONFIG_UNACCEPTED_MEMORY)) {
609-
efi_warn_once(
610-
"The system has unaccepted memory, but kernel does not support it\nConsider enabling CONFIG_UNACCEPTED_MEMORY\n");
608+
if (!IS_ENABLED(CONFIG_UNACCEPTED_MEMORY))
611609
continue;
612-
}
613610
e820_type = E820_TYPE_RAM;
614611
process_unaccepted_memory(d->phys_addr,
615612
d->phys_addr + PAGE_SIZE * d->num_pages);

0 commit comments

Comments
 (0)