hos/kernel/boot/k_bootstrap.c
josh 6ea8fe1a27 Added k_bootstrap.c, k_early_panic.[ch]
Calling k_bootstrap() from boot.asm in segmented mode

git-svn-id: svn://anubis/hos/trunk@25 5b3e749e-e535-0410-8002-a9bb6afbdfca
2009-06-30 20:12:39 +00:00

27 lines
802 B
C

#include "hos_types.h"
#include "hos_defines.h"
#include "multiboot.h"
#include "k_early_panic.h"
#define DEBUG_LETTER(col,chr) *(u16_t *)(CONSOLE_MEMORY + 160 * 8 + (col) * 2) \
= 0x0700 | (chr)
/**************************************************************************
* This function is invoked before paging is enabled. Segmentation is *
* utilized to map virtual address 0xE000_0000 to physical address 0x0. *
*************************************************************************/
u32_t k_bootstrap(mb_info_t * mb_info, u32_t mb_magic)
{
DEBUG_LETTER(2, 'c');
if (mb_magic != MB_BOOTLOADER_MAGIC)
{
k_early_panic("Bad multiboot magic identifier!");
}
DEBUG_LETTER(3, 'd');
return 0;
}