28 lines
755 B
C++
28 lines
755 B
C++
|
|
#include "lang/kio.h"
|
|
#include "mm/mm.h"
|
|
#include "sys/timer.h"
|
|
#include "sys/pic.h"
|
|
#include "isr/interrupts.h"
|
|
|
|
extern "C" {
|
|
|
|
void k_main()
|
|
{
|
|
kprintf("Kernel load address: 0x%08x\n", KERNEL_CODE);
|
|
kprintf("Kernel code size: %d KB (%d bytes)\n",
|
|
(KERNEL_DATA - KERNEL_CODE) >> 10, KERNEL_DATA - KERNEL_CODE);
|
|
kprintf("Kernel data size: %d KB (%d bytes)\n",
|
|
(KERNEL_BSS - KERNEL_DATA) >> 10, KERNEL_BSS - KERNEL_DATA);
|
|
kprintf("Kernel bss size: %d KB (%d bytes)\n",
|
|
(KERNEL_END - KERNEL_BSS) >> 10, KERNEL_END - KERNEL_BSS);
|
|
mm_print_memory_map();
|
|
timer_init(KERNEL_TIMER_FREQ);
|
|
pic_remap(0x20, 0x28);
|
|
pic_mask1(0x0);
|
|
pic_mask2(0x0);
|
|
interrupts_enable();
|
|
}
|
|
|
|
} /* extern "C" */
|