diff options
Diffstat (limited to 'i686')
-rw-r--r-- | i686/Makefile | 2 | ||||
-rw-r--r-- | i686/boot.S | 2 | ||||
-rw-r--r-- | i686/lidt.c | 1 | ||||
-rw-r--r-- | i686/sys/syscall.h | 8 | ||||
-rw-r--r-- | i686/toolchain.mk | 2 |
5 files changed, 10 insertions, 5 deletions
diff --git a/i686/Makefile b/i686/Makefile index 8575d99..9d7f06c 100644 --- a/i686/Makefile +++ b/i686/Makefile @@ -1,7 +1,5 @@ include ../Makefile.config -CCFLAGS += -I../grub/include -I../lib -mgeneral-regs-only - arch.SRCS = boot.S init.s \ gdt.c lgdt.c \ lidt.c isr.c diff --git a/i686/boot.S b/i686/boot.S index 1eea9a3..16d54a3 100644 --- a/i686/boot.S +++ b/i686/boot.S @@ -1,5 +1,5 @@ #define ASM_FILE -#include <multiboot2.h> +#include <grub/multiboot2.h> #include "macros.s" /* Declare a multiboot header that marks this program as a kernel */ diff --git a/i686/lidt.c b/i686/lidt.c index 59a2611..cf8084e 100644 --- a/i686/lidt.c +++ b/i686/lidt.c @@ -1,6 +1,5 @@ #include "idt.h" #include <stdint.h> -#include <stdio.h> struct __attribute__((packed)) Pointer { uint16_t limit; diff --git a/i686/sys/syscall.h b/i686/sys/syscall.h new file mode 100644 index 0000000..9e62c89 --- /dev/null +++ b/i686/sys/syscall.h @@ -0,0 +1,8 @@ +#pragma once + +static inline int +syscall(int number) +{ + asm volatile("int $0x80"); + return 0; +} diff --git a/i686/toolchain.mk b/i686/toolchain.mk index 1747a8b..6f69cdb 100644 --- a/i686/toolchain.mk +++ b/i686/toolchain.mk @@ -4,7 +4,7 @@ ARCH=i686 # AS := i686-elf-as CC := i686-elf-gcc -CCFLAGS := -Wall -Wextra -Wpedantic -fanalyzer -ffreestanding -std=gnu11 -mgeneral-regs-only +CCFLAGS := -Wall -Wextra -Wpedantic -Wshadow -Wconversion -fanalyzer -ffreestanding -std=gnu11 -mgeneral-regs-only CCFLAGS += $(shell echo ${CONFIG_CCFLAGS}) LD := i686-elf-ld LDFLAGS := -static -nostdlib |