diff mbox series

[06/16] x86: zimage: Disable interrupts just before booting

Message ID 20200801160824.17486-7-sjg@chromium.org
State Superseded
Delegated to: Bin Meng
Headers show
Series x86: zboot: Enhance the 'zboot' command | expand

Commit Message

Simon Glass Aug. 1, 2020, 4:08 p.m. UTC
At present if an error occurs while setting up the boot, interrupts are
left disabled. Move this call later in the sequence to avoid this problem.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/x86/lib/zimage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Wolfgang Wallner Aug. 13, 2020, 11:22 a.m. UTC | #1
Hi Simon,

-----"Simon Glass" <sjg@chromium.org> schrieb: -----
> Betreff: [PATCH 06/16] x86: zimage: Disable interrupts just before booting
> 
> At present if an error occurs while setting up the boot, interrupts are
> left disabled. Move this call later in the sequence to avoid this problem.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  arch/x86/lib/zimage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
diff mbox series

Patch

diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index ba9eb50b0ba..8651dea93b3 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -333,7 +333,6 @@  int do_zboot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 	struct boot_params *base_ptr;
 	char *s;
 
-	disable_interrupts();
 	memset(&state, '\0', sizeof(state));
 	if (argc >= 2) {
 		/* argv[1] holds the address of the bzImage */
@@ -369,6 +368,7 @@  int do_zboot(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 		return -1;
 	}
 
+	disable_interrupts();
 	/* we assume that the kernel is in place */
 	return boot_linux_kernel((ulong)base_ptr, state.load_address, false);
 }