3 * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
6 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
7 * Marius Groeger <mgroeger@sysgo.de>
10 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
11 * Alex Zuepke <azu@sysgo.de>
13 * See file CREDITS for list of people who contributed to this
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License as
18 * published by the Free Software Foundation; either version 2 of
19 * the License, or (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
38 #include <asm/interrupt.h>
42 /* initialize FPU, reset EM, set MP and NE */
45 "andl $~0x4, %eax\n" \
47 "movl %eax, %cr0\n" );
54 /* Initialize core interrupt and exception functionality of CPU */
55 cpu_init_interrupts ();
59 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
61 printf ("resetting ...\n");
62 udelay(50000); /* wait 50 ms */
70 void flush_cache (unsigned long dummy1, unsigned long dummy2)
76 void __attribute__ ((regparm(0))) generate_gpf(void);
78 /* segment 0x70 is an arbitrary segment which does not exist */
79 asm(".globl generate_gpf\n"
80 ".hidden generate_gpf\n"
81 ".type generate_gpf, @function\n"
83 "ljmp $0x70, $0x47114711\n");
85 void __reset_cpu(ulong addr)
87 printf("Resetting using i386 Triple Fault\n");
88 set_vector(13, generate_gpf); /* general protection fault handler */
89 set_vector(8, generate_gpf); /* double fault handler */
90 generate_gpf(); /* start the show */
92 void reset_cpu(ulong addr) __attribute__((weak, alias("__reset_cpu")));