diff options
author | Andrew Waterman <waterman@s141.Millennium.Berkeley.EDU> | 2010-08-18 18:24:55 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@s141.Millennium.Berkeley.EDU> | 2010-08-18 18:24:55 -0700 |
commit | 29cc0dc9854c66f12bd65e12516f68ccd9a741da (patch) | |
tree | 23bd8147007d3d0fbb005f578f395e71f7d7d18d /pk/pk.h | |
parent | e97220c9bf519b8e0f0b131a4f868331c4d526fb (diff) | |
download | riscv-pk-29cc0dc9854c66f12bd65e12516f68ccd9a741da.zip riscv-pk-29cc0dc9854c66f12bd65e12516f68ccd9a741da.tar.gz riscv-pk-29cc0dc9854c66f12bd65e12516f68ccd9a741da.tar.bz2 |
[pk,fesvr] improved proxykernel build system
Now uses a modified MCPPBS. Add --host=riscv to configure path.
Front-end server now just searches PATH for riscv-pk, so just install the pk
to somewhere in your path.
Diffstat (limited to 'pk/pk.h')
-rw-r--r-- | pk/pk.h | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -0,0 +1,39 @@ +#ifndef _PK_H +#define _PK_H + +typedef struct +{ + long gpr[32]; + long sr; + long epc; + long badvaddr; +} trapframe_t; + +#define USER_MEM_SIZE 0x70000000 +#define USER_MAINVARS_SIZE 0x1000 +#define USER_START 0x10000 + +#define panic(s,...) do { printk(s"\n", ##__VA_ARGS__); sys_exit(-1); } 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 init_tf(trapframe_t*, long pc, long sp); +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 sys_exit(int code) __attribute__((noreturn)); + +#ifdef __cplusplus +} +#endif + +#endif |