feat: gdt, attributes move, reorder

Added late gdt setup with initial tss
Moved attributes to include root
Reordered some imports
This commit is contained in:
2021-03-21 17:34:38 +01:00
parent 513693189e
commit 20ab9e1d6e
28 changed files with 351 additions and 121 deletions

10
include/myke/cpu/gdt.h Normal file
View File

@@ -0,0 +1,10 @@
//
// Created by rick on 19-03-21.
//
#ifndef NEW_KERNEL_GDT_H
#define NEW_KERNEL_GDT_H
void gdt_init();
#endif //NEW_KERNEL_GDT_H

View File

@@ -6,7 +6,7 @@
#ifndef MY_KERNEL_IDT_H
#define MY_KERNEL_IDT_H
#include <myke/attributes.h>
#include <attributes.h>
#define KERNEL_CS 0x08
@@ -22,12 +22,12 @@ typedef struct {
* Bits 3-0: bits 1110 = decimal 14 = "32 bit interrupt gate" */
uint8_t flags;
uint16_t high_offset; /* Higher 16 bits of handler function address */
} packed idt_gate_t;
} att_packed idt_gate_t;
typedef struct {
uint16_t limit;
uint32_t base;
} packed idt_register_t;
} att_packed idt_register_t;
#define IDT_REGISTERS 256