[PATCH 2/6] efi: efi-image: don't mask x86 interrupts on boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



55da0cf1 ("efi: add support for initrd loading") introduced support for
the Linux v3.6+ handover protocol[1]. As part of this change a x86 cli
(Clear Interrupt Flag) instruction was introduced just prior to the jump
into the kernel's EFI handover protocol entry point.

While the normal Linux x86 boot protocols require that interrupts are
masked on entry, this doesn't apply to the EFI stub, because the EFI
stub itself is the one implementing the boot protocol and as such
masks the interrupts itself[2].

EFI watchdogs may, and often are, implemented using a timer interrupt.
Dropping the cli will allow monitoring the boot of the kernel up to it
calling ExitBootServices.

In absence of a hardware watchdog, this is the only watchdog available
to users with EFI 1.0+, so it seems prudent to not make it even more
useless.

[1]: https://www.kernel.org/doc/Documentation/x86/boot.txt
[2]: Linux v5.4-rc4, arch/x86/boot/compressed/eboot.c

Cc: Michael Olbrich <mol@xxxxxxxxxxxxxx>
Fixes: 55da0cf1 ("efi: add support for initrd loading")
Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 common/efi/efi-image.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/efi/efi-image.c b/common/efi/efi-image.c
index 939663a6e250..9c66c9f882c5 100644
--- a/common/efi/efi-image.c
+++ b/common/efi/efi-image.c
@@ -174,7 +174,6 @@ static inline void linux_efi_handover(efi_handle_t handle,
 {
 	handover_fn handover;
 
-	asm volatile ("cli");
 	handover = (handover_fn)((long)header->code32_start + 512 +
 				 header->handover_offset);
 	handover(handle, efi_sys_table, header);
-- 
2.23.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux