Enable TSS segment
This commit is contained in:
parent
deabd68158
commit
c6aa00eea7
6 changed files with 263 additions and 17 deletions
src
|
@ -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('.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue