blob: 8310c7aa6994e0dd20f5b1302e681f3fe6e744c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef _PK_H
#define _PK_H
typedef struct
{
long gpr[32];
long sr;
long epc;
long badvaddr;
} trapframe_t;
#define panic(s,...) do { printk(s"\n", ##__VA_ARGS__); gtfo(); } while(0)
#define kassert(cond) do { if(!(cond)) panic("assertion failed: "#cond); } while(0)
#ifdef __cplusplus
extern "C" {
#endif
void printk(const char* s, ...);
void pop_tf(trapframe_t*);
void dump_tf(trapframe_t*);
void unhandled_trap(trapframe_t*);
void handle_syscall(trapframe_t*);
void handle_breakpoint(trapframe_t*);
void boot();
void gtfo();
#ifdef __cplusplus
}
#endif
#endif
|