1*11304SJanie.Lu@Sun.COM/* 2*11304SJanie.Lu@Sun.COM * CDDL HEADER START 3*11304SJanie.Lu@Sun.COM * 4*11304SJanie.Lu@Sun.COM * The contents of this file are subject to the terms of the 5*11304SJanie.Lu@Sun.COM * Common Development and Distribution License (the "License"). 6*11304SJanie.Lu@Sun.COM * You may not use this file except in compliance with the License. 7*11304SJanie.Lu@Sun.COM * 8*11304SJanie.Lu@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*11304SJanie.Lu@Sun.COM * or http://www.opensolaris.org/os/licensing. 10*11304SJanie.Lu@Sun.COM * See the License for the specific language governing permissions 11*11304SJanie.Lu@Sun.COM * and limitations under the License. 12*11304SJanie.Lu@Sun.COM * 13*11304SJanie.Lu@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 14*11304SJanie.Lu@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*11304SJanie.Lu@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 16*11304SJanie.Lu@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 17*11304SJanie.Lu@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 18*11304SJanie.Lu@Sun.COM * 19*11304SJanie.Lu@Sun.COM * CDDL HEADER END 20*11304SJanie.Lu@Sun.COM */ 21*11304SJanie.Lu@Sun.COM 22*11304SJanie.Lu@Sun.COM/* 23*11304SJanie.Lu@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24*11304SJanie.Lu@Sun.COM * Use is subject to license terms. 25*11304SJanie.Lu@Sun.COM */ 26*11304SJanie.Lu@Sun.COM 27*11304SJanie.Lu@Sun.COM/* 28*11304SJanie.Lu@Sun.COM * Hypervisor calls called by ds_pri driver. 29*11304SJanie.Lu@Sun.COM */ 30*11304SJanie.Lu@Sun.COM 31*11304SJanie.Lu@Sun.COM#include <sys/asm_linkage.h> 32*11304SJanie.Lu@Sun.COM#include <sys/hypervisor_api.h> 33*11304SJanie.Lu@Sun.COM 34*11304SJanie.Lu@Sun.COM#if defined(lint) || defined(__lint) 35*11304SJanie.Lu@Sun.COM 36*11304SJanie.Lu@Sun.COM/*ARGSUSED*/ 37*11304SJanie.Lu@Sun.COMuint64_t 38*11304SJanie.Lu@Sun.COMhv_mach_pri(uint64_t buffer_ra, uint64_t *buffer_sizep) 39*11304SJanie.Lu@Sun.COM{ return (0); } 40*11304SJanie.Lu@Sun.COM 41*11304SJanie.Lu@Sun.COM#else /* lint || __lint */ 42*11304SJanie.Lu@Sun.COM 43*11304SJanie.Lu@Sun.COM /* 44*11304SJanie.Lu@Sun.COM * MACH_PRI 45*11304SJanie.Lu@Sun.COM * arg0 buffer real address 46*11304SJanie.Lu@Sun.COM * arg1 pointer to uint64_t for size of buffer 47*11304SJanie.Lu@Sun.COM * ret0 status 48*11304SJanie.Lu@Sun.COM * ret1 return required size of buffer / returned data size 49*11304SJanie.Lu@Sun.COM */ 50*11304SJanie.Lu@Sun.COM ENTRY(hv_mach_pri) 51*11304SJanie.Lu@Sun.COM mov %o1, %o4 ! save datap 52*11304SJanie.Lu@Sun.COM ldx [%o1], %o1 53*11304SJanie.Lu@Sun.COM mov HV_MACH_PRI, %o5 54*11304SJanie.Lu@Sun.COM ta FAST_TRAP 55*11304SJanie.Lu@Sun.COM retl 56*11304SJanie.Lu@Sun.COM stx %o1, [%o4] 57*11304SJanie.Lu@Sun.COM SET_SIZE(hv_mach_pri) 58*11304SJanie.Lu@Sun.COM 59*11304SJanie.Lu@Sun.COM#endif /* lint || __lint */ 60