summaryrefslogtreecommitdiff
path: root/kernel/source/panic.cpp
blob: d99be9180d4856ab297f8c5f3e6993330d831d38 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <hilbert/kernel/framebuffer.hpp>
#include <hilbert/kernel/panic.hpp>

namespace hilbert::kernel {
  [[noreturn]] void panic(uint32_t code) {
    framebuffer::fill_color(framebuffer::encode_color(
      code >> 16, (code >> 8) & 0xff, code & 0xff));
    while (1)
      asm ("hlt");
  }
}