diff options
Diffstat (limited to 'kernel/kernel.c')
| -rw-r--r-- | kernel/kernel.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c index e85b298..b2af08d 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -47,7 +47,20 @@ void kernel_main(uint32_t initial_stack, int mp) proc=0; + // move the foolfont and aps code before it gets overwritten! + uint8_t *source=0x16600; + uint8_t *dest=0x80000; + for(int i=0;i<2*512;i++) + { + dest[i]=source[i]; + } + source=0x16400; + dest=0x9000; + for(int i=0;i<1*512;i++) + { + dest[i]=source[i]; + } // // We want to get output to the screen as fast as possible! @@ -69,7 +82,8 @@ void kernel_main(uint32_t initial_stack, int mp) // our video memory // - uint32_t vesa_physbase=vesa_init(0x8300,0x8400,0x7600); + //uint32_t vesa_physbase=vesa_init(0x8300,0x8400,0x7600); + uint32_t vesa_physbase=vesa_init(0x8300,0x8400,0x80000); // @@ -103,8 +117,6 @@ void kernel_main(uint32_t initial_stack, int mp) // we know that here, the bootloader placed the mamory map! mem_init(0x7c00+0x400,*((uint16_t *)(0x7c00+0x600))); - - // // Initialize other processors (run this before entering paged mode) // @@ -165,8 +177,9 @@ void kernel_main(uint32_t initial_stack, int mp) //int_install_ir(38, 0b10001110, 0x08,&int_floppy_handler); // now we can enable interrupts back again - int_enable(); + x86_int_enable(); + ////////////////////// // // Scan the PCI Bus @@ -200,14 +213,13 @@ void kernel_main(uint32_t initial_stack, int mp) // round robin style. // -// smp_log_procdata(&procdata1); - task_init(); + task_init(); - while(1) asm("hlt"); // // Just hang here. // + while(1)asm("hlt"); |
