forked from Imagelibrary/rtems
score/sparc: Add support for paravirtualization
Guest systems in paravirtualization environments run usually in user mode. Thus it is not possible to directly access the PSR and TBR registers. Use functions instead of inline assembler to access these registers if RTEMS_PARAVIRT is defined.
This commit is contained in:
committed by
Sebastian Huber
parent
98f2d5c505
commit
8df1f408fd
@@ -83,4 +83,40 @@ SYM(sparc_syscall_exit):
|
||||
mov %o1, %g3 ! Additional exit code 2
|
||||
ta 0
|
||||
|
||||
#if defined(RTEMS_PARAVIRT)
|
||||
|
||||
PUBLIC(_SPARC_Get_PSR)
|
||||
|
||||
SYM(_SPARC_Get_PSR):
|
||||
|
||||
retl
|
||||
rd %psr, %o0
|
||||
|
||||
PUBLIC(_SPARC_Set_PSR)
|
||||
|
||||
SYM(_SPARC_Set_PSR):
|
||||
|
||||
mov %o0, %psr
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
retl
|
||||
nop
|
||||
|
||||
PUBLIC(_SPARC_Get_TBR)
|
||||
|
||||
SYM(_SPARC_Get_TBR):
|
||||
|
||||
retl
|
||||
rd %tbr, %o0
|
||||
|
||||
PUBLIC(_SPARC_Set_TBR)
|
||||
|
||||
SYM(_SPARC_Set_TBR):
|
||||
|
||||
retl
|
||||
wr %o0, 0, %tbr
|
||||
|
||||
#endif /* defined(RTEMS_PARAVIRT) */
|
||||
|
||||
/* end of file */
|
||||
|
||||
Reference in New Issue
Block a user