summaryrefslogtreecommitdiffhomepage
path: root/src/rv64/rv64-err.c
blob: a16b7039e6419dd05cc89eb57c6a34f6c6cfdf54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* -------------------------------------------

  Copyright (C) 2024, Amlal El Mahrouss, licensed under Apache 2.0.

------------------------------------------- */

#include <lib/boot.h>

/// BUGS: 0

/// @brief Goes into a panic state.
/// @param reason why?
void cb_panic(const char* reason) {
  cb_put_string("Error: ");
  cb_put_string(reason);
  cb_put_char('\n');

  while (yes) {
    asm volatile("wfi");
  }
}