summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/interrupts.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-08-04 18:34:00 (GMT)
committerSimon Glass <sjg@chromium.org>2015-08-05 14:44:08 (GMT)
commite49cceac61a0f56beff466f844fb9b3451d564eb (patch)
treef82a912a899cf687bf46215daa20fabc96acc1ca /arch/x86/cpu/interrupts.c
parentf1a0bafb5802416d42d685b343110c1557da1739 (diff)
downloadu-boot-e49cceac61a0f56beff466f844fb9b3451d564eb.tar.xz
x86: Handle running as EFI payload
When U-Boot runs as an EFI payload it needs to avoid setting up the CPU again. Also U-Boot currently does not handle interrupts for many devices, so run with interrupts disabled. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/interrupts.c')
-rw-r--r--arch/x86/cpu/interrupts.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/cpu/interrupts.c b/arch/x86/cpu/interrupts.c
index a112938..9217307 100644
--- a/arch/x86/cpu/interrupts.c
+++ b/arch/x86/cpu/interrupts.c
@@ -258,8 +258,14 @@ int interrupt_init(void)
/* Initialize core interrupt and exception functionality of CPU */
cpu_init_interrupts();
- /* It is now safe to enable interrupts */
- enable_interrupts();
+ /*
+ * It is now safe to enable interrupts.
+ *
+ * TODO(sjg@chromium.org): But we don't handle these correctly when
+ * booted from EFI.
+ */
+ if (ll_boot_init())
+ enable_interrupts();
#endif
return 0;