Compare commits

..

No commits in common. "21a793d211d33721410ec9d780e1a107f8671694" and "fb981bf9942d52f6db1b6852123a452261e20a94" have entirely different histories.

7 changed files with 7 additions and 10 deletions

View File

@ -1 +0,0 @@
/ext/

View File

@ -27,12 +27,11 @@ default: bin/$(TARGET)-$(ARCH)
all: $(ARCHES)
$(ARCHES):
@$(MAKE) ARCH=$@
$(MAKE) ARCH=$@
bin/$(TARGET)-$(ARCH): $(OBJ)
@mkdir -p $(@D)
@echo Linking $@
@$(LD) $(LDFLAGS) $(OBJ) -o $@
$(LD) $(LDFLAGS) $(OBJ) -o $@
obj/$(ARCH)/%.o: src/%.c $(HFILES)
@mkdir -p $(@D)

View File

@ -1,10 +1,9 @@
#include "vga.h"
#include <hal/ops.h>
#include <print/print.h>
void panic(const char *message, const char *filename, int line) {
vga_clear(VGA_BLUE);
printf("KernOS kernel panic:\n%s\n", message);
printf("at %s:%d", filename, line);
halt_catch_fire();
}
}

View File

@ -19,7 +19,7 @@ void print_stivale2(struct stivale2_struct *info) {
printf("Memmap (%d entries):\n", m->entries);
for (size_t i = 0; i < m->entries; i++) {
struct stivale2_mmap_entry me = m->memmap[i];
printf("\t[%x+%h] %x\n", (size_t)me.base, (size_t)me.length, me.type);
printf("\t[%x+%h] %x\n", me.base, me.length, me.type);
}
break;
}

View File

@ -58,4 +58,4 @@ void vga_clear(uint8_t color) {
}
terminal_row = 0;
terminal_column = 0;
}
}

View File

@ -22,4 +22,4 @@ void vga_putc(char c);
void vga_puts(const char *c);
void vga_setcolor(uint8_t color);
void vga_write_elsewhere(const char *c, size_t y, size_t x);
void vga_clear(uint8_t color);
void vga_clear(uint8_t color);

View File

@ -1,4 +1,4 @@
void halt_catch_fire();
#define PANIC(m) panic(m, __FILE__, __LINE__)
void panic(const char *message, const char *filename, int line);
void panic(const char *message, const char *filename, int line);