aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass2017-01-16 07:04:21 -0700
committerBin Meng2017-02-07 13:10:50 +0800
commitc780069f1e3ff6a6613a1aaae5668a35164532c7 (patch)
tree8e5cdca3dec04eaada2290274e0362d6aa8a71ed /arch
parent4d3ac6c3268d39929488c14d913af30f8de0368b (diff)
x86: Add a dummy setjmp implementation for x86_64
We don't have the code for this yet. Add a dummy version for now, so that EFI builds correctly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/cpu/x86_64/Makefile2
-rw-r--r--arch/x86/cpu/x86_64/setjmp.c20
2 files changed, 21 insertions, 1 deletions
diff --git a/arch/x86/cpu/x86_64/Makefile b/arch/x86/cpu/x86_64/Makefile
index 4b063862e17..400f0ffe397 100644
--- a/arch/x86/cpu/x86_64/Makefile
+++ b/arch/x86/cpu/x86_64/Makefile
@@ -3,4 +3,4 @@
# Written by Simon Glass <sjg@chromium.org>
#
-obj-y += cpu.o interrupts.o
+obj-y += cpu.o interrupts.o setjmp.o
diff --git a/arch/x86/cpu/x86_64/setjmp.c b/arch/x86/cpu/x86_64/setjmp.c
new file mode 100644
index 00000000000..25f8d2804be
--- /dev/null
+++ b/arch/x86/cpu/x86_64/setjmp.c
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2016 Google, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/setjmp.h>
+
+int setjmp(struct jmp_buf_data *jmp_buf)
+{
+ printf("WARNING: setjmp() is not supported\n");
+
+ return 0;
+}
+
+void longjmp(struct jmp_buf_data *jmp_buf, int val)
+{
+ printf("WARNING: longjmp() is not supported\n");
+}