]> git.sur5r.net Git - u-boot/commitdiff
x86: Add a dummy setjmp implementation for x86_64
authorSimon Glass <sjg@chromium.org>
Mon, 16 Jan 2017 14:04:21 +0000 (07:04 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 7 Feb 2017 05:10:50 +0000 (13:10 +0800)
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>
arch/x86/cpu/x86_64/Makefile
arch/x86/cpu/x86_64/setjmp.c [new file with mode: 0644]

index 4b063862e17c7cc10ff10e958436ad01a423d4c8..400f0ffe397d11c43b9b6a469e2b3f7d565c8518 100644 (file)
@@ -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 (file)
index 0000000..25f8d28
--- /dev/null
@@ -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");
+}