View | Details | Raw Unified | Return to bug 262691 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/arm64/arm64/genassym.c (-1 / +1 lines)
Lines 62-68 ASSYM(PCB_SINGLE_STEP_SHIFT, PCB_SINGLE_STEP_SHIFT); Link Here
62
ASSYM(PCB_REGS, offsetof(struct pcb, pcb_x));
62
ASSYM(PCB_REGS, offsetof(struct pcb, pcb_x));
63
ASSYM(PCB_LR, offsetof(struct pcb, pcb_lr));
63
ASSYM(PCB_LR, offsetof(struct pcb, pcb_lr));
64
ASSYM(PCB_SP, offsetof(struct pcb, pcb_sp));
64
ASSYM(PCB_SP, offsetof(struct pcb, pcb_sp));
65
ASSYM(PCB_TPIDRRO, offsetof(struct pcb, pcb_tpidrro_el0));
65
ASSYM(PCB_TPIDR, offsetof(struct pcb, pcb_tpidr_el0));
66
ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
66
ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
67
ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
67
ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
68
68
(-)b/sys/arm64/arm64/swtch.S (-12 / +12 lines)
Lines 89-99 ENTRY(cpu_throw) Link Here
89
	set_step_flag w5, x6
89
	set_step_flag w5, x6
90
90
91
	/* Restore the registers */
91
	/* Restore the registers */
92
	ldp	x5, x6, [x4, #PCB_SP]
92
	ldr	x5, [x4, #PCB_SP]
93
	ldp	x6, x7, [x4, #PCB_TPIDR]
93
	mov	sp, x5
94
	mov	sp, x5
94
	msr	tpidr_el0, x6
95
	msr	tpidr_el0, x6
95
	ldr	x6, [x4, #PCB_TPIDRRO]
96
	msr	tpidrro_el0, x7
96
	msr	tpidrro_el0, x6
97
	ldp	x19, x20, [x4, #PCB_REGS + 19 * 8]
97
	ldp	x19, x20, [x4, #PCB_REGS + 19 * 8]
98
	ldp	x21, x22, [x4, #PCB_REGS + 21 * 8]
98
	ldp	x21, x22, [x4, #PCB_REGS + 21 * 8]
99
	ldp	x23, x24, [x4, #PCB_REGS + 23 * 8]
99
	ldp	x23, x24, [x4, #PCB_REGS + 23 * 8]
Lines 127-136 ENTRY(cpu_switch) Link Here
127
	stp	x29, lr, [x4, #PCB_REGS + 29 * 8]
127
	stp	x29, lr, [x4, #PCB_REGS + 29 * 8]
128
	/* And the old stack pointer */
128
	/* And the old stack pointer */
129
	mov	x5, sp
129
	mov	x5, sp
130
	mrs	x6, tpidrro_el0
131
	str	x6, [x4, #PCB_TPIDRRO]
132
	mrs	x6, tpidr_el0
130
	mrs	x6, tpidr_el0
133
	stp	x5, x6, [x4, #PCB_SP]
131
	mrs	x7, tpidrro_el0
132
	str	x5, [x4, #PCB_SP]
133
	stp	x6, x7, [x4, #PCB_TPIDR]
134
134
135
	/* If we were single stepping, disable it */
135
	/* If we were single stepping, disable it */
136
	ldr	w5, [x4, #PCB_FLAGS]
136
	ldr	w5, [x4, #PCB_FLAGS]
Lines 178-188 ENTRY(cpu_switch) Link Here
178
	set_step_flag w5, x6
178
	set_step_flag w5, x6
179
179
180
	/* Restore the registers */
180
	/* Restore the registers */
181
	ldp	x5, x6, [x4, #PCB_SP]
181
	ldr	x5, [x4, #PCB_SP]
182
	ldp	x6, x7, [x4, #PCB_TPIDR]
182
	mov	sp, x5
183
	mov	sp, x5
183
	msr	tpidr_el0, x6
184
	msr	tpidr_el0, x6
184
	ldr	x6, [x4, #PCB_TPIDRRO]
185
	msr	tpidrro_el0, x7
185
	msr	tpidrro_el0, x6
186
	ldp	x19, x20, [x4, #PCB_REGS + 19 * 8]
186
	ldp	x19, x20, [x4, #PCB_REGS + 19 * 8]
187
	ldp	x21, x22, [x4, #PCB_REGS + 21 * 8]
187
	ldp	x21, x22, [x4, #PCB_REGS + 21 * 8]
188
	ldp	x23, x24, [x4, #PCB_REGS + 23 * 8]
188
	ldp	x23, x24, [x4, #PCB_REGS + 23 * 8]
Lines 254-262 ENTRY(savectx) Link Here
254
	/* And the old stack pointer */
254
	/* And the old stack pointer */
255
	mov	x5, sp
255
	mov	x5, sp
256
	mrs	x6, tpidrro_el0
256
	mrs	x6, tpidrro_el0
257
	str	x6, [x0, #PCB_TPIDRRO]
257
	mrs	x7, tpidr_el0
258
	mrs	x6, tpidr_el0
258
	str	x5, [x0, #PCB_SP]
259
	stp	x5, x6, [x0, #PCB_SP]
259
	stp	x6, x7, [x0, #PCB_TPIDR]
260
260
261
	/* Store the VFP registers */
261
	/* Store the VFP registers */
262
#ifdef VFP
262
#ifdef VFP
(-)b/sys/arm64/include/pcb.h (-1 / +1 lines)
Lines 40-47 struct pcb { Link Here
40
	uint64_t	pcb_x[30];
40
	uint64_t	pcb_x[30];
41
	uint64_t	pcb_lr;
41
	uint64_t	pcb_lr;
42
	uint64_t	_reserved;	/* Was pcb_pc */
42
	uint64_t	_reserved;	/* Was pcb_pc */
43
	/* These two need to be in order as we access them together */
44
	uint64_t	pcb_sp;
43
	uint64_t	pcb_sp;
44
	/* These two need to be in order as we access them together */
45
	uint64_t	pcb_tpidr_el0;
45
	uint64_t	pcb_tpidr_el0;
46
	uint64_t	pcb_tpidrro_el0;
46
	uint64_t	pcb_tpidrro_el0;

Return to bug 262691