1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00

Add syscall.c|h|asm in kernel/ke

This commit is contained in:
Adrien Bourmault 2021-02-26 18:04:17 +01:00
parent b270c2608c
commit 281ec9c5f5
Signed by: neox
GPG Key ID: 6EB408FE0ACEC664
2 changed files with 27 additions and 16 deletions

View File

@ -100,13 +100,13 @@ NC='\033[1;37m'
# Lib C sources + libbuf source
LibCSources = libc/mem.c libc/ctype.c \
libc/rand.c libc/sprintf.c \
libc/errno.c libc/string.c \
libc/strtol.c \
libbuf/bopen.c libbuf/bputc.c libbuf/bscroll.c \
libbuf/bprint.c libbuf/bgetc.c libbuf/bscan.c \
libbuf/bflush.c libbuf/bwrite.c libbuf/bread.c \
libbuf/bmisc.c libbuf/bclose.c \
libc/rand.c libc/sprintf.c \
libc/errno.c libc/string.c \
libc/strtol.c \
libbuf/bopen.c libbuf/bputc.c libbuf/bscroll.c \
libbuf/bprint.c libbuf/bgetc.c libbuf/bscan.c \
libbuf/bflush.c libbuf/bwrite.c libbuf/bread.c \
libbuf/bmisc.c libbuf/bclose.c \
LibCObj=$(patsubst %.c,$(KOBJDIR)/%.o,$(LibCSources))
LibCDep=$(patsubst %.c,$(KOBJDIR)/%.d,$(LibCSources))
@ -114,21 +114,21 @@ LibCDep=$(patsubst %.c,$(KOBJDIR)/%.d,$(LibCSources))
LibCObj += $(KOBJDIR)/libc/atoi.o $(KOBJDIR)/libc/itoa.o
# Kernel sources
KernSources = kernel/ke/cpuid.c kernel/mm/paging.c \
kernel/ke/idt.c kernel/init/init.c \
KernSources = kernel/ke/cpuid.c kernel/mm/paging.c \
kernel/ke/idt.c kernel/init/init.c \
kernel/init/table.c kernel/io/cursor.c \
kernel/ke/log.c kernel/io/vga.c \
kernel/ke/panic.c kernel/mm/map.c \
kernel/mm/heap.c kernel/mm/malloc.c \
kernel/mm/gdt.c kernel/ps/sched.c \
kernel/ke/log.c kernel/io/vga.c \
kernel/ke/panic.c kernel/mm/map.c \
kernel/mm/heap.c kernel/mm/malloc.c \
kernel/mm/gdt.c kernel/ps/sched.c \
kernel/init/info.c kernel/init/ssp.c \
kernel/ke/rtc.c kernel/io/keyb.c \
kernel/io/spkr.c kernel/po/shtdwn.c \
kernel/ke/rtc.c kernel/io/keyb.c \
kernel/io/spkr.c kernel/po/shtdwn.c \
kernel/sh/shell.c kernel/sh/shcmds.c \
kernel/sh/musage.c kernel/sh/argv.c \
kernel/ke/pit.c kernel/sh/testcmds.c \
kernel/mm/palloc.c kernel/io/acpi.c \
kernel/io/pci.c
kernel/io/pci.c kernel/ke/syscall.c \
KernObj=$(patsubst %.c,$(KOBJDIR)/%.o,$(KernSources))
KernDep=$(patsubst %.c,$(KOBJDIR)/%.d,$(KernSources))
@ -255,6 +255,15 @@ $(KOBJDIR)/kernel/mm/gdt.o: $(KALEIDDIR)/kernel/mm/gdt.c \
@$(LD) $(LDFLAGS) -r $@.1 $@.2 -o $@
@rm -f $@.1 $@.2
@echo ${CL2}[$@] ${CL}Compiled.${CL3}
$(KOBJDIR)/kernel/ke/syscall.o: $(KALEIDDIR)/kernel/ke/syscall.c \
$(KALEIDDIR)/kernel/ke/syscall.asm | $(KOBJDIR)
@mkdir -p $(shell dirname $@)
@$(ASM) $(ASMFLAGS) $(KALEIDDIR)/kernel/ke/syscall.asm -o $@.1
@$(KCC) $< -o $@.2
@$(LD) $(LDFLAGS) -r $@.1 $@.2 -o $@
@rm -f $@.1 $@.2
@echo ${CL2}[$@] ${CL}Compiled.${CL3}
## DRIVERS SPECIAL RECIPES MAKEFILE ------------------------------------------ #

View File

@ -30,6 +30,7 @@
#include <ke/time.h>
#include <ke/cpuid.h>
#include <ke/sched.h>
#include <ke/syscall.h>
#include <sh/shell.h>
#include <io/vga.h>
#include <io/keyb.h>
@ -81,6 +82,7 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg)
MmActivatePageHandler();
KeGetCpuInfos();
IoEnableKeyb();
KeEnableSystemCalls();
// ACPI
IoInitAcpi();