Enable TSS segment

This commit is contained in:
Loic Guegan 2021-04-09 18:18:15 +02:00
parent deabd68158
commit c6aa00eea7
6 changed files with 263 additions and 17 deletions

View file

@ -1,15 +1,28 @@
#include "libc/stdio.h"
#include "utils/pic.h"
#include "boot/multiboot.h"
#include "utils/mem.h"
char show_tics=0;
void utask(){
while(1);
}
void bringelle(){
clear();
printc("Booting Bringelle...",GREEN);
printc("Booting Bringelle...\n",GREEN);
// Kernel boot sequence
pic_enable_interrupt();
print("Interrupts enabled!\n");
printc(" done!\n",GREEN);
// Utask
memcpy((void*)utask,(void*)0x300000, 100); // 100 bytes seems reasonable to load utask
print("Kernel started ");
show_tics=1;
while(1);
}
@ -20,5 +33,9 @@ void clock(){
if(tic>=20){
tic=0;
sec++;
if(show_tics)
putchar('.');
}
}