Add: Starting kernel repos

This commit is contained in:
brice.boisson
2023-09-04 23:14:06 +09:00
commit c0c4dbc665
31 changed files with 1232 additions and 0 deletions

35
src/kernel.c Normal file
View File

@@ -0,0 +1,35 @@
#include <types.h>
#include "gdt.h"
#include "idt.h"
#include "pic_controler.h"
#include "serial.h"
#include "debug.h"
#include "tss.h"
#include "launch_process.h"
void main(void)
{
DEBUG_INFO("Entering Main Function");
launch_process(0x28, 0x30000, 0x20, 0x18, 0x20);
for (;;)
{
DEBUG_INFO("Waiting for an interrupt");
asm volatile ("hlt");
}
}
void kernel_main(void)
{
init_serial();
DEBUG_INFO("Starting kernel");
init_gdt();
init_idt();
pic_init();
main();
}