summaryrefslogtreecommitdiff
path: root/src/kernel/panic.c
blob: a2e68e3998f28a13633a5ff933478b9c1403a97c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "panic.h"
#include "log.h"
#include "vga.h"

void panic(const char *message) {
  set_log_mode(LOG_PANIC);
  vga_blank();
  logsz("Kernel panic: ");
  logsz(message);
  logsz("\nHalting.");
  while (1)
    asm volatile ("hlt");
}