got interrupts working, added sys/{pic,timer,cpu} modules, ready to work on multitasking
git-svn-id: svn://anubis/hos/trunk@69 5b3e749e-e535-0410-8002-a9bb6afbdfca
This commit is contained in:
1 parent
2c5a5d7093
commit
bc7064e92a
21 files changed
+322
-14
No files matched your search
@@ -6,6 +6,7 @@
|
||||
#include "mm/mm.h"
|
||||
#include "mm/stack.h"
|
||||
#include "lang/kio.h"
|
||||
#include "isr/interrupts.h"
|
||||
|
||||
#define DEBUG_LETTER(col,chr) *(u16_t *)(KERNEL_OFFSET + CONSOLE_MEMORY \
|
||||
+ 160 * 8 + (col) * 2) \
|
||||
@@ -48,6 +49,7 @@ u32_t k_bootstrap(mb_info_t * mb_info, u32_t mb_magic)
|
||||
*/
|
||||
mm_bootstrap();
|
||||
stack_bootstrap();
|
||||
interrupts_bootstrap();
|
||||
kio_bootstrap();
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1,12 +1,27 @@
|
||||
|
||||
#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" */
|
||||
Reference in new issue
Block a user