Linux Audio

Check our new training course

Loading...
v6.8
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/* n2-asm.S: Niagara2 RNG hypervisor call assembler.
 3 *
 4 * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
 5 */
 6#include <linux/linkage.h>
 7#include <asm/hypervisor.h>
 8#include "n2rng.h"
 9
10	.text
11
12ENTRY(sun4v_rng_get_diag_ctl)
13	mov	HV_FAST_RNG_GET_DIAG_CTL, %o5
14	ta	HV_FAST_TRAP
15	retl
16	 nop
17ENDPROC(sun4v_rng_get_diag_ctl)
18
19ENTRY(sun4v_rng_ctl_read_v1)
20	mov	%o1, %o3
21	mov	%o2, %o4
22	mov	HV_FAST_RNG_CTL_READ, %o5
23	ta	HV_FAST_TRAP
24	stx	%o1, [%o3]
25	retl
26	 stx	%o2, [%o4]
27ENDPROC(sun4v_rng_ctl_read_v1)
28
29ENTRY(sun4v_rng_ctl_read_v2)
30	save	%sp, -192, %sp
31	mov	%i0, %o0
32	mov	%i1, %o1
33	mov	HV_FAST_RNG_CTL_READ, %o5
34	ta	HV_FAST_TRAP
35	stx	%o1, [%i2]
36	stx	%o2, [%i3]
37	stx	%o3, [%i4]
38	stx	%o4, [%i5]
39	ret
40	restore	%g0, %o0, %o0
41ENDPROC(sun4v_rng_ctl_read_v2)
42
43ENTRY(sun4v_rng_ctl_write_v1)
44	mov	%o3, %o4
45	mov	HV_FAST_RNG_CTL_WRITE, %o5
46	ta	HV_FAST_TRAP
47	retl
48	 stx	%o1, [%o4]
49ENDPROC(sun4v_rng_ctl_write_v1)
50
51ENTRY(sun4v_rng_ctl_write_v2)
52	mov	HV_FAST_RNG_CTL_WRITE, %o5
53	ta	HV_FAST_TRAP
54	retl
55	 nop
56ENDPROC(sun4v_rng_ctl_write_v2)
57
58ENTRY(sun4v_rng_data_read_diag_v1)
59	mov	%o2, %o4
60	mov	HV_FAST_RNG_DATA_READ_DIAG, %o5
61	ta	HV_FAST_TRAP
62	retl
63	 stx	%o1, [%o4]
64ENDPROC(sun4v_rng_data_read_diag_v1)
65
66ENTRY(sun4v_rng_data_read_diag_v2)
67	mov	%o3, %o4
68	mov	HV_FAST_RNG_DATA_READ_DIAG, %o5
69	ta	HV_FAST_TRAP
70	retl
71	 stx	%o1, [%o4]
72ENDPROC(sun4v_rng_data_read_diag_v2)
73
74ENTRY(sun4v_rng_data_read)
75	mov	%o1, %o4
76	mov	HV_FAST_RNG_DATA_READ, %o5
77	ta	HV_FAST_TRAP
78	retl
79	 stx	%o1, [%o4]
80ENDPROC(sun4v_rng_data_read)
v4.10.11
 
 1/* n2-asm.S: Niagara2 RNG hypervisor call assembler.
 2 *
 3 * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
 4 */
 5#include <linux/linkage.h>
 6#include <asm/hypervisor.h>
 7#include "n2rng.h"
 8
 9	.text
10
11ENTRY(sun4v_rng_get_diag_ctl)
12	mov	HV_FAST_RNG_GET_DIAG_CTL, %o5
13	ta	HV_FAST_TRAP
14	retl
15	 nop
16ENDPROC(sun4v_rng_get_diag_ctl)
17
18ENTRY(sun4v_rng_ctl_read_v1)
19	mov	%o1, %o3
20	mov	%o2, %o4
21	mov	HV_FAST_RNG_CTL_READ, %o5
22	ta	HV_FAST_TRAP
23	stx	%o1, [%o3]
24	retl
25	 stx	%o2, [%o4]
26ENDPROC(sun4v_rng_ctl_read_v1)
27
28ENTRY(sun4v_rng_ctl_read_v2)
29	save	%sp, -192, %sp
30	mov	%i0, %o0
31	mov	%i1, %o1
32	mov	HV_FAST_RNG_CTL_READ, %o5
33	ta	HV_FAST_TRAP
34	stx	%o1, [%i2]
35	stx	%o2, [%i3]
36	stx	%o3, [%i4]
37	stx	%o4, [%i5]
38	ret
39	restore	%g0, %o0, %o0
40ENDPROC(sun4v_rng_ctl_read_v2)
41
42ENTRY(sun4v_rng_ctl_write_v1)
43	mov	%o3, %o4
44	mov	HV_FAST_RNG_CTL_WRITE, %o5
45	ta	HV_FAST_TRAP
46	retl
47	 stx	%o1, [%o4]
48ENDPROC(sun4v_rng_ctl_write_v1)
49
50ENTRY(sun4v_rng_ctl_write_v2)
51	mov	HV_FAST_RNG_CTL_WRITE, %o5
52	ta	HV_FAST_TRAP
53	retl
54	 nop
55ENDPROC(sun4v_rng_ctl_write_v2)
56
57ENTRY(sun4v_rng_data_read_diag_v1)
58	mov	%o2, %o4
59	mov	HV_FAST_RNG_DATA_READ_DIAG, %o5
60	ta	HV_FAST_TRAP
61	retl
62	 stx	%o1, [%o4]
63ENDPROC(sun4v_rng_data_read_diag_v1)
64
65ENTRY(sun4v_rng_data_read_diag_v2)
66	mov	%o3, %o4
67	mov	HV_FAST_RNG_DATA_READ_DIAG, %o5
68	ta	HV_FAST_TRAP
69	retl
70	 stx	%o1, [%o4]
71ENDPROC(sun4v_rng_data_read_diag_v2)
72
73ENTRY(sun4v_rng_data_read)
74	mov	%o1, %o4
75	mov	HV_FAST_RNG_DATA_READ, %o5
76	ta	HV_FAST_TRAP
77	retl
78	 stx	%o1, [%o4]
79ENDPROC(sun4v_rng_data_read)