Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/swtch.S
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | #endif | ||||
ldp x14, x15, [x4, #PCB_REGS + 14 * 8] | ldp x14, x15, [x4, #PCB_REGS + 14 * 8] | ||||
ldp x16, x17, [x4, #PCB_REGS + 16 * 8] | ldp x16, x17, [x4, #PCB_REGS + 16 * 8] | ||||
ldr x19, [x4, #PCB_REGS + 19 * 8] | ldr x19, [x4, #PCB_REGS + 19 * 8] | ||||
ldp x20, x21, [x4, #PCB_REGS + 20 * 8] | ldp x20, x21, [x4, #PCB_REGS + 20 * 8] | ||||
ldp x22, x23, [x4, #PCB_REGS + 22 * 8] | ldp x22, x23, [x4, #PCB_REGS + 22 * 8] | ||||
ldp x24, x25, [x4, #PCB_REGS + 24 * 8] | ldp x24, x25, [x4, #PCB_REGS + 24 * 8] | ||||
ldp x26, x27, [x4, #PCB_REGS + 26 * 8] | ldp x26, x27, [x4, #PCB_REGS + 26 * 8] | ||||
ldp x28, x29, [x4, #PCB_REGS + 28 * 8] | ldp x28, x29, [x4, #PCB_REGS + 28 * 8] | ||||
ldr x30, [x4, #PCB_REGS + 30 * 8] | ldr lr, [x4, #PCB_LR] | ||||
ret | ret | ||||
END(cpu_throw) | END(cpu_throw) | ||||
/* | /* | ||||
* void cpu_switch(struct thread *old, struct thread *new, struct mtx *mtx) | * void cpu_switch(struct thread *old, struct thread *new, struct mtx *mtx) | ||||
* | * | ||||
* x0 = old | * x0 = old | ||||
Show All 14 Lines | ENTRY(cpu_switch) | ||||
stp x14, x15, [x4, #PCB_REGS + 14 * 8] | stp x14, x15, [x4, #PCB_REGS + 14 * 8] | ||||
stp x16, x17, [x4, #PCB_REGS + 16 * 8] | stp x16, x17, [x4, #PCB_REGS + 16 * 8] | ||||
stp x18, x19, [x4, #PCB_REGS + 18 * 8] | stp x18, x19, [x4, #PCB_REGS + 18 * 8] | ||||
stp x20, x21, [x4, #PCB_REGS + 20 * 8] | stp x20, x21, [x4, #PCB_REGS + 20 * 8] | ||||
stp x22, x23, [x4, #PCB_REGS + 22 * 8] | stp x22, x23, [x4, #PCB_REGS + 22 * 8] | ||||
stp x24, x25, [x4, #PCB_REGS + 24 * 8] | stp x24, x25, [x4, #PCB_REGS + 24 * 8] | ||||
stp x26, x27, [x4, #PCB_REGS + 26 * 8] | stp x26, x27, [x4, #PCB_REGS + 26 * 8] | ||||
stp x28, x29, [x4, #PCB_REGS + 28 * 8] | stp x28, x29, [x4, #PCB_REGS + 28 * 8] | ||||
str x30, [x4, #PCB_REGS + 30 * 8] | str lr, [x4, #PCB_LR] | ||||
/* And the old stack pointer */ | /* And the old stack pointer */ | ||||
mov x5, sp | mov x5, sp | ||||
mrs x6, tpidrro_el0 | mrs x6, tpidrro_el0 | ||||
str x6, [x4, #PCB_TPIDRRO] | str x6, [x4, #PCB_TPIDRRO] | ||||
mrs x6, tpidr_el0 | mrs x6, tpidr_el0 | ||||
stp x5, x6, [x4, #PCB_SP] | stp x5, x6, [x4, #PCB_SP] | ||||
/* If we were single stepping, disable it */ | /* If we were single stepping, disable it */ | ||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | #endif | ||||
ldp x14, x15, [x4, #PCB_REGS + 14 * 8] | ldp x14, x15, [x4, #PCB_REGS + 14 * 8] | ||||
ldp x16, x17, [x4, #PCB_REGS + 16 * 8] | ldp x16, x17, [x4, #PCB_REGS + 16 * 8] | ||||
ldr x19, [x4, #PCB_REGS + 19 * 8] | ldr x19, [x4, #PCB_REGS + 19 * 8] | ||||
ldp x20, x21, [x4, #PCB_REGS + 20 * 8] | ldp x20, x21, [x4, #PCB_REGS + 20 * 8] | ||||
ldp x22, x23, [x4, #PCB_REGS + 22 * 8] | ldp x22, x23, [x4, #PCB_REGS + 22 * 8] | ||||
ldp x24, x25, [x4, #PCB_REGS + 24 * 8] | ldp x24, x25, [x4, #PCB_REGS + 24 * 8] | ||||
ldp x26, x27, [x4, #PCB_REGS + 26 * 8] | ldp x26, x27, [x4, #PCB_REGS + 26 * 8] | ||||
ldp x28, x29, [x4, #PCB_REGS + 28 * 8] | ldp x28, x29, [x4, #PCB_REGS + 28 * 8] | ||||
ldr x30, [x4, #PCB_REGS + 30 * 8] | ldr lr, [x4, #PCB_LR] | ||||
str xzr, [x4, #PCB_REGS + 18 * 8] | str xzr, [x4, #PCB_REGS + 18 * 8] | ||||
ret | ret | ||||
.Lcpu_switch_panic_str: | .Lcpu_switch_panic_str: | ||||
.asciz "cpu_switch: %p\0" | .asciz "cpu_switch: %p\0" | ||||
END(cpu_switch) | END(cpu_switch) | ||||
ENTRY(fork_trampoline) | ENTRY(fork_trampoline) | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | ENTRY(savectx) | ||||
stp x14, x15, [x0, #PCB_REGS + 14 * 8] | stp x14, x15, [x0, #PCB_REGS + 14 * 8] | ||||
stp x16, x17, [x0, #PCB_REGS + 16 * 8] | stp x16, x17, [x0, #PCB_REGS + 16 * 8] | ||||
stp x18, x19, [x0, #PCB_REGS + 18 * 8] | stp x18, x19, [x0, #PCB_REGS + 18 * 8] | ||||
stp x20, x21, [x0, #PCB_REGS + 20 * 8] | stp x20, x21, [x0, #PCB_REGS + 20 * 8] | ||||
stp x22, x23, [x0, #PCB_REGS + 22 * 8] | stp x22, x23, [x0, #PCB_REGS + 22 * 8] | ||||
stp x24, x25, [x0, #PCB_REGS + 24 * 8] | stp x24, x25, [x0, #PCB_REGS + 24 * 8] | ||||
stp x26, x27, [x0, #PCB_REGS + 26 * 8] | stp x26, x27, [x0, #PCB_REGS + 26 * 8] | ||||
stp x28, x29, [x0, #PCB_REGS + 28 * 8] | stp x28, x29, [x0, #PCB_REGS + 28 * 8] | ||||
str x30, [x0, #PCB_REGS + 30 * 8] | str lr, [x0, #PCB_LR] | ||||
/* And the old stack pointer */ | /* And the old stack pointer */ | ||||
mov x5, sp | mov x5, sp | ||||
mrs x6, tpidrro_el0 | mrs x6, tpidrro_el0 | ||||
str x6, [x0, #PCB_TPIDRRO] | str x6, [x0, #PCB_TPIDRRO] | ||||
mrs x6, tpidr_el0 | mrs x6, tpidr_el0 | ||||
stp x5, x6, [x0, #PCB_SP] | stp x5, x6, [x0, #PCB_SP] | ||||
/* Store the VFP registers */ | /* Store the VFP registers */ | ||||
Show All 11 Lines |