Fixed a warning when compiled with GCC 3.

Added currently non-working version of platform_exit().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8652 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-08-25 15:27:40 +00:00
parent 31f29a6f7e
commit 90b9284ea3
1 changed files with 13 additions and 1 deletions

View File

@ -8,6 +8,7 @@
#include "cpu.h"
#include "mmu.h"
#include "keyboard.h"
#include "bios.h"
#include <KernelExport.h>
#include <boot/platform.h>
@ -68,6 +69,7 @@ platform_start_kernel(void)
// something goes wrong when we pass &gKernelArgs directly
// to the assembler inline below - might be a bug in GCC
// or I don't see something important...
addr_t stackTop = gKernelArgs.cpu_kstack[0].start + gKernelArgs.cpu_kstack[0].size;
mmu_init_for_kernel();
cpu_boot_other_cpus();
@ -76,7 +78,7 @@ platform_start_kernel(void)
asm("movl %0, %%eax; " // move stack out of way
"movl %%eax, %%esp; "
: : "m" (gKernelArgs.cpu_kstack[0].start + gKernelArgs.cpu_kstack[0].size));
: : "m" (stackTop));
asm("pushl $0x0; " // we're the BSP cpu (0)
"pushl %0; " // kernel args
"pushl $0x0;" // dummy retval for call to main
@ -88,6 +90,16 @@ platform_start_kernel(void)
}
void
platform_exit(void)
{
struct bios_regs regs;
regs.eax = 0x0;
call_bios(0x19, &regs);
// this should reboot the system (but doesn't seem to work...)
}
void
_start(void)
{