de8b6ec5573f43331c9a1e15aac50139af00f8a7
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Generation of main entry point for the guest, exception handling.
8 * Copyright (C) 2012 MIPS Technologies, Inc.
9 * Authors: Sanjay Lal <sanjayl@kymasys.com>
11 * Copyright (C) 2016 Imagination Technologies Ltd.
14 #include <linux/kvm_host.h>
16 #include <asm/setup.h>
27 #if _MIPS_SIM == _MIPS_SIM_ABI32
32 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
34 #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
39 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
50 /* Some CP0 registers */
51 #define C0_HWRENA 7, 0
52 #define C0_BADVADDR 8, 0
53 #define C0_ENTRYHI 10, 0
54 #define C0_STATUS 12, 0
55 #define C0_CAUSE 13, 0
57 #define C0_EBASE 15, 1
58 #define C0_CONFIG5 16, 5
59 #define C0_DDATA_LO 28, 3
60 #define C0_ERROREPC 30, 0
62 #define CALLFRAME_SIZ 32
64 static unsigned int scratch_vcpu
[2] = { C0_DDATA_LO
};
65 static unsigned int scratch_tmp
[2] = { C0_ERROREPC
};
77 UASM_L_LA(_return_to_host
)
78 UASM_L_LA(_kernel_asid
)
79 UASM_L_LA(_exit_common
)
81 static void *kvm_mips_build_enter_guest(void *addr
);
82 static void *kvm_mips_build_ret_from_exit(void *addr
);
83 static void *kvm_mips_build_ret_to_guest(void *addr
);
84 static void *kvm_mips_build_ret_to_host(void *addr
);
87 * kvm_mips_entry_setup() - Perform global setup for entry code.
89 * Perform global setup for entry code, such as choosing a scratch register.
91 * Returns: 0 on success.
94 int kvm_mips_entry_setup(void)
97 * We prefer to use KScratchN registers if they are available over the
98 * defaults above, which may not work on all cores.
100 unsigned int kscratch_mask
= cpu_data
[0].kscratch_mask
& 0xfc;
102 /* Pick a scratch register for storing VCPU */
104 scratch_vcpu
[0] = 31;
105 scratch_vcpu
[1] = ffs(kscratch_mask
) - 1;
106 kscratch_mask
&= ~BIT(scratch_vcpu
[1]);
109 /* Pick a scratch register to use as a temp for saving state */
112 scratch_tmp
[1] = ffs(kscratch_mask
) - 1;
113 kscratch_mask
&= ~BIT(scratch_tmp
[1]);
119 static void kvm_mips_build_save_scratch(u32
**p
, unsigned int tmp
,
122 /* Save the VCPU scratch register value in cp0_epc of the stack frame */
123 uasm_i_mfc0(p
, tmp
, scratch_vcpu
[0], scratch_vcpu
[1]);
124 UASM_i_SW(p
, tmp
, offsetof(struct pt_regs
, cp0_epc
), frame
);
126 /* Save the temp scratch register value in cp0_cause of stack frame */
127 if (scratch_tmp
[0] == 31) {
128 uasm_i_mfc0(p
, tmp
, scratch_tmp
[0], scratch_tmp
[1]);
129 UASM_i_SW(p
, tmp
, offsetof(struct pt_regs
, cp0_cause
), frame
);
133 static void kvm_mips_build_restore_scratch(u32
**p
, unsigned int tmp
,
137 * Restore host scratch register values saved by
138 * kvm_mips_build_save_scratch().
140 UASM_i_LW(p
, tmp
, offsetof(struct pt_regs
, cp0_epc
), frame
);
141 uasm_i_mtc0(p
, tmp
, scratch_vcpu
[0], scratch_vcpu
[1]);
143 if (scratch_tmp
[0] == 31) {
144 UASM_i_LW(p
, tmp
, offsetof(struct pt_regs
, cp0_cause
), frame
);
145 uasm_i_mtc0(p
, tmp
, scratch_tmp
[0], scratch_tmp
[1]);
150 * kvm_mips_build_vcpu_run() - Assemble function to start running a guest VCPU.
151 * @addr: Address to start writing code.
153 * Assemble the start of the vcpu_run function to run a guest VCPU. The function
154 * conforms to the following prototype:
156 * int vcpu_run(struct kvm_run *run, struct kvm_vcpu *vcpu);
158 * The exit from the guest and return to the caller is handled by the code
159 * generated by kvm_mips_build_ret_to_host().
161 * Returns: Next address after end of written function.
163 void *kvm_mips_build_vcpu_run(void *addr
)
173 /* k0/k1 not being used in host kernel context */
174 uasm_i_addiu(&p
, K1
, SP
, -(int)sizeof(struct pt_regs
));
175 for (i
= 16; i
< 32; ++i
) {
178 UASM_i_SW(&p
, i
, offsetof(struct pt_regs
, regs
[i
]), K1
);
183 UASM_i_SW(&p
, V0
, offsetof(struct pt_regs
, lo
), K1
);
185 UASM_i_SW(&p
, V1
, offsetof(struct pt_regs
, hi
), K1
);
187 /* Save host status */
188 uasm_i_mfc0(&p
, V0
, C0_STATUS
);
189 UASM_i_SW(&p
, V0
, offsetof(struct pt_regs
, cp0_status
), K1
);
191 /* Save scratch registers, will be used to store pointer to vcpu etc */
192 kvm_mips_build_save_scratch(&p
, V1
, K1
);
194 /* VCPU scratch register has pointer to vcpu */
195 uasm_i_mtc0(&p
, A1
, scratch_vcpu
[0], scratch_vcpu
[1]);
197 /* Offset into vcpu->arch */
198 uasm_i_addiu(&p
, K1
, A1
, offsetof(struct kvm_vcpu
, arch
));
201 * Save the host stack to VCPU, used for exception processing
202 * when we exit from the Guest
204 UASM_i_SW(&p
, SP
, offsetof(struct kvm_vcpu_arch
, host_stack
), K1
);
206 /* Save the kernel gp as well */
207 UASM_i_SW(&p
, GP
, offsetof(struct kvm_vcpu_arch
, host_gp
), K1
);
210 * Setup status register for running the guest in UM, interrupts
213 UASM_i_LA(&p
, K0
, ST0_EXL
| KSU_USER
| ST0_BEV
);
214 uasm_i_mtc0(&p
, K0
, C0_STATUS
);
217 /* load up the new EBASE */
218 UASM_i_LW(&p
, K0
, offsetof(struct kvm_vcpu_arch
, guest_ebase
), K1
);
219 uasm_i_mtc0(&p
, K0
, C0_EBASE
);
222 * Now that the new EBASE has been loaded, unset BEV, set
223 * interrupt mask as it was but make sure that timer interrupts
226 uasm_i_addiu(&p
, K0
, ZERO
, ST0_EXL
| KSU_USER
| ST0_IE
);
227 uasm_i_andi(&p
, V0
, V0
, ST0_IM
);
228 uasm_i_or(&p
, K0
, K0
, V0
);
229 uasm_i_mtc0(&p
, K0
, C0_STATUS
);
232 p
= kvm_mips_build_enter_guest(p
);
238 * kvm_mips_build_enter_guest() - Assemble code to resume guest execution.
239 * @addr: Address to start writing code.
241 * Assemble the code to resume guest execution. This code is common between the
242 * initial entry into the guest from the host, and returning from the exit
243 * handler back to the guest.
245 * Returns: Next address after end of written function.
247 static void *kvm_mips_build_enter_guest(void *addr
)
251 struct uasm_label labels
[2];
252 struct uasm_reloc relocs
[2];
253 struct uasm_label
*l
= labels
;
254 struct uasm_reloc
*r
= relocs
;
256 memset(labels
, 0, sizeof(labels
));
257 memset(relocs
, 0, sizeof(relocs
));
260 UASM_i_LW(&p
, T0
, offsetof(struct kvm_vcpu_arch
, pc
), K1
);
261 uasm_i_mtc0(&p
, T0
, C0_EPC
);
263 /* Set the ASID for the Guest Kernel */
264 UASM_i_LW(&p
, T0
, offsetof(struct kvm_vcpu_arch
, cop0
), K1
);
265 UASM_i_LW(&p
, T0
, offsetof(struct mips_coproc
, reg
[MIPS_CP0_STATUS
][0]),
267 uasm_i_andi(&p
, T0
, T0
, KSU_USER
| ST0_ERL
| ST0_EXL
);
268 uasm_i_xori(&p
, T0
, T0
, KSU_USER
);
269 uasm_il_bnez(&p
, &r
, T0
, label_kernel_asid
);
270 uasm_i_addiu(&p
, T1
, K1
,
271 offsetof(struct kvm_vcpu_arch
, guest_kernel_asid
));
273 uasm_i_addiu(&p
, T1
, K1
,
274 offsetof(struct kvm_vcpu_arch
, guest_user_asid
));
275 uasm_l_kernel_asid(&l
, p
);
277 /* t1: contains the base of the ASID array, need to get the cpu id */
278 /* smp_processor_id */
279 UASM_i_LW(&p
, T2
, offsetof(struct thread_info
, cpu
), GP
);
281 uasm_i_sll(&p
, T2
, T2
, 2);
282 UASM_i_ADDU(&p
, T3
, T1
, T2
);
283 UASM_i_LW(&p
, K0
, 0, T3
);
284 #ifdef CONFIG_MIPS_ASID_BITS_VARIABLE
285 /* x sizeof(struct cpuinfo_mips)/4 */
286 uasm_i_addiu(&p
, T3
, ZERO
, sizeof(struct cpuinfo_mips
)/4);
287 uasm_i_mul(&p
, T2
, T2
, T3
);
289 UASM_i_LA_mostly(&p
, AT
, (long)&cpu_data
[0].asid_mask
);
290 UASM_i_ADDU(&p
, AT
, AT
, T2
);
291 UASM_i_LW(&p
, T2
, uasm_rel_lo((long)&cpu_data
[0].asid_mask
), AT
);
292 uasm_i_and(&p
, K0
, K0
, T2
);
294 uasm_i_andi(&p
, K0
, K0
, MIPS_ENTRYHI_ASID
);
296 uasm_i_mtc0(&p
, K0
, C0_ENTRYHI
);
299 /* Disable RDHWR access */
300 uasm_i_mtc0(&p
, ZERO
, C0_HWRENA
);
302 /* load the guest context from VCPU and return */
303 for (i
= 1; i
< 32; ++i
) {
304 /* Guest k0/k1 loaded later */
305 if (i
== K0
|| i
== K1
)
307 UASM_i_LW(&p
, i
, offsetof(struct kvm_vcpu_arch
, gprs
[i
]), K1
);
311 UASM_i_LW(&p
, K0
, offsetof(struct kvm_vcpu_arch
, hi
), K1
);
314 UASM_i_LW(&p
, K0
, offsetof(struct kvm_vcpu_arch
, lo
), K1
);
317 /* Restore the guest's k0/k1 registers */
318 UASM_i_LW(&p
, K0
, offsetof(struct kvm_vcpu_arch
, gprs
[K0
]), K1
);
319 UASM_i_LW(&p
, K1
, offsetof(struct kvm_vcpu_arch
, gprs
[K1
]), K1
);
324 uasm_resolve_relocs(relocs
, labels
);
330 * kvm_mips_build_exception() - Assemble first level guest exception handler.
331 * @addr: Address to start writing code.
332 * @handler: Address of common handler (within range of @addr).
334 * Assemble exception vector code for guest execution. The generated vector will
335 * branch to the common exception handler generated by kvm_mips_build_exit().
337 * Returns: Next address after end of written function.
339 void *kvm_mips_build_exception(void *addr
, void *handler
)
342 struct uasm_label labels
[2];
343 struct uasm_reloc relocs
[2];
344 struct uasm_label
*l
= labels
;
345 struct uasm_reloc
*r
= relocs
;
347 memset(labels
, 0, sizeof(labels
));
348 memset(relocs
, 0, sizeof(relocs
));
350 /* Save guest k1 into scratch register */
351 uasm_i_mtc0(&p
, K1
, scratch_tmp
[0], scratch_tmp
[1]);
353 /* Get the VCPU pointer from the VCPU scratch register */
354 uasm_i_mfc0(&p
, K1
, scratch_vcpu
[0], scratch_vcpu
[1]);
355 uasm_i_addiu(&p
, K1
, K1
, offsetof(struct kvm_vcpu
, arch
));
357 /* Save guest k0 into VCPU structure */
358 UASM_i_SW(&p
, K0
, offsetof(struct kvm_vcpu_arch
, gprs
[K0
]), K1
);
360 /* Branch to the common handler */
361 uasm_il_b(&p
, &r
, label_exit_common
);
364 uasm_l_exit_common(&l
, handler
);
365 uasm_resolve_relocs(relocs
, labels
);
371 * kvm_mips_build_exit() - Assemble common guest exit handler.
372 * @addr: Address to start writing code.
374 * Assemble the generic guest exit handling code. This is called by the
375 * exception vectors (generated by kvm_mips_build_exception()), and calls
376 * kvm_mips_handle_exit(), then either resumes the guest or returns to the host
377 * depending on the return value.
379 * Returns: Next address after end of written function.
381 void *kvm_mips_build_exit(void *addr
)
385 struct uasm_label labels
[3];
386 struct uasm_reloc relocs
[3];
387 struct uasm_label
*l
= labels
;
388 struct uasm_reloc
*r
= relocs
;
390 memset(labels
, 0, sizeof(labels
));
391 memset(relocs
, 0, sizeof(relocs
));
394 * Generic Guest exception handler. We end up here when the guest
395 * does something that causes a trap to kernel mode.
397 * Both k0/k1 registers will have already been saved (k0 into the vcpu
398 * structure, and k1 into the scratch_tmp register).
400 * The k1 register will already contain the kvm_vcpu_arch pointer.
403 /* Start saving Guest context to VCPU */
404 for (i
= 0; i
< 32; ++i
) {
405 /* Guest k0/k1 saved later */
406 if (i
== K0
|| i
== K1
)
408 UASM_i_SW(&p
, i
, offsetof(struct kvm_vcpu_arch
, gprs
[i
]), K1
);
411 /* We need to save hi/lo and restore them on the way out */
413 UASM_i_SW(&p
, T0
, offsetof(struct kvm_vcpu_arch
, hi
), K1
);
416 UASM_i_SW(&p
, T0
, offsetof(struct kvm_vcpu_arch
, lo
), K1
);
418 /* Finally save guest k1 to VCPU */
420 uasm_i_mfc0(&p
, T0
, scratch_tmp
[0], scratch_tmp
[1]);
421 UASM_i_SW(&p
, T0
, offsetof(struct kvm_vcpu_arch
, gprs
[K1
]), K1
);
423 /* Now that context has been saved, we can use other registers */
426 uasm_i_mfc0(&p
, A1
, scratch_vcpu
[0], scratch_vcpu
[1]);
427 uasm_i_move(&p
, S1
, A1
);
429 /* Restore run (vcpu->run) */
430 UASM_i_LW(&p
, A0
, offsetof(struct kvm_vcpu
, run
), A1
);
431 /* Save pointer to run in s0, will be saved by the compiler */
432 uasm_i_move(&p
, S0
, A0
);
435 * Save Host level EPC, BadVaddr and Cause to VCPU, useful to process
438 uasm_i_mfc0(&p
, K0
, C0_EPC
);
439 UASM_i_SW(&p
, K0
, offsetof(struct kvm_vcpu_arch
, pc
), K1
);
441 uasm_i_mfc0(&p
, K0
, C0_BADVADDR
);
442 UASM_i_SW(&p
, K0
, offsetof(struct kvm_vcpu_arch
, host_cp0_badvaddr
),
445 uasm_i_mfc0(&p
, K0
, C0_CAUSE
);
446 uasm_i_sw(&p
, K0
, offsetof(struct kvm_vcpu_arch
, host_cp0_cause
), K1
);
448 /* Now restore the host state just enough to run the handlers */
450 /* Switch EBASE to the one used by Linux */
451 /* load up the host EBASE */
452 uasm_i_mfc0(&p
, V0
, C0_STATUS
);
454 uasm_i_lui(&p
, AT
, ST0_BEV
>> 16);
455 uasm_i_or(&p
, K0
, V0
, AT
);
457 uasm_i_mtc0(&p
, K0
, C0_STATUS
);
460 UASM_i_LA_mostly(&p
, K0
, (long)&ebase
);
461 UASM_i_LW(&p
, K0
, uasm_rel_lo((long)&ebase
), K0
);
462 uasm_i_mtc0(&p
, K0
, C0_EBASE
);
464 if (raw_cpu_has_fpu
) {
466 * If FPU is enabled, save FCR31 and clear it so that later
467 * ctc1's don't trigger FPE for pending exceptions.
469 uasm_i_lui(&p
, AT
, ST0_CU1
>> 16);
470 uasm_i_and(&p
, V1
, V0
, AT
);
471 uasm_il_beqz(&p
, &r
, V1
, label_fpu_1
);
473 uasm_i_cfc1(&p
, T0
, 31);
474 uasm_i_sw(&p
, T0
, offsetof(struct kvm_vcpu_arch
, fpu
.fcr31
),
476 uasm_i_ctc1(&p
, ZERO
, 31);
482 * If MSA is enabled, save MSACSR and clear it so that later
483 * instructions don't trigger MSAFPE for pending exceptions.
485 uasm_i_mfc0(&p
, T0
, C0_CONFIG5
);
486 uasm_i_ext(&p
, T0
, T0
, 27, 1); /* MIPS_CONF5_MSAEN */
487 uasm_il_beqz(&p
, &r
, T0
, label_msa_1
);
489 uasm_i_cfcmsa(&p
, T0
, MSA_CSR
);
490 uasm_i_sw(&p
, T0
, offsetof(struct kvm_vcpu_arch
, fpu
.msacsr
),
492 uasm_i_ctcmsa(&p
, MSA_CSR
, ZERO
);
496 /* Now that the new EBASE has been loaded, unset BEV and KSU_USER */
497 uasm_i_addiu(&p
, AT
, ZERO
, ~(ST0_EXL
| KSU_USER
| ST0_IE
));
498 uasm_i_and(&p
, V0
, V0
, AT
);
499 uasm_i_lui(&p
, AT
, ST0_CU0
>> 16);
500 uasm_i_or(&p
, V0
, V0
, AT
);
501 uasm_i_mtc0(&p
, V0
, C0_STATUS
);
504 /* Load up host GP */
505 UASM_i_LW(&p
, GP
, offsetof(struct kvm_vcpu_arch
, host_gp
), K1
);
507 /* Need a stack before we can jump to "C" */
508 UASM_i_LW(&p
, SP
, offsetof(struct kvm_vcpu_arch
, host_stack
), K1
);
510 /* Saved host state */
511 uasm_i_addiu(&p
, SP
, SP
, -(int)sizeof(struct pt_regs
));
514 * XXXKYMA do we need to load the host ASID, maybe not because the
515 * kernel entries are marked GLOBAL, need to verify
518 /* Restore host scratch registers, as we'll have clobbered them */
519 kvm_mips_build_restore_scratch(&p
, K0
, SP
);
521 /* Restore RDHWR access */
522 UASM_i_LA_mostly(&p
, K0
, (long)&hwrena
);
523 uasm_i_lw(&p
, K0
, uasm_rel_lo((long)&hwrena
), K0
);
524 uasm_i_mtc0(&p
, K0
, C0_HWRENA
);
526 /* Jump to handler */
528 * XXXKYMA: not sure if this is safe, how large is the stack??
529 * Now jump to the kvm_mips_handle_exit() to see if we can deal
530 * with this in the kernel
532 UASM_i_LA(&p
, T9
, (unsigned long)kvm_mips_handle_exit
);
533 uasm_i_jalr(&p
, RA
, T9
);
534 uasm_i_addiu(&p
, SP
, SP
, -CALLFRAME_SIZ
);
536 uasm_resolve_relocs(relocs
, labels
);
538 p
= kvm_mips_build_ret_from_exit(p
);
544 * kvm_mips_build_ret_from_exit() - Assemble guest exit return handler.
545 * @addr: Address to start writing code.
547 * Assemble the code to handle the return from kvm_mips_handle_exit(), either
548 * resuming the guest or returning to the host depending on the return value.
550 * Returns: Next address after end of written function.
552 static void *kvm_mips_build_ret_from_exit(void *addr
)
555 struct uasm_label labels
[2];
556 struct uasm_reloc relocs
[2];
557 struct uasm_label
*l
= labels
;
558 struct uasm_reloc
*r
= relocs
;
560 memset(labels
, 0, sizeof(labels
));
561 memset(relocs
, 0, sizeof(relocs
));
563 /* Return from handler Make sure interrupts are disabled */
568 * XXXKYMA: k0/k1 could have been blown away if we processed
569 * an exception while we were handling the exception from the
573 uasm_i_move(&p
, K1
, S1
);
574 uasm_i_addiu(&p
, K1
, K1
, offsetof(struct kvm_vcpu
, arch
));
577 * Check return value, should tell us if we are returning to the
578 * host (handle I/O etc)or resuming the guest
580 uasm_i_andi(&p
, T0
, V0
, RESUME_HOST
);
581 uasm_il_bnez(&p
, &r
, T0
, label_return_to_host
);
584 p
= kvm_mips_build_ret_to_guest(p
);
586 uasm_l_return_to_host(&l
, p
);
587 p
= kvm_mips_build_ret_to_host(p
);
589 uasm_resolve_relocs(relocs
, labels
);
595 * kvm_mips_build_ret_to_guest() - Assemble code to return to the guest.
596 * @addr: Address to start writing code.
598 * Assemble the code to handle return from the guest exit handler
599 * (kvm_mips_handle_exit()) back to the guest.
601 * Returns: Next address after end of written function.
603 static void *kvm_mips_build_ret_to_guest(void *addr
)
607 /* Put the saved pointer to vcpu (s1) back into the scratch register */
608 uasm_i_mtc0(&p
, S1
, scratch_vcpu
[0], scratch_vcpu
[1]);
610 /* Load up the Guest EBASE to minimize the window where BEV is set */
611 UASM_i_LW(&p
, T0
, offsetof(struct kvm_vcpu_arch
, guest_ebase
), K1
);
613 /* Switch EBASE back to the one used by KVM */
614 uasm_i_mfc0(&p
, V1
, C0_STATUS
);
615 uasm_i_lui(&p
, AT
, ST0_BEV
>> 16);
616 uasm_i_or(&p
, K0
, V1
, AT
);
617 uasm_i_mtc0(&p
, K0
, C0_STATUS
);
619 uasm_i_mtc0(&p
, T0
, C0_EBASE
);
621 /* Setup status register for running guest in UM */
622 uasm_i_ori(&p
, V1
, V1
, ST0_EXL
| KSU_USER
| ST0_IE
);
623 UASM_i_LA(&p
, AT
, ~(ST0_CU0
| ST0_MX
));
624 uasm_i_and(&p
, V1
, V1
, AT
);
625 uasm_i_mtc0(&p
, V1
, C0_STATUS
);
628 p
= kvm_mips_build_enter_guest(p
);
634 * kvm_mips_build_ret_to_host() - Assemble code to return to the host.
635 * @addr: Address to start writing code.
637 * Assemble the code to handle return from the guest exit handler
638 * (kvm_mips_handle_exit()) back to the host, i.e. to the caller of the vcpu_run
639 * function generated by kvm_mips_build_vcpu_run().
641 * Returns: Next address after end of written function.
643 static void *kvm_mips_build_ret_to_host(void *addr
)
648 /* EBASE is already pointing to Linux */
649 UASM_i_LW(&p
, K1
, offsetof(struct kvm_vcpu_arch
, host_stack
), K1
);
650 uasm_i_addiu(&p
, K1
, K1
, -(int)sizeof(struct pt_regs
));
653 * r2/v0 is the return code, shift it down by 2 (arithmetic)
654 * to recover the err code
656 uasm_i_sra(&p
, K0
, V0
, 2);
657 uasm_i_move(&p
, V0
, K0
);
659 /* Load context saved on the host stack */
660 for (i
= 16; i
< 31; ++i
) {
663 UASM_i_LW(&p
, i
, offsetof(struct pt_regs
, regs
[i
]), K1
);
666 UASM_i_LW(&p
, K0
, offsetof(struct pt_regs
, hi
), K1
);
669 UASM_i_LW(&p
, K0
, offsetof(struct pt_regs
, lo
), K1
);
672 /* Restore RDHWR access */
673 UASM_i_LA_mostly(&p
, K0
, (long)&hwrena
);
674 uasm_i_lw(&p
, K0
, uasm_rel_lo((long)&hwrena
), K0
);
675 uasm_i_mtc0(&p
, K0
, C0_HWRENA
);
677 /* Restore RA, which is the address we will return to */
678 UASM_i_LW(&p
, RA
, offsetof(struct pt_regs
, regs
[RA
]), K1
);
This page took 0.061392 seconds and 4 git commands to generate.