27 |
#include "shutdown.h" |
#include "shutdown.h" |
28 |
|
|
29 |
|
|
|
void |
|
|
halt (void) |
|
|
{ |
|
|
while (1) |
|
|
asm volatile ("hlt"); |
|
|
} |
|
|
|
|
|
|
|
30 |
/* There are three ways to reset an ia32 machine. The first way is to |
/* There are three ways to reset an ia32 machine. The first way is to |
31 |
make the corresponding BIOS call in real mode. The second way is |
make the corresponding BIOS call in real mode. The second way is |
32 |
to program the keyboard controller to do it. The third way is to |
to program the keyboard controller to do it. The third way is to |
33 |
triple fault the CPU by using an empty IDT and then causing a |
triple fault the CPU by using an empty IDT and then causing a |
34 |
fault. Any of these can fail on odd hardware. */ |
fault. Any of these can fail on odd hardware. */ |
|
|
|
35 |
void |
void |
36 |
reset (void) |
reset (void) |
37 |
{ |
{ |