Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/swtch.S
Show All 35 Lines | |||||
#include <machine/asm.h> | #include <machine/asm.h> | ||||
#include <machine/armreg.h> | #include <machine/armreg.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
.macro clear_step_flag pcbflags, tmp | .macro clear_step_flag pcbflags, tmp | ||||
tbz \pcbflags, #PCB_SINGLE_STEP_SHIFT, 999f | tbz \pcbflags, #PCB_SINGLE_STEP_SHIFT, 999f | ||||
mrs \tmp, mdscr_el1 | mrs \tmp, mdscr_el1 | ||||
bic \tmp, \tmp, #1 | bic \tmp, \tmp, #MDSCR_SS | ||||
msr mdscr_el1, \tmp | msr mdscr_el1, \tmp | ||||
isb | isb | ||||
999: | 999: | ||||
.endm | .endm | ||||
.macro set_step_flag pcbflags, tmp | .macro set_step_flag pcbflags, tmp | ||||
tbz \pcbflags, #PCB_SINGLE_STEP_SHIFT, 999f | tbz \pcbflags, #PCB_SINGLE_STEP_SHIFT, 999f | ||||
mrs \tmp, mdscr_el1 | mrs \tmp, mdscr_el1 | ||||
orr \tmp, \tmp, #1 | orr \tmp, \tmp, #MDSCR_SS | ||||
msr mdscr_el1, \tmp | msr mdscr_el1, \tmp | ||||
isb | isb | ||||
999: | 999: | ||||
.endm | .endm | ||||
/* | /* | ||||
* void cpu_throw(struct thread *old, struct thread *new) | * void cpu_throw(struct thread *old, struct thread *new) | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 235 Lines • Show Last 20 Lines |