rename kernel_main() to hos_main()
This commit is contained in:
parent
bb495eceec
commit
8ae84716d6
14
src/boot.S
14
src/boot.S
@ -68,20 +68,8 @@ _start:
|
|||||||
push $0
|
push $0
|
||||||
push $0
|
push $0
|
||||||
push %ebx
|
push %ebx
|
||||||
call kernel_main
|
call hos_main
|
||||||
|
|
||||||
/*
|
|
||||||
If the system has nothing more to do, put the computer into an
|
|
||||||
infinite loop. To do that:
|
|
||||||
1) Disable interrupts with cli (clear interrupt enable in eflags).
|
|
||||||
They are already disabled by the bootloader, so this is not needed.
|
|
||||||
Mind that you might later enable interrupts and return from
|
|
||||||
kernel_main (which is sort of nonsensical to do).
|
|
||||||
2) Wait for the next interrupt to arrive with hlt (halt instruction).
|
|
||||||
Since they are disabled, this will lock up the computer.
|
|
||||||
3) Jump to the hlt instruction if it ever wakes up due to a
|
|
||||||
non-maskable interrupt occurring or due to system management mode.
|
|
||||||
*/
|
|
||||||
cli
|
cli
|
||||||
1: hlt
|
1: hlt
|
||||||
jmp 1b
|
jmp 1b
|
||||||
|
@ -27,7 +27,7 @@ static void process_mbinfo(uint32_t * mbinfo)
|
|||||||
} while (mbinfo != (uint32_t *)0u);
|
} while (mbinfo != (uint32_t *)0u);
|
||||||
}
|
}
|
||||||
|
|
||||||
void kernel_main(uint32_t * mbinfo)
|
void hos_main(uint32_t * mbinfo)
|
||||||
{
|
{
|
||||||
process_mbinfo(mbinfo);
|
process_mbinfo(mbinfo);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user