Give kassert its own vector instead of DBZ

This commit is contained in:
Justin C. Miller
2018-05-15 21:38:44 -07:00
parent 5f7ec50055
commit 93e60cc136
4 changed files with 29 additions and 14 deletions

View File

@@ -7,7 +7,7 @@ __kernel_assert(const char *file, unsigned line, const char *message)
console *cons = console::get();
if (cons) {
cons->set_color(9 , 0);
cons->puts("\n\n ERROR: ");
cons->puts("\n\n ERROR: ");
cons->puts(file);
cons->puts(":");
cons->put_dec(line);
@@ -15,15 +15,6 @@ __kernel_assert(const char *file, unsigned line, const char *message)
cons->puts(message);
}
__asm__ __volatile__(
"movq %0, %%r8;"
"movq %1, %%r9;"
"movq %2, %%r10;"
"movq $0, %%rdx;"
"divq %%rdx;"
: // no outputs
: "r"((uint64_t)line), "r"(file), "r"(message)
: "rax", "rdx", "r8", "r9", "r10");
while (1);
__asm__ ( "int $0e7h" );
while (1) __asm__ ("hlt");
}