Now properly resets the system using the keyboard controller.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9750 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
74a5be2dbd
commit
d3b2cb65ad
@ -14,6 +14,7 @@
|
|||||||
#include <boot/platform.h>
|
#include <boot/platform.h>
|
||||||
#include <boot/heap.h>
|
#include <boot/heap.h>
|
||||||
#include <boot/stage2.h>
|
#include <boot/stage2.h>
|
||||||
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@ -74,7 +75,7 @@ platform_start_kernel(void)
|
|||||||
mmu_init_for_kernel();
|
mmu_init_for_kernel();
|
||||||
cpu_boot_other_cpus();
|
cpu_boot_other_cpus();
|
||||||
|
|
||||||
printf("kernel entry at %lx\n", gKernelArgs.kernel_image.elf_header.e_entry);
|
dprintf("kernel entry at %lx\n", gKernelArgs.kernel_image.elf_header.e_entry);
|
||||||
|
|
||||||
asm("movl %0, %%eax; " // move stack out of way
|
asm("movl %0, %%eax; " // move stack out of way
|
||||||
"movl %%eax, %%esp; "
|
"movl %%eax, %%esp; "
|
||||||
@ -93,10 +94,8 @@ platform_start_kernel(void)
|
|||||||
void
|
void
|
||||||
platform_exit(void)
|
platform_exit(void)
|
||||||
{
|
{
|
||||||
struct bios_regs regs;
|
// reset the system using the keyboard controller
|
||||||
regs.eax = 0x0;
|
out8(0xfe, 0x64);
|
||||||
call_bios(0x19, ®s);
|
|
||||||
// this should reboot the system (but doesn't seem to work...)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user