Skip to content

Commit

Permalink
Add Cserve_Get_VM_Time
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Henderson <rth@twiddle.net>
  • Loading branch information
rth7680 committed Jul 16, 2013
1 parent 25b1ca4 commit c87a926
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pal.S
Expand Up @@ -446,7 +446,7 @@ ENDFN CallPal_OpcDec08
CallPal_Cserve:
// Most of the entries are densely clustered around 0.
mov 0, v0
cmpule a0, 6, p0
cmpule a0, 7, p0
cmovne p0, a0, v0
br p0, 1f
1: lda p0, Cserve_Table-1b(p0)
Expand Down Expand Up @@ -480,13 +480,18 @@ Cserve_Get_Alarm:
ENDFN Cserve_Get_Alarm
Cserve_Set_Alarm_Rel:
// Cheating here: create the absolute time and fall thru.
mfpr p0, qemu_walltime
mfpr p0, qemu_vmtime
addq p0, a1, a1
ENDFN Cserve_Set_Alarm_Rel
Cserve_Set_Alarm_Abs:
mtpr a1, qemu_alarm
hw_rei
ENDFN Cserve_Set_Alarm_Abs
Cserve_Get_VM_Time:
mfpr v0, qemu_vmtime
hw_rei
ENDFN Cserve_Get_VM_Time


CallPal_Cserve_Cont:
// ??? For SRM compatibility and their use within Linux, use 52/53
Expand Down
1 change: 1 addition & 0 deletions pal.h
Expand Up @@ -109,6 +109,7 @@
#define qemu_halt 252
#define qemu_alarm 251
#define qemu_walltime 250
#define qemu_vmtime 249

/* PALcode uses of the private storage slots. */
#define ptEntUna pt0
Expand Down

0 comments on commit c87a926

Please sign in to comment.