summaryrefslogtreecommitdiff
path: root/cpu/i386/cpu.c
diff options
context:
space:
mode:
authorBen Warren <biggerbadderben@gmail.com>2009-01-24 20:44:56 -0800
committerBen Warren <biggerbadderben@gmail.com>2009-01-24 20:44:56 -0800
commitef29884b2708a6cce3b77f4ccaeea193d4e02c22 (patch)
tree2f6a28872ab9f5de9fec7ac878b8801f5f536eec /cpu/i386/cpu.c
parent4cd8ed40615a7d741ef2f09ee53779ec6907b8a6 (diff)
parent8f86a3636ef88427f880610638e80991adc41896 (diff)
downloadu-boot-imx-ef29884b2708a6cce3b77f4ccaeea193d4e02c22.zip
u-boot-imx-ef29884b2708a6cce3b77f4ccaeea193d4e02c22.tar.gz
u-boot-imx-ef29884b2708a6cce3b77f4ccaeea193d4e02c22.tar.bz2
Merge git://git.denx.de/u-boot into u-boot
Diffstat (limited to 'cpu/i386/cpu.c')
-rw-r--r--cpu/i386/cpu.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/cpu/i386/cpu.c b/cpu/i386/cpu.c
index 5fd37c7..b9af5f8 100644
--- a/cpu/i386/cpu.c
+++ b/cpu/i386/cpu.c
@@ -35,6 +35,7 @@
#include <common.h>
#include <command.h>
+#include <asm/interrupt.h>
int cpu_init(void)
{
@@ -64,3 +65,19 @@ void flush_cache (unsigned long dummy1, unsigned long dummy2)
asm("wbinvd\n");
return;
}
+
+void __attribute__ ((regparm(0))) generate_gpf(void);
+
+/* segment 0x70 is an arbitrary segment which does not exist */
+asm(".globl generate_gpf\n"
+ "generate_gpf:\n"
+ "ljmp $0x70, $0x47114711\n");
+
+void __reset_cpu(ulong addr)
+{
+ printf("Resetting using i386 Triple Fault\n");
+ set_vector(13, generate_gpf); /* general protection fault handler */
+ set_vector(8, generate_gpf); /* double fault handler */
+ generate_gpf(); /* start the show */
+}
+void reset_cpu(ulong addr) __attribute__((weak, alias("__reset_cpu")));