-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With feedback and suggestions from Sam Ravnborg. Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
David S. Miller
committed
Jul 18, 2008
1 parent
432e876
commit ce08715
Showing
5 changed files
with
983 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* n2-asm.S: Niagara2 RNG hypervisor call assembler. | ||
* | ||
* Copyright (C) 2008 David S. Miller <davem@davemloft.net> | ||
*/ | ||
#include <linux/linkage.h> | ||
#include <asm/hypervisor.h> | ||
#include "n2rng.h" | ||
|
||
.text | ||
|
||
ENTRY(sun4v_rng_get_diag_ctl) | ||
mov HV_FAST_RNG_GET_DIAG_CTL, %o5 | ||
ta HV_FAST_TRAP | ||
retl | ||
nop | ||
ENDPROC(sun4v_rng_get_diag_ctl) | ||
|
||
ENTRY(sun4v_rng_ctl_read_v1) | ||
mov %o1, %o3 | ||
mov %o2, %o4 | ||
mov HV_FAST_RNG_CTL_READ, %o5 | ||
ta HV_FAST_TRAP | ||
stx %o1, [%o3] | ||
retl | ||
stx %o2, [%o4] | ||
ENDPROC(sun4v_rng_ctl_read_v1) | ||
|
||
ENTRY(sun4v_rng_ctl_read_v2) | ||
save %sp, -192, %sp | ||
mov %i0, %o0 | ||
mov %i1, %o1 | ||
mov HV_FAST_RNG_CTL_READ, %o5 | ||
ta HV_FAST_TRAP | ||
stx %o1, [%i2] | ||
stx %o2, [%i3] | ||
stx %o3, [%i4] | ||
stx %o4, [%i5] | ||
ret | ||
restore %g0, %o0, %o0 | ||
ENDPROC(sun4v_rng_ctl_read_v2) | ||
|
||
ENTRY(sun4v_rng_ctl_write_v1) | ||
mov %o3, %o4 | ||
mov HV_FAST_RNG_CTL_WRITE, %o5 | ||
ta HV_FAST_TRAP | ||
retl | ||
stx %o1, [%o4] | ||
ENDPROC(sun4v_rng_ctl_write_v1) | ||
|
||
ENTRY(sun4v_rng_ctl_write_v2) | ||
mov HV_FAST_RNG_CTL_WRITE, %o5 | ||
ta HV_FAST_TRAP | ||
retl | ||
nop | ||
ENDPROC(sun4v_rng_ctl_write_v2) | ||
|
||
ENTRY(sun4v_rng_data_read_diag_v1) | ||
mov %o2, %o4 | ||
mov HV_FAST_RNG_DATA_READ_DIAG, %o5 | ||
ta HV_FAST_TRAP | ||
retl | ||
stx %o1, [%o4] | ||
ENDPROC(sun4v_rng_data_read_diag_v1) | ||
|
||
ENTRY(sun4v_rng_data_read_diag_v2) | ||
mov %o3, %o4 | ||
mov HV_FAST_RNG_DATA_READ_DIAG, %o5 | ||
ta HV_FAST_TRAP | ||
retl | ||
stx %o1, [%o4] | ||
ENDPROC(sun4v_rng_data_read_diag_v2) | ||
|
||
ENTRY(sun4v_rng_data_read) | ||
mov %o1, %o4 | ||
mov HV_FAST_RNG_DATA_READ, %o5 | ||
ta HV_FAST_TRAP | ||
retl | ||
stx %o1, [%o4] | ||
ENDPROC(sun4v_rng_data_read) |
Oops, something went wrong.