void tty_init (void) { tty_row = 0; tty_column = 0; tty_color = vga_make_color(LIGHT_GREY, BLACK); tty_buffer = (uint16_t *) VGA_MEMORY; tty_cls(); }
int main() { /* const extern u32 _KERNEL_START[],_KERNEL_END[]; const extern u32 K_CODE_SEL[], K_DATA_SEL[]; const extern u32 _KERNEL_TEXT_START[],_KERNEL_TEXT_END[]; const extern u32 _KERNEL_DATA_START[],_KERNEL_DATA_END[]; const extern u32 _KERNEL_BSS_START[],_KERNEL_BSS_END[]; */ tty_cls(); banner(); /*if(TEST_BIT(K_MULTIBOOT_INFO->flags,MBI_FLAGS_MMAP)){ kprintf("MMAP Present: 0x%x\n",K_MULTIBOOT_INFO->mmap_addr); memory_map_t *mmap; for(mmap=(memory_map_t *)K_MULTIBOOT_INFO->mmap_addr; (u32)mmap<K_MULTIBOOT_INFO->mmap_addr + K_MULTIBOOT_INFO->mmap_length; mmap=(memory_map_t *)((u32)mmap+mmap->size+sizeof(mmap->size))){ kprintf("[%d] addr=0x%x-0x%x\n",mmap->type,mmap->base_addr_low,(mmap->base_addr_low+mmap->length_low)); } }*/ kprintf(" > Initialising system services...\n"); init_interrupts(); init_paging(); init_heap(); set_cpu_caps(); init_pic(); init_timer(); init_process(); kprintf(" > Enabling kernel preemption...\n"); enable_kernel_preempt(); enable_ints(); kprintf(" > Spawning core process...\n"); create_process("core",NULL,&core); /* We may get to here for a very short amount of time while we enable preemption */ while(1); }