1*4ab777b1Swh94709/* 2*4ab777b1Swh94709 * CDDL HEADER START 3*4ab777b1Swh94709 * 4*4ab777b1Swh94709 * The contents of this file are subject to the terms of the 5*4ab777b1Swh94709 * Common Development and Distribution License (the "License"). 6*4ab777b1Swh94709 * You may not use this file except in compliance with the License. 7*4ab777b1Swh94709 * 8*4ab777b1Swh94709 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*4ab777b1Swh94709 * or http://www.opensolaris.org/os/licensing. 10*4ab777b1Swh94709 * See the License for the specific language governing permissions 11*4ab777b1Swh94709 * and limitations under the License. 12*4ab777b1Swh94709 * 13*4ab777b1Swh94709 * When distributing Covered Code, include this CDDL HEADER in each 14*4ab777b1Swh94709 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*4ab777b1Swh94709 * If applicable, add the following below this CDDL HEADER, with the 16*4ab777b1Swh94709 * fields enclosed by brackets "[]" replaced with your own identifying 17*4ab777b1Swh94709 * information: Portions Copyright [yyyy] [name of copyright owner] 18*4ab777b1Swh94709 * 19*4ab777b1Swh94709 * CDDL HEADER END 20*4ab777b1Swh94709 */ 21*4ab777b1Swh94709/* 22*4ab777b1Swh94709 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23*4ab777b1Swh94709 * Use is subject to license terms. 24*4ab777b1Swh94709 */ 25*4ab777b1Swh94709 26*4ab777b1Swh94709#pragma ident "%Z%%M% %I% %E% SMI" 27*4ab777b1Swh94709 28*4ab777b1Swh94709/* 29*4ab777b1Swh94709 * Hypervisor calls called by glvc driver. 30*4ab777b1Swh94709*/ 31*4ab777b1Swh94709 32*4ab777b1Swh94709#include <sys/asm_linkage.h> 33*4ab777b1Swh94709#include <sys/hypervisor_api.h> 34*4ab777b1Swh94709#include <sys/glvc.h> 35*4ab777b1Swh94709 36*4ab777b1Swh94709#if defined(lint) || defined(__lint) 37*4ab777b1Swh94709 38*4ab777b1Swh94709/*ARGSUSED*/ 39*4ab777b1Swh94709uint64_t 40*4ab777b1Swh94709hv_service_recv(uint64_t s_id, uint64_t buf_pa, uint64_t size, 41*4ab777b1Swh94709 uint64_t *recv_bytes) 42*4ab777b1Swh94709{ return (0); } 43*4ab777b1Swh94709 44*4ab777b1Swh94709/*ARGSUSED*/ 45*4ab777b1Swh94709uint64_t 46*4ab777b1Swh94709hv_service_send(uint64_t s_id, uint64_t buf_pa, uint64_t size, 47*4ab777b1Swh94709 uint64_t *send_bytes) 48*4ab777b1Swh94709{ return (0); } 49*4ab777b1Swh94709 50*4ab777b1Swh94709/*ARGSUSED*/ 51*4ab777b1Swh94709uint64_t 52*4ab777b1Swh94709hv_service_getstatus(uint64_t s_id, uint64_t *vreg) 53*4ab777b1Swh94709{ return (0); } 54*4ab777b1Swh94709 55*4ab777b1Swh94709/*ARGSUSED*/ 56*4ab777b1Swh94709uint64_t 57*4ab777b1Swh94709hv_service_setstatus(uint64_t s_id, uint64_t bits) 58*4ab777b1Swh94709{ return (0); } 59*4ab777b1Swh94709 60*4ab777b1Swh94709/*ARGSUSED*/ 61*4ab777b1Swh94709uint64_t 62*4ab777b1Swh94709hv_service_clrstatus(uint64_t s_id, uint64_t bits) 63*4ab777b1Swh94709{ return (0); } 64*4ab777b1Swh94709 65*4ab777b1Swh94709#else /* lint || __lint */ 66*4ab777b1Swh94709 67*4ab777b1Swh94709 /* 68*4ab777b1Swh94709 * hv_service_recv(uint64_t s_id, uint64_t buf_pa, 69*4ab777b1Swh94709 * uint64_t size, uint64_t *recv_bytes); 70*4ab777b1Swh94709 */ 71*4ab777b1Swh94709 ENTRY(hv_service_recv) 72*4ab777b1Swh94709 save %sp, -SA(MINFRAME), %sp 73*4ab777b1Swh94709 mov %i0, %o0 74*4ab777b1Swh94709 mov %i1, %o1 75*4ab777b1Swh94709 mov %i2, %o2 76*4ab777b1Swh94709 mov %i3, %o3 77*4ab777b1Swh94709 mov SVC_RECV, %o5 78*4ab777b1Swh94709 ta FAST_TRAP 79*4ab777b1Swh94709 brnz %o0, 1f 80*4ab777b1Swh94709 mov %o0, %i0 81*4ab777b1Swh94709 stx %o1, [%i3] 82*4ab777b1Swh947091: 83*4ab777b1Swh94709 ret 84*4ab777b1Swh94709 restore 85*4ab777b1Swh94709 SET_SIZE(hv_service_recv) 86*4ab777b1Swh94709 87*4ab777b1Swh94709 /* 88*4ab777b1Swh94709 * hv_service_send(uint64_t s_id, uint64_t buf_pa, 89*4ab777b1Swh94709 * uint64_t size, uint64_t *recv_bytes); 90*4ab777b1Swh94709 */ 91*4ab777b1Swh94709 ENTRY(hv_service_send) 92*4ab777b1Swh94709 save %sp, -SA(MINFRAME), %sp 93*4ab777b1Swh94709 mov %i0, %o0 94*4ab777b1Swh94709 mov %i1, %o1 95*4ab777b1Swh94709 mov %i2, %o2 96*4ab777b1Swh94709 mov %i3, %o3 97*4ab777b1Swh94709 mov SVC_SEND, %o5 98*4ab777b1Swh94709 ta FAST_TRAP 99*4ab777b1Swh94709 brnz %o0, 1f 100*4ab777b1Swh94709 mov %o0, %i0 101*4ab777b1Swh94709 stx %o1, [%i3] 102*4ab777b1Swh947091: 103*4ab777b1Swh94709 ret 104*4ab777b1Swh94709 restore 105*4ab777b1Swh94709 SET_SIZE(hv_service_send) 106*4ab777b1Swh94709 107*4ab777b1Swh94709 /* 108*4ab777b1Swh94709 * hv_service_getstatus(uint64_t s_id, uint64_t *vreg); 109*4ab777b1Swh94709 */ 110*4ab777b1Swh94709 ENTRY(hv_service_getstatus) 111*4ab777b1Swh94709 mov %o1, %o4 ! save datap 112*4ab777b1Swh94709 mov SVC_GETSTATUS, %o5 113*4ab777b1Swh94709 ta FAST_TRAP 114*4ab777b1Swh94709 brz,a %o0, 1f 115*4ab777b1Swh94709 stx %o1, [%o4] 116*4ab777b1Swh947091: 117*4ab777b1Swh94709 retl 118*4ab777b1Swh94709 nop 119*4ab777b1Swh94709 SET_SIZE(hv_service_getstatus) 120*4ab777b1Swh94709 121*4ab777b1Swh94709 /* 122*4ab777b1Swh94709 * hv_service_setstatus(uint64_t s_id, uint64_t bits); 123*4ab777b1Swh94709 */ 124*4ab777b1Swh94709 ENTRY(hv_service_setstatus) 125*4ab777b1Swh94709 mov SVC_SETSTATUS, %o5 126*4ab777b1Swh94709 ta FAST_TRAP 127*4ab777b1Swh94709 retl 128*4ab777b1Swh94709 nop 129*4ab777b1Swh94709 SET_SIZE(hv_service_setstatus) 130*4ab777b1Swh94709 131*4ab777b1Swh94709 /* 132*4ab777b1Swh94709 * hv_service_clrstatus(uint64_t s_id, uint64_t bits); 133*4ab777b1Swh94709 */ 134*4ab777b1Swh94709 ENTRY(hv_service_clrstatus) 135*4ab777b1Swh94709 mov SVC_CLRSTATUS, %o5 136*4ab777b1Swh94709 ta FAST_TRAP 137*4ab777b1Swh94709 retl 138*4ab777b1Swh94709 nop 139*4ab777b1Swh94709 SET_SIZE(hv_service_clrstatus) 140*4ab777b1Swh94709 141*4ab777b1Swh94709#endif /* lint || __lint */ 142