* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26734 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2003-2006, Axel Dörfler, [email protected]. All rights reserved.
|
* Copyright 2003-2008, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -47,10 +47,10 @@ clear_bss(void)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
call_ctors(void)
|
call_ctors(void)
|
||||||
{
|
{
|
||||||
void (**f)(void);
|
void (**f)(void);
|
||||||
|
|
||||||
for (f = &__ctor_list; f < &__ctor_end; f++) {
|
for (f = &__ctor_list; f < &__ctor_end; f++) {
|
||||||
(**f)();
|
(**f)();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,14 +74,16 @@ 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;
|
addr_t stackTop
|
||||||
|
= gKernelArgs.cpu_kstack[0].start + gKernelArgs.cpu_kstack[0].size;
|
||||||
|
|
||||||
smp_init_other_cpus();
|
smp_init_other_cpus();
|
||||||
serial_cleanup();
|
serial_cleanup();
|
||||||
mmu_init_for_kernel();
|
mmu_init_for_kernel();
|
||||||
smp_boot_other_cpus();
|
smp_boot_other_cpus();
|
||||||
|
|
||||||
dprintf("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; "
|
||||||
@@ -127,7 +129,8 @@ _start(void)
|
|||||||
// wait a bit to give the user the opportunity to press a key
|
// wait a bit to give the user the opportunity to press a key
|
||||||
spin(750000);
|
spin(750000);
|
||||||
|
|
||||||
// reading the keyboard doesn't seem to work in graphics mode (maybe a bochs problem)
|
// reading the keyboard doesn't seem to work in graphics mode
|
||||||
|
// (maybe a bochs problem)
|
||||||
sBootOptions = check_for_boot_keys();
|
sBootOptions = check_for_boot_keys();
|
||||||
//if (sBootOptions & BOOT_OPTION_DEBUG_OUTPUT)
|
//if (sBootOptions & BOOT_OPTION_DEBUG_OUTPUT)
|
||||||
serial_enable();
|
serial_enable();
|
||||||
|
|||||||
Reference in New Issue
Block a user