1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-10-30 12:03:52 -04:00

Replace hardcoded selector with configuration constant

This commit is contained in:
Braiden Vasco 2017-11-02 17:02:11 +00:00
parent 27ef31a4b0
commit 5950709d38
2 changed files with 4 additions and 5 deletions

View file

@ -3,7 +3,7 @@ CCPREFIX = i686-elf-
AS = $(CCPREFIX)as
CC = $(CCPREFIX)gcc
OBJS = boot.s.o main.c.o logger.c.o console.c.o isr.c.o isr.asm.o multiboot.c.o protected.asm.cpp.o protected.c.o
OBJS = boot.s.o main.c.o logger.c.o console.c.o isr.c.o isr.asm.cpp.o multiboot.c.o protected.asm.cpp.o protected.c.o
all: kernel
@ -20,9 +20,6 @@ kernel: $(OBJS)
%.s.o: %.s
$(AS) $< -o $@
%.asm.o: %.asm
nasm -felf -o $@ $<
%.asm.cpp.o: %.asm.cpp
nasm -felf -o $@ $<

View file

@ -1,3 +1,5 @@
#include "config.h"
[EXTERN isr]
%macro ISR_NOERRCODE 1
@ -56,7 +58,7 @@ isr_common_stub:
mov ax, ds ; Lower 16-bits of eax = ds.
push eax ; save the data segment descriptor
mov ax, 0x10 ; load the kernel data segment descriptor
mov ax, GDT_KERNEL_DS_SELECTOR
mov ds, ax
mov es, ax
mov fs, ax