aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile4
-rw-r--r--src/bringelle.c1
-rw-r--r--src/core/gdt.h3
-rw-r--r--src/core/idt.c (renamed from src/int/idt.c)4
-rw-r--r--src/core/idt.h (renamed from src/int/idt.h)0
-rw-r--r--src/core/int.S (renamed from src/int/int.S)0
-rw-r--r--src/drivers/8042.c (renamed from src/int/8042.c)2
-rw-r--r--src/drivers/8042.h (renamed from src/int/8042.h)0
-rw-r--r--src/drivers/framebuffer.c (renamed from src/core/framebuffer.c)0
-rw-r--r--src/drivers/framebuffer.h (renamed from src/core/framebuffer.h)2
-rw-r--r--src/drivers/pic.c (renamed from src/int/pic.c)0
-rw-r--r--src/drivers/pic.h (renamed from src/int/pic.h)0
-rw-r--r--src/libc/stdio.h2
13 files changed, 10 insertions, 8 deletions
diff --git a/src/Makefile b/src/Makefile
index 3643f77..85cae29 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -8,12 +8,12 @@ LD_SCRIPT := linker.ld
BOOT_OBJ := $(addsuffix .o,$(basename $(shell find ./boot -name "*.[c|S]" ! -name "boot.S")))
CORE_OBJ := $(addsuffix .o,$(basename $(shell find ./core -name "*.[c|S]")))
LIBC_OBJ := $(addsuffix .o,$(basename $(shell find ./libc -name "*.[c|S]")))
-INT_OBJ := $(addsuffix .o,$(basename $(shell find ./int -name "*.[c|S]")))
+DRIVERS_OBJ := $(addsuffix .o,$(basename $(shell find ./drivers -name "*.[c|S]")))
all: $(EXEC)
-$(EXEC): boot/boot.o $(BOOT_OBJ) $(CORE_OBJ) $(LIBC_OBJ) $(INT_OBJ) bringelle.o
+$(EXEC): boot/boot.o $(BOOT_OBJ) $(CORE_OBJ) $(LIBC_OBJ) $(DRIVERS_OBJ) bringelle.o
ld -n -T $(LD_SCRIPT) -nostdlib -o bringelle $^
%.o: %.S
diff --git a/src/bringelle.c b/src/bringelle.c
index 49670e8..b0ddec6 100644
--- a/src/bringelle.c
+++ b/src/bringelle.c
@@ -1,5 +1,4 @@
#include "libc/stdio.h"
-#include "int/pic.h"
#include "boot/multiboot.h"
#include "core/mem.h"
#include "core/gdt.h"
diff --git a/src/core/gdt.h b/src/core/gdt.h
index f010891..246ddbe 100644
--- a/src/core/gdt.h
+++ b/src/core/gdt.h
@@ -72,6 +72,9 @@ void gdt_memcpy();
*/
void gdt_write_entry(GDT_ENTRY entry, u32 id);
+/**
+ * Extract the base from the user data segment
+ */
int gdt_user_ds_base();
#endif
diff --git a/src/int/idt.c b/src/core/idt.c
index e3e71e8..4e08d62 100644
--- a/src/int/idt.c
+++ b/src/core/idt.c
@@ -15,7 +15,7 @@ INT_SYSCALL;
void idt_init(){
- // Map first default 32 entries
+ // Map first default 32 entries
for(int i=0;i<IDT_MAX_ENTRY;i++){
idt_write_entry((IDT_ENTRY){0x08,(u32)&INT_DEFAULT,IDT_INT_GATE},i);
if(i==14)
@@ -27,7 +27,7 @@ void idt_init(){
if(i==48)
idt_write_entry((IDT_ENTRY){0x08,(u32)&INT_SYSCALL,IDT_TRAP_GATE},i);
}
-
+ // Load IDT
asm("lidtl (IDTR)");
}
diff --git a/src/int/idt.h b/src/core/idt.h
index 17c5cfa..17c5cfa 100644
--- a/src/int/idt.h
+++ b/src/core/idt.h
diff --git a/src/int/int.S b/src/core/int.S
index 8ca8b7a..8ca8b7a 100644
--- a/src/int/int.S
+++ b/src/core/int.S
diff --git a/src/int/8042.c b/src/drivers/8042.c
index 5446f11..c6d3f22 100644
--- a/src/int/8042.c
+++ b/src/drivers/8042.c
@@ -1,5 +1,5 @@
#include "8042.h"
-#include "core/framebuffer.h"
+#include "drivers/framebuffer.h"
#include "core/asm.h"
DEFINE_AZERTY;
diff --git a/src/int/8042.h b/src/drivers/8042.h
index 5e61ffd..5e61ffd 100644
--- a/src/int/8042.h
+++ b/src/drivers/8042.h
diff --git a/src/core/framebuffer.c b/src/drivers/framebuffer.c
index 110dc73..110dc73 100644
--- a/src/core/framebuffer.c
+++ b/src/drivers/framebuffer.c
diff --git a/src/core/framebuffer.h b/src/drivers/framebuffer.h
index 3d862d6..d265015 100644
--- a/src/core/framebuffer.h
+++ b/src/drivers/framebuffer.h
@@ -1,7 +1,7 @@
#ifndef FRAMEBUFFER_H
#define FRAMEBUFFER_H
-#include "types.h"
+#include "core/types.h"
typedef enum VIDEO_COLORS {
BLACK=0, BLUE=1, GREEN=2,CYAN=3, RED=4,PURPLE=5,BROWN=6,GRAY=7,
diff --git a/src/int/pic.c b/src/drivers/pic.c
index d509e1d..d509e1d 100644
--- a/src/int/pic.c
+++ b/src/drivers/pic.c
diff --git a/src/int/pic.h b/src/drivers/pic.h
index 19e0f5c..19e0f5c 100644
--- a/src/int/pic.h
+++ b/src/drivers/pic.h
diff --git a/src/libc/stdio.h b/src/libc/stdio.h
index 5805f5a..e2a35ad 100644
--- a/src/libc/stdio.h
+++ b/src/libc/stdio.h
@@ -1,7 +1,7 @@
#ifndef STDIO_H
#define STDIO_H
-#include "core/framebuffer.h"
+#include "drivers/framebuffer.h"
void print(char*);
void printc(char*,VIDEO_COLORS c);