export GIT_REV = $(shell git describe --long HEAD)
-CFLAGS = -g -Iinclude/arch/x86 -ffreestanding -DGIT_COMMIT=\"$(GIT_REV)\"
+CFLAGS = -g -fgnu89-inline -Iinclude/arch/x86 -ffreestanding -DGIT_COMMIT=\"$(GIT_REV)\"
KERNEL_OBJ = kernel/entry.o kernel/arch/x86/tty/tty.o kernel/drivers/irq/i8259a.o kernel/arch/x86/irq/idt.o kernel/arch/x86/irq/sample_handler.o kernel/kernel.o
call load_paging_structs
call enable_paging
- call 0xc0000000
- hlt
- jmp $-1
+ jmp 0x8:0xc0000000
+ nop
kernel_name: db "KERNEL BIN"
begin: db "Nameless Bootloader revision ", GIT_REVISION, 0xd, 0xa, 0
mov di, STAGE3_OFFSET
call read_cluster_chain ; read stage 3
mov dl, [BOOT_DRIVE]
- call STAGE3_ADDRESS ; call stage 3
- jmp .halt ; halt in case we return, which should never happen
+ jmp 0:STAGE3_ADDRESS ; call stage 3
+ nop
.stage3_missing:
print stage3_missing
extern void screen_clear(void);
extern void kprint(const char *string, uint8_t color);
+extern void kprintc(const char character, uint8_t color);
extern void kprintb(const uint8_t byte);
extern void kprintw(const uint16_t word);
extern void kprintd(const uint32_t dword);
#include <stdint.h>
#include <mm/paging.h>
+struct abort_frame;
+struct interrupt_frame;
+struct fault_frame;
extern void double_fault(struct abort_frame *frame);
extern void keyb_handler(struct interrupt_frame *frame);
extern void pf_handler(struct fault_frame *frame);