60 lines
1.2 KiB
ArmAsm
60 lines
1.2 KiB
ArmAsm
#if 0
|
|
.section .hypervisor.interrupt, "ax"
|
|
.global _hypervisor_inth
|
|
|
|
.align 2
|
|
_hypervisor_inth:
|
|
/* save interrupt related information */
|
|
sts.l mach, @-r15
|
|
sts.l macl, @-r15
|
|
stc.l gbr, @-r15
|
|
stc.l spc, @-r15
|
|
stc.l ssr, @-r15
|
|
sts.l pr, @-r15
|
|
|
|
/* check manually the keyboard status to see if the we need to
|
|
perform a world switch */
|
|
mov.l hypervisor_wswitch_check, r0
|
|
jsr @r0
|
|
nop
|
|
mov.l r0, @-r15
|
|
|
|
/* involve the "real" vbr handler */
|
|
mov.l hypervisor_inth_second_part, r0
|
|
ldc r0, vbr
|
|
mov.l hypervisor_current_vbr, r0
|
|
mov.l @r0, r0
|
|
mov #0x06, r1
|
|
shll8 r1
|
|
add r1, r0
|
|
jsr @r0
|
|
nop
|
|
|
|
hypervisor_inth_prologue:
|
|
/* check if world switch is requested */
|
|
mov.l @r15+, r0
|
|
tst r0, r0
|
|
bf.s hypervisor_inth_exit
|
|
mov.l hypervisor_wswitch, r0
|
|
jsr @r0
|
|
nop
|
|
|
|
|
|
hypervisor_inth_exit:
|
|
/* restore the saved information */
|
|
lds.l @r15+, pr
|
|
ldc.l @r15+, ssr
|
|
ldc.l @r15+, spc
|
|
ldc.l @r15+, gbr
|
|
lds.l @r15+, macl
|
|
rte
|
|
lds.l @r15+, mach
|
|
|
|
.align 4
|
|
hypervisor_wswitch_check: .long _hypervisor_worldswitch_check
|
|
hypervisor_wswitch: .long _hypervisor_worldswitch
|
|
hypervisor_current_vbr: .long _hypervisor_current_vbr
|
|
hypervisor_vbr: .long _hypervisor_vbr
|
|
hypervisor_inth_second_part: .long hypervisor_inth_prologue
|
|
#endif
|