Changeset View
Changeset View
Standalone View
Standalone View
sys/riscv/riscv/vm_machdep.c
Show First 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) | ||||
td2->td_md.md_spinlock_count = 1; | td2->td_md.md_spinlock_count = 1; | ||||
td2->td_md.md_saved_sstatus_ie = (SSTATUS_SIE); | td2->td_md.md_saved_sstatus_ie = (SSTATUS_SIE); | ||||
} | } | ||||
void | void | ||||
cpu_reset(void) | cpu_reset(void) | ||||
{ | { | ||||
sbi_shutdown(); | sbi_system_reset(SBI_SRST_TYPE_COLD_REBOOT, SBI_SRST_REASON_NONE); | ||||
mhorne: Nice, this will cause `cpu_reset` to behave correctly when the extension is present. | |||||
while(1); | while(1); | ||||
} | } | ||||
void | void | ||||
cpu_thread_swapin(struct thread *td) | cpu_thread_swapin(struct thread *td) | ||||
{ | { | ||||
} | } | ||||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |
Nice, this will cause cpu_reset to behave correctly when the extension is present.