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:
Axel Dörfler 2004-05-06 00:39:01 +00:00
parent 85898f2b1a
commit dc8585a402
1 changed files with 9 additions and 1 deletions

View File

@ -55,7 +55,14 @@ platform_user_menu_requested(void)
void void
platform_start_kernel(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(); mmu_init_for_kernel();
//cpu_boot_other_cpus();
printf("kernel entry at %lx\n", gKernelEntry); printf("kernel entry at %lx\n", gKernelEntry);
asm("movl %0, %%eax; " // move stack out of way 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 $0x0;" // dummy retval for call to main
"pushl %1; " // this is the start address "pushl %1; " // this is the start address
"ret; " // jump. "ret; " // jump.
: : "g" (&gKernelArgs), "g" (gKernelEntry)); : : "g" (args), "g" (gKernelEntry));
} }
@ -86,6 +93,7 @@ _start(void)
args.heap_size = HEAP_SIZE; args.heap_size = HEAP_SIZE;
console_init(); console_init();
//cpu_init();
mmu_init(); mmu_init();
main(&args); main(&args);