Worked around a strange bug that happened without an additional printf in between...
Somehow that reminds of BASIC. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7420 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
85898f2b1a
commit
dc8585a402
@ -55,7 +55,14 @@ platform_user_menu_requested(void)
|
||||
void
|
||||
platform_start_kernel(void)
|
||||
{
|
||||
struct kernel_args *args = &gKernelArgs;
|
||||
// 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...
|
||||
|
||||
mmu_init_for_kernel();
|
||||
//cpu_boot_other_cpus();
|
||||
|
||||
printf("kernel entry at %lx\n", gKernelEntry);
|
||||
|
||||
asm("movl %0, %%eax; " // move stack out of way
|
||||
@ -66,7 +73,7 @@ platform_start_kernel(void)
|
||||
"pushl $0x0;" // dummy retval for call to main
|
||||
"pushl %1; " // this is the start address
|
||||
"ret; " // jump.
|
||||
: : "g" (&gKernelArgs), "g" (gKernelEntry));
|
||||
: : "g" (args), "g" (gKernelEntry));
|
||||
}
|
||||
|
||||
|
||||
@ -86,6 +93,7 @@ _start(void)
|
||||
args.heap_size = HEAP_SIZE;
|
||||
|
||||
console_init();
|
||||
//cpu_init();
|
||||
mmu_init();
|
||||
|
||||
main(&args);
|
||||
|
Loading…
Reference in New Issue
Block a user