]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/bootstrap_custom/server/src/ARCH-x86/reboot.cc
l4: bootstrap_custom: Fix unsupported paging mode error, which was caused by the...
[l4.git] / l4 / pkg / bootstrap_custom / server / src / ARCH-x86 / reboot.cc
1 /*
2  * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
3  *     economic rights: Technische Universität Dresden (Germany)
4  * This file is part of TUD:OS and distributed under the terms of the
5  * GNU Lesser General Public License 2.1.
6  * Please see the COPYING-LGPL-2.1 file for details.
7  */
8 #include <l4/util/port_io.h>
9 #include <l4/util/cpu.h>
10
11 void
12 reboot_arch(void) __attribute__((noreturn));
13
14 void
15 reboot_arch(void)
16 {
17   while (l4util_in8(0x64) & 0x02)
18     l4util_iodelay();
19   l4util_out8(0x60, 0x64);
20   l4util_iodelay();
21
22   while (l4util_in8(0x64) & 0x02)
23     l4util_iodelay();
24   l4util_out8(0x04, 0x60);
25   l4util_iodelay();
26
27   while (l4util_in8(0x64) & 0x02)
28     l4util_iodelay();
29   l4util_out8(0xFE, 0x64);
30   l4util_iodelay();
31
32   for (;;)
33     l4util_cpu_pause();
34 }