81 lines · plain
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 .text11 12ENTRY(sun4v_rng_get_diag_ctl)13 mov HV_FAST_RNG_GET_DIAG_CTL, %o514 ta HV_FAST_TRAP15 retl16 nop17ENDPROC(sun4v_rng_get_diag_ctl)18 19ENTRY(sun4v_rng_ctl_read_v1)20 mov %o1, %o321 mov %o2, %o422 mov HV_FAST_RNG_CTL_READ, %o523 ta HV_FAST_TRAP24 stx %o1, [%o3]25 retl26 stx %o2, [%o4]27ENDPROC(sun4v_rng_ctl_read_v1)28 29ENTRY(sun4v_rng_ctl_read_v2)30 save %sp, -192, %sp31 mov %i0, %o032 mov %i1, %o133 mov HV_FAST_RNG_CTL_READ, %o534 ta HV_FAST_TRAP35 stx %o1, [%i2]36 stx %o2, [%i3]37 stx %o3, [%i4]38 stx %o4, [%i5]39 ret40 restore %g0, %o0, %o041ENDPROC(sun4v_rng_ctl_read_v2)42 43ENTRY(sun4v_rng_ctl_write_v1)44 mov %o3, %o445 mov HV_FAST_RNG_CTL_WRITE, %o546 ta HV_FAST_TRAP47 retl48 stx %o1, [%o4]49ENDPROC(sun4v_rng_ctl_write_v1)50 51ENTRY(sun4v_rng_ctl_write_v2)52 mov HV_FAST_RNG_CTL_WRITE, %o553 ta HV_FAST_TRAP54 retl55 nop56ENDPROC(sun4v_rng_ctl_write_v2)57 58ENTRY(sun4v_rng_data_read_diag_v1)59 mov %o2, %o460 mov HV_FAST_RNG_DATA_READ_DIAG, %o561 ta HV_FAST_TRAP62 retl63 stx %o1, [%o4]64ENDPROC(sun4v_rng_data_read_diag_v1)65 66ENTRY(sun4v_rng_data_read_diag_v2)67 mov %o3, %o468 mov HV_FAST_RNG_DATA_READ_DIAG, %o569 ta HV_FAST_TRAP70 retl71 stx %o1, [%o4]72ENDPROC(sun4v_rng_data_read_diag_v2)73 74ENTRY(sun4v_rng_data_read)75 mov %o1, %o476 mov HV_FAST_RNG_DATA_READ, %o577 ta HV_FAST_TRAP78 retl79 stx %o1, [%o4]80ENDPROC(sun4v_rng_data_read)81