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