Implemented GDT & IDT

This commit is contained in:
Alex
2022-10-10 09:00:32 +03:00
parent 1446cc4682
commit f746110fbe
10 changed files with 1190 additions and 153 deletions

View File

@ -0,0 +1,25 @@
#include <interrupts.hpp>
#if defined(__amd64__)
#include "../arch/amd64/cpu/gdt.hpp"
#include "../arch/amd64/cpu/idt.hpp"
#elif defined(__i386__)
#include "../arch/i686/cpu/gdt.hpp"
#include "../arch/i686/cpu/idt.hpp"
#elif defined(__aarch64__)
#include "../arch/aarch64/cpu/gdt.hpp"
#include "../arch/aarch64/cpu/idt.hpp"
#endif
namespace Interrupts
{
void Initialize()
{
#if defined(__amd64__)
GlobalDescriptorTable::Init(0);
InterruptDescriptorTable::Init(0);
#elif defined(__i386__)
#elif defined(__aarch64__)
#endif
}
}

View File

@ -9,3 +9,14 @@ This directory contains the core components of the project. These components are
Contains the memory management code.
It is responsible for allocating and freeing memory.
It also provides the `kmalloc`, `kcalloc`, `krealloc` and `kfree` functions that are used by the rest of the kernel.
## 📺 Video
Contains the video management code.
It is responsible for printing text to the screen.
## 🖥 CPU
Contains the CPU management code.
It is responsible for initializing the GDT and IDT.
More code related is in the `arch` directory.