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:
parent
27ef31a4b0
commit
5950709d38
2 changed files with 4 additions and 5 deletions
|
@ -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 $@ $<
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue