> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 23:18:36 up 4 days, 18:24, 1 user, load average: 0.29, 0.31, 0.38
This commit is contained in:
@ -8,8 +8,8 @@
|
||||
#endif
|
||||
|
||||
struct Context {
|
||||
// TODO: fix the order of these members to match trap.S
|
||||
uintptr_t mepc, mcause, gpr[NR_REGS], mstatus;
|
||||
uintptr_t gpr[NR_REGS], mcause, mstatus, mepc;
|
||||
// TODO: fix pdir in trap.S
|
||||
void *pdir;
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,7 @@ Context* __am_irq_handle(Context *c) {
|
||||
if (user_handler) {
|
||||
Event ev = {0};
|
||||
switch (c->mcause) {
|
||||
case -1: ev.event = EVENT_YIELD; break;
|
||||
case 0xb: ev.event = EVENT_YIELD; break;
|
||||
default: ev.event = EVENT_ERROR; break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user