diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/isr.c | 38 | ||||
-rw-r--r-- | src/kernel.c | 3 |
3 files changed, 3 insertions, 40 deletions
diff --git a/src/Makefile b/src/Makefile index e93d337..881b7c2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,7 +9,7 @@ conf.h: conf.h.in @sed -i 's/@VERSION@/$(shell git describe)/' conf.h @sed -i 's/@CC@/$(shell ${CC} --version | head -n1)/' conf.h -kernel,SRCS := multiboot2.c mmap.c kernel.c isr.c mem/vmm.c +kernel,SRCS := multiboot2.c mmap.c kernel.c mem/vmm.c kernel,OBJS := conf.h include ../rules.mk diff --git a/src/isr.c b/src/isr.c deleted file mode 100644 index b89ecd2..0000000 --- a/src/isr.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Interrupt Service Routines - */ - -#include <idt.h> -#include <stdio.h> -#include <sys/control.h> - -__attribute__((interrupt)) void -abort_handler(struct interrupt_frame *frame) -{ - printf("system abort\n"); - printf("ip: %x cs=%x\n", frame->ip, frame->cs); - printf("sp: %x ss=%x\n", frame->sp, frame->ss); - printf("flags: %x\n", frame->flags); - abort(); -} - -__attribute__((interrupt)) void -interrupt_handler(struct interrupt_frame *frame) -{ - printf("interrupt\n"); - abort(); -} - -__attribute__((interrupt)) void -interrupt_handler_e(struct interrupt_frame *frame, uint32_t error) -{ - printf("interrupt\n"); - abort(); -} - -__attribute__((interrupt)) void -syscall_handler(struct interrupt_frame *frame) -{ - printf("interrupt\n"); - abort(); -} diff --git a/src/kernel.c b/src/kernel.c index a9fc126..41025d7 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -25,6 +25,7 @@ void kmain() { printf("CPU: %s family %u model %u stepping %u\n", vendor, family(v), model(v), v.stepping); printf("hello %s world\n", "kernel"); + printf("Hello %c\n", 'C'); printf("we are number %d\n", 1); printf("a negative %d as hex %x\n", -1, -1); printf("hex 255=0x%x\n", 255); @@ -35,7 +36,7 @@ void kmain() { char *c = (char *)0xc0700000; if (*c == 0) printf("c is 0\r\n"); - asm volatile("int $0x80"); + // asm volatile("int $0x80"); while (1) ; |