
GDT control is how I would like it to be but there are some issues, namely: 1. far jumping to flush the code segment crashes the whole os(not good) 2. Segment selectors seem fine apart from the code segment thing 3. some administrative issues regarding the structure of the project which is slowly making things painful
17 lines
283 B
C
17 lines
283 B
C
#include "kernel.h"
|
|
#include "types.h"
|
|
#include "gdt.h"
|
|
#include "idt.h"
|
|
|
|
GDT GDT_PTR;
|
|
GDT _GDT[6]; // because there are only 6 segments we care about
|
|
|
|
u32 kinit() {
|
|
init_segment_selectors(); // found in gdt.s
|
|
}
|
|
|
|
// called by the loader to do lots of fun things
|
|
void kmain() {
|
|
}
|
|
|