17c478bd9Sstevel@tonic-gate/* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 544bb982bSgovinda * Common Development and Distribution License (the "License"). 644bb982bSgovinda * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 211ae08745Sheppo 227c478bd9Sstevel@tonic-gate/* 23*9d0d62adSJason Beloro * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate/* 287c478bd9Sstevel@tonic-gate * Hypervisor calls 297c478bd9Sstevel@tonic-gate */ 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate#include <sys/asm_linkage.h> 327c478bd9Sstevel@tonic-gate#include <sys/machasi.h> 337c478bd9Sstevel@tonic-gate#include <sys/machparam.h> 347c478bd9Sstevel@tonic-gate#include <sys/hypervisor_api.h> 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate#if defined(lint) || defined(__lint) 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 391ae08745Sheppouint64_t 401ae08745Sheppohv_mach_exit(uint64_t exit_code) 411ae08745Sheppo{ return (0); } 421ae08745Sheppo 431ae08745Sheppouint64_t 441ae08745Sheppohv_mach_sir(void) 451ae08745Sheppo{ return (0); } 461ae08745Sheppo 471ae08745Sheppo/*ARGSUSED*/ 481ae08745Sheppouint64_t 491ae08745Sheppohv_cpu_start(uint64_t cpuid, uint64_t pc, uint64_t rtba, uint64_t arg) 501ae08745Sheppo{ return (0); } 511ae08745Sheppo 521ae08745Sheppo/*ARGSUSED*/ 531ae08745Sheppouint64_t 541ae08745Sheppohv_cpu_stop(uint64_t cpuid) 551ae08745Sheppo{ return (0); } 561ae08745Sheppo 571ae08745Sheppo/*ARGSUSED*/ 581ae08745Sheppouint64_t 591ae08745Sheppohv_cpu_set_rtba(uint64_t *rtba) 601ae08745Sheppo{ return (0); } 611ae08745Sheppo 621ae08745Sheppo/*ARGSUSED*/ 637c478bd9Sstevel@tonic-gateint64_t 647c478bd9Sstevel@tonic-gatehv_cnputchar(uint8_t ch) 657c478bd9Sstevel@tonic-gate{ return (0); } 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 687c478bd9Sstevel@tonic-gateint64_t 697c478bd9Sstevel@tonic-gatehv_cngetchar(uint8_t *ch) 707c478bd9Sstevel@tonic-gate{ return (0); } 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 737c478bd9Sstevel@tonic-gateuint64_t 747c478bd9Sstevel@tonic-gatehv_tod_get(uint64_t *seconds) 757c478bd9Sstevel@tonic-gate{ return (0); } 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 787c478bd9Sstevel@tonic-gateuint64_t 797c478bd9Sstevel@tonic-gatehv_tod_set(uint64_t seconds) 807c478bd9Sstevel@tonic-gate{ return (0);} 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 837c478bd9Sstevel@tonic-gateuint64_t 847c478bd9Sstevel@tonic-gatehv_mmu_map_perm_addr(void *vaddr, int ctx, uint64_t tte, int flags) 857c478bd9Sstevel@tonic-gate{ return (0); } 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate/*ARGSUSED */ 887c478bd9Sstevel@tonic-gateuint64_t 891ae08745Sheppohv_mmu_fault_area_conf(void *raddr) 901ae08745Sheppo{ return (0); } 911ae08745Sheppo 921ae08745Sheppo/*ARGSUSED*/ 931ae08745Sheppouint64_t 947c478bd9Sstevel@tonic-gatehv_mmu_unmap_perm_addr(void *vaddr, int ctx, int flags) 957c478bd9Sstevel@tonic-gate{ return (0); } 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 987c478bd9Sstevel@tonic-gateuint64_t 997c478bd9Sstevel@tonic-gatehv_set_ctx0(uint64_t ntsb_descriptor, uint64_t desc_ra) 1007c478bd9Sstevel@tonic-gate{ return (0); } 1017c478bd9Sstevel@tonic-gate 1027c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1037c478bd9Sstevel@tonic-gateuint64_t 1047c478bd9Sstevel@tonic-gatehv_set_ctxnon0(uint64_t ntsb_descriptor, uint64_t desc_ra) 1057c478bd9Sstevel@tonic-gate{ return (0); } 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate#ifdef SET_MMU_STATS 1087c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1097c478bd9Sstevel@tonic-gateuint64_t 1107c478bd9Sstevel@tonic-gatehv_mmu_set_stat_area(uint64_t rstatarea, uint64_t size) 1117c478bd9Sstevel@tonic-gate{ return (0); } 1127c478bd9Sstevel@tonic-gate#endif /* SET_MMU_STATS */ 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1157c478bd9Sstevel@tonic-gateuint64_t 1167c478bd9Sstevel@tonic-gatehv_cpu_qconf(int queue, uint64_t paddr, int size) 1177c478bd9Sstevel@tonic-gate{ return (0); } 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1207c478bd9Sstevel@tonic-gateuint64_t 1217c478bd9Sstevel@tonic-gatehvio_intr_devino_to_sysino(uint64_t dev_hdl, uint32_t devino, uint64_t *sysino) 1227c478bd9Sstevel@tonic-gate{ return (0); } 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1257c478bd9Sstevel@tonic-gateuint64_t 1267c478bd9Sstevel@tonic-gatehvio_intr_getvalid(uint64_t sysino, int *intr_valid_state) 1277c478bd9Sstevel@tonic-gate{ return (0); } 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1307c478bd9Sstevel@tonic-gateuint64_t 1317c478bd9Sstevel@tonic-gatehvio_intr_setvalid(uint64_t sysino, int intr_valid_state) 1327c478bd9Sstevel@tonic-gate{ return (0); } 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1357c478bd9Sstevel@tonic-gateuint64_t 1367c478bd9Sstevel@tonic-gatehvio_intr_getstate(uint64_t sysino, int *intr_state) 1377c478bd9Sstevel@tonic-gate{ return (0); } 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1407c478bd9Sstevel@tonic-gateuint64_t 1417c478bd9Sstevel@tonic-gatehvio_intr_setstate(uint64_t sysino, int intr_state) 1427c478bd9Sstevel@tonic-gate{ return (0); } 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1457c478bd9Sstevel@tonic-gateuint64_t 1467c478bd9Sstevel@tonic-gatehvio_intr_gettarget(uint64_t sysino, uint32_t *cpuid) 1477c478bd9Sstevel@tonic-gate{ return (0); } 1487c478bd9Sstevel@tonic-gate 1497c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1507c478bd9Sstevel@tonic-gateuint64_t 1517c478bd9Sstevel@tonic-gatehvio_intr_settarget(uint64_t sysino, uint32_t cpuid) 1527c478bd9Sstevel@tonic-gate{ return (0); } 1537c478bd9Sstevel@tonic-gate 1547c478bd9Sstevel@tonic-gateuint64_t 1557c478bd9Sstevel@tonic-gatehv_cpu_yield(void) 1567c478bd9Sstevel@tonic-gate{ return (0); } 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1597c478bd9Sstevel@tonic-gateuint64_t 1607c478bd9Sstevel@tonic-gatehv_cpu_state(uint64_t cpuid, uint64_t *cpu_state) 1617c478bd9Sstevel@tonic-gate{ return (0); } 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1647c478bd9Sstevel@tonic-gateuint64_t 1657c478bd9Sstevel@tonic-gatehv_dump_buf_update(uint64_t paddr, uint64_t size, uint64_t *minsize) 1667c478bd9Sstevel@tonic-gate{ return (0); } 1677c478bd9Sstevel@tonic-gate 1687c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1697c478bd9Sstevel@tonic-gateuint64_t 1707c478bd9Sstevel@tonic-gatehv_mem_scrub(uint64_t real_addr, uint64_t length, uint64_t *scrubbed_len) 1717c478bd9Sstevel@tonic-gate{ return (0); } 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1747c478bd9Sstevel@tonic-gateuint64_t 1757c478bd9Sstevel@tonic-gatehv_mem_sync(uint64_t real_addr, uint64_t length, uint64_t *flushed_len) 1767c478bd9Sstevel@tonic-gate{ return (0); } 1777c478bd9Sstevel@tonic-gate 1787c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1797c478bd9Sstevel@tonic-gateuint64_t 1807c478bd9Sstevel@tonic-gatehv_ttrace_buf_conf(uint64_t paddr, uint64_t size, uint64_t *size1) 1817c478bd9Sstevel@tonic-gate{ return (0); } 1827c478bd9Sstevel@tonic-gate 1837c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1847c478bd9Sstevel@tonic-gateuint64_t 1857c478bd9Sstevel@tonic-gatehv_ttrace_buf_info(uint64_t *paddr, uint64_t *size) 1867c478bd9Sstevel@tonic-gate{ return (0); } 1877c478bd9Sstevel@tonic-gate 1887c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1897c478bd9Sstevel@tonic-gateuint64_t 1907c478bd9Sstevel@tonic-gatehv_ttrace_enable(uint64_t enable, uint64_t *prev_enable) 1917c478bd9Sstevel@tonic-gate{ return (0); } 1927c478bd9Sstevel@tonic-gate 1937c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1947c478bd9Sstevel@tonic-gateuint64_t 1957c478bd9Sstevel@tonic-gatehv_ttrace_freeze(uint64_t freeze, uint64_t *prev_freeze) 1967c478bd9Sstevel@tonic-gate{ return (0); } 1977c478bd9Sstevel@tonic-gate 1987c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1997c478bd9Sstevel@tonic-gateuint64_t 2007c478bd9Sstevel@tonic-gatehv_mach_desc(uint64_t buffer_ra, uint64_t *buffer_sizep) 2017c478bd9Sstevel@tonic-gate{ return (0); } 2027c478bd9Sstevel@tonic-gate 2037c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 2047c478bd9Sstevel@tonic-gateuint64_t 20569cd775fSschwartzhv_ra2pa(uint64_t ra) 20669cd775fSschwartz{ return (0); } 20769cd775fSschwartz 20869cd775fSschwartz/*ARGSUSED*/ 20969cd775fSschwartzuint64_t 21069cd775fSschwartzhv_hpriv(void *func, uint64_t arg1, uint64_t arg2, uint64_t arg3) 21169cd775fSschwartz{ return (0); } 21269cd775fSschwartz 2131ae08745Sheppo/*ARGSUSED*/ 2141ae08745Sheppouint64_t 2151ae08745Sheppohv_ldc_tx_qconf(uint64_t channel, uint64_t ra_base, uint64_t nentries) 2161ae08745Sheppo{ return (0); } 2171ae08745Sheppo 2181ae08745Sheppo/*ARGSUSED*/ 2191ae08745Sheppouint64_t 2201ae08745Sheppohv_ldc_tx_qinfo(uint64_t channel, uint64_t *ra_base, uint64_t *nentries) 2211ae08745Sheppo{ return (0); } 2221ae08745Sheppo 2231ae08745Sheppo/*ARGSUSED*/ 2241ae08745Sheppouint64_t 2251ae08745Sheppohv_ldc_tx_get_state(uint64_t channel, 2261ae08745Sheppo uint64_t *headp, uint64_t *tailp, uint64_t *state) 2271ae08745Sheppo{ return (0); } 2281ae08745Sheppo 2291ae08745Sheppo/*ARGSUSED*/ 2301ae08745Sheppouint64_t 2311ae08745Sheppohv_ldc_tx_set_qtail(uint64_t channel, uint64_t tail) 2321ae08745Sheppo{ return (0); } 2331ae08745Sheppo 2341ae08745Sheppo/*ARGSUSED*/ 2351ae08745Sheppouint64_t 2361ae08745Sheppohv_ldc_rx_qconf(uint64_t channel, uint64_t ra_base, uint64_t nentries) 2371ae08745Sheppo{ return (0); } 2381ae08745Sheppo 2391ae08745Sheppo/*ARGSUSED*/ 2401ae08745Sheppouint64_t 2411ae08745Sheppohv_ldc_rx_qinfo(uint64_t channel, uint64_t *ra_base, uint64_t *nentries) 2421ae08745Sheppo{ return (0); } 2431ae08745Sheppo 2441ae08745Sheppo/*ARGSUSED*/ 2451ae08745Sheppouint64_t 2461ae08745Sheppohv_ldc_rx_get_state(uint64_t channel, 2471ae08745Sheppo uint64_t *headp, uint64_t *tailp, uint64_t *state) 2481ae08745Sheppo{ return (0); } 2491ae08745Sheppo 2501ae08745Sheppo/*ARGSUSED*/ 2511ae08745Sheppouint64_t 2521ae08745Sheppohv_ldc_rx_set_qhead(uint64_t channel, uint64_t head) 2531ae08745Sheppo{ return (0); } 2541ae08745Sheppo 2551ae08745Sheppo/*ARGSUSED*/ 2561ae08745Sheppouint64_t 2571ae08745Sheppohv_ldc_send_msg(uint64_t channel, uint64_t msg_ra) 2581ae08745Sheppo{ return (0); } 2591ae08745Sheppo 2601ae08745Sheppo/*ARGSUSED*/ 2611ae08745Sheppouint64_t 2621ae08745Sheppohv_ldc_set_map_table(uint64_t channel, uint64_t tbl_ra, uint64_t tbl_entries) 2631ae08745Sheppo{ return (0); } 2641ae08745Sheppo 2651ae08745Sheppo/*ARGSUSED*/ 2661ae08745Sheppouint64_t 2671ae08745Sheppohv_ldc_copy(uint64_t channel, uint64_t request, uint64_t cookie, 2681ae08745Sheppo uint64_t raddr, uint64_t length, uint64_t *lengthp) 2691ae08745Sheppo{ return (0); } 2701ae08745Sheppo 2711ae08745Sheppo/*ARGSUSED*/ 2721ae08745Sheppouint64_t 2731ae08745Sheppohvldc_intr_getcookie(uint64_t dev_hdl, uint32_t devino, uint64_t *cookie) 2741ae08745Sheppo{ return (0); } 2751ae08745Sheppo 2761ae08745Sheppo/*ARGSUSED*/ 2771ae08745Sheppouint64_t 2781ae08745Sheppohvldc_intr_setcookie(uint64_t dev_hdl, uint32_t devino, uint64_t cookie) 2791ae08745Sheppo{ return (0); } 2801ae08745Sheppo 2811ae08745Sheppo/*ARGSUSED*/ 2821ae08745Sheppouint64_t 2831ae08745Sheppohvldc_intr_getvalid(uint64_t dev_hdl, uint32_t devino, int *intr_valid_state) 2841ae08745Sheppo{ return (0); } 2851ae08745Sheppo 2861ae08745Sheppo/*ARGSUSED*/ 2871ae08745Sheppouint64_t 2881ae08745Sheppohvldc_intr_setvalid(uint64_t dev_hdl, uint32_t devino, int intr_valid_state) 2891ae08745Sheppo{ return (0); } 2901ae08745Sheppo 2911ae08745Sheppo/*ARGSUSED*/ 2921ae08745Sheppouint64_t 2931ae08745Sheppohvldc_intr_getstate(uint64_t dev_hdl, uint32_t devino, int *intr_state) 2941ae08745Sheppo{ return (0); } 2951ae08745Sheppo 2961ae08745Sheppo/*ARGSUSED*/ 2971ae08745Sheppouint64_t 2981ae08745Sheppohvldc_intr_setstate(uint64_t dev_hdl, uint32_t devino, int intr_state) 2991ae08745Sheppo{ return (0); } 3001ae08745Sheppo 3011ae08745Sheppo/*ARGSUSED*/ 3021ae08745Sheppouint64_t 3031ae08745Sheppohvldc_intr_gettarget(uint64_t dev_hdl, uint32_t devino, uint32_t *cpuid) 3041ae08745Sheppo{ return (0); } 3051ae08745Sheppo 3061ae08745Sheppo/*ARGSUSED*/ 3071ae08745Sheppouint64_t 3081ae08745Sheppohvldc_intr_settarget(uint64_t dev_hdl, uint32_t devino, uint32_t cpuid) 3091ae08745Sheppo{ return (0); } 3101ae08745Sheppo 3111ae08745Sheppo/*ARGSUSED*/ 3121ae08745Sheppouint64_t 3131ae08745Sheppohv_api_get_version(uint64_t api_group, uint64_t *majorp, uint64_t *minorp) 3141ae08745Sheppo{ return (0); } 3151ae08745Sheppo 3161ae08745Sheppo/*ARGSUSED*/ 3171ae08745Sheppouint64_t 3181ae08745Sheppohv_api_set_version(uint64_t api_group, uint64_t major, uint64_t minor, 3191ae08745Sheppo uint64_t *supported_minor) 3201ae08745Sheppo{ return (0); } 3211ae08745Sheppo 3223c431bb5Swentaoy/*ARGSUSED*/ 3233c431bb5Swentaoyuint64_t 3242f0fcb93SJason Belorohv_tm_enable(uint64_t enable) 3252f0fcb93SJason Beloro{ return (0); } 3262f0fcb93SJason Beloro 3272f0fcb93SJason Beloro/*ARGSUSED*/ 3282f0fcb93SJason Belorouint64_t 3293c431bb5Swentaoyhv_mach_set_watchdog(uint64_t timeout, uint64_t *time_remaining) 3303c431bb5Swentaoy{ return (0); } 3313c431bb5Swentaoy 332136097ceSjb145095/*ARGSUSED*/ 333136097ceSjb145095int64_t 334136097ceSjb145095hv_cnwrite(uint64_t buf_ra, uint64_t count, uint64_t *retcount) 335136097ceSjb145095{ return (0); } 336136097ceSjb145095 337136097ceSjb145095/*ARGSUSED*/ 338136097ceSjb145095int64_t 339136097ceSjb145095hv_cnread(uint64_t buf_ra, uint64_t count, int64_t *retcount) 340136097ceSjb145095{ return (0); } 341136097ceSjb145095 3423b890a5bSjb145095/*ARGSUSED*/ 3433b890a5bSjb145095uint64_t 3443b890a5bSjb145095hv_soft_state_set(uint64_t state, uint64_t string) 3453b890a5bSjb145095{ return (0); } 3463b890a5bSjb145095 3473b890a5bSjb145095/*ARGSUSED*/ 3483b890a5bSjb145095uint64_t 3493b890a5bSjb145095hv_soft_state_get(uint64_t string, uint64_t *state) 3503b890a5bSjb145095{ return (0); } 3513b890a5bSjb145095 3527c478bd9Sstevel@tonic-gate#else /* lint || __lint */ 3537c478bd9Sstevel@tonic-gate 3547c478bd9Sstevel@tonic-gate /* 3551ae08745Sheppo * int hv_mach_exit(uint64_t exit_code) 3561ae08745Sheppo */ 3571ae08745Sheppo ENTRY(hv_mach_exit) 3581ae08745Sheppo mov HV_MACH_EXIT, %o5 3591ae08745Sheppo ta FAST_TRAP 3601ae08745Sheppo retl 3611ae08745Sheppo nop 3621ae08745Sheppo SET_SIZE(hv_mach_exit) 3631ae08745Sheppo 3641ae08745Sheppo /* 3651ae08745Sheppo * uint64_t hv_mach_sir(void) 3661ae08745Sheppo */ 3671ae08745Sheppo ENTRY(hv_mach_sir) 3681ae08745Sheppo mov HV_MACH_SIR, %o5 3691ae08745Sheppo ta FAST_TRAP 3701ae08745Sheppo retl 3711ae08745Sheppo nop 3721ae08745Sheppo SET_SIZE(hv_mach_sir) 3731ae08745Sheppo 3741ae08745Sheppo /* 3751ae08745Sheppo * hv_cpu_start(uint64_t cpuid, uint64_t pc, ui64_t rtba, 3761ae08745Sheppo * uint64_t arg) 3771ae08745Sheppo */ 3781ae08745Sheppo ENTRY(hv_cpu_start) 3791ae08745Sheppo mov HV_CPU_START, %o5 3801ae08745Sheppo ta FAST_TRAP 3811ae08745Sheppo retl 3821ae08745Sheppo nop 3831ae08745Sheppo SET_SIZE(hv_cpu_start) 3841ae08745Sheppo 3851ae08745Sheppo /* 3861ae08745Sheppo * hv_cpu_stop(uint64_t cpuid) 3871ae08745Sheppo */ 3881ae08745Sheppo ENTRY(hv_cpu_stop) 3891ae08745Sheppo mov HV_CPU_STOP, %o5 3901ae08745Sheppo ta FAST_TRAP 3911ae08745Sheppo retl 3921ae08745Sheppo nop 3931ae08745Sheppo SET_SIZE(hv_cpu_stop) 3941ae08745Sheppo 3951ae08745Sheppo /* 3961ae08745Sheppo * hv_cpu_set_rtba(uint64_t *rtba) 3971ae08745Sheppo */ 3981ae08745Sheppo ENTRY(hv_cpu_set_rtba) 3991ae08745Sheppo mov %o0, %o2 4001ae08745Sheppo ldx [%o2], %o0 4011ae08745Sheppo mov HV_CPU_SET_RTBA, %o5 4021ae08745Sheppo ta FAST_TRAP 4031ae08745Sheppo stx %o1, [%o2] 4041ae08745Sheppo retl 4051ae08745Sheppo nop 4061ae08745Sheppo SET_SIZE(hv_cpu_set_rtba) 4071ae08745Sheppo 4081ae08745Sheppo /* 4091ae08745Sheppo * int64_t hv_cnputchar(uint8_t ch) 4107c478bd9Sstevel@tonic-gate */ 4117c478bd9Sstevel@tonic-gate ENTRY(hv_cnputchar) 4121ae08745Sheppo mov CONS_PUTCHAR, %o5 4137c478bd9Sstevel@tonic-gate ta FAST_TRAP 4147c478bd9Sstevel@tonic-gate retl 4151ae08745Sheppo nop 4167c478bd9Sstevel@tonic-gate SET_SIZE(hv_cnputchar) 4177c478bd9Sstevel@tonic-gate 4187c478bd9Sstevel@tonic-gate /* 4191ae08745Sheppo * int64_t hv_cngetchar(uint8_t *ch) 4207c478bd9Sstevel@tonic-gate */ 4217c478bd9Sstevel@tonic-gate ENTRY(hv_cngetchar) 4227c478bd9Sstevel@tonic-gate mov %o0, %o2 4231ae08745Sheppo mov CONS_GETCHAR, %o5 4247c478bd9Sstevel@tonic-gate ta FAST_TRAP 4257c478bd9Sstevel@tonic-gate brnz,a %o0, 1f ! failure, just return error 4261ae08745Sheppo nop 4277c478bd9Sstevel@tonic-gate 4287c478bd9Sstevel@tonic-gate cmp %o1, H_BREAK 4297c478bd9Sstevel@tonic-gate be 1f 4307c478bd9Sstevel@tonic-gate mov %o1, %o0 4317c478bd9Sstevel@tonic-gate 4327c478bd9Sstevel@tonic-gate cmp %o1, H_HUP 4337c478bd9Sstevel@tonic-gate be 1f 4347c478bd9Sstevel@tonic-gate mov %o1, %o0 4357c478bd9Sstevel@tonic-gate 4367c478bd9Sstevel@tonic-gate stb %o1, [%o2] ! success, save character and return 0 4377c478bd9Sstevel@tonic-gate mov 0, %o0 4387c478bd9Sstevel@tonic-gate1: 4397c478bd9Sstevel@tonic-gate retl 4407c478bd9Sstevel@tonic-gate nop 4417c478bd9Sstevel@tonic-gate SET_SIZE(hv_cngetchar) 4427c478bd9Sstevel@tonic-gate 4437c478bd9Sstevel@tonic-gate ENTRY(hv_tod_get) 4447c478bd9Sstevel@tonic-gate mov %o0, %o4 4457c478bd9Sstevel@tonic-gate mov TOD_GET, %o5 4467c478bd9Sstevel@tonic-gate ta FAST_TRAP 4477c478bd9Sstevel@tonic-gate retl 4487c478bd9Sstevel@tonic-gate stx %o1, [%o4] 4497c478bd9Sstevel@tonic-gate SET_SIZE(hv_tod_get) 4507c478bd9Sstevel@tonic-gate 4517c478bd9Sstevel@tonic-gate ENTRY(hv_tod_set) 4527c478bd9Sstevel@tonic-gate mov TOD_SET, %o5 4537c478bd9Sstevel@tonic-gate ta FAST_TRAP 4547c478bd9Sstevel@tonic-gate retl 4557c478bd9Sstevel@tonic-gate nop 4567c478bd9Sstevel@tonic-gate SET_SIZE(hv_tod_set) 4577c478bd9Sstevel@tonic-gate 4587c478bd9Sstevel@tonic-gate /* 4597c478bd9Sstevel@tonic-gate * Map permanent address 4607c478bd9Sstevel@tonic-gate * arg0 vaddr (%o0) 4617c478bd9Sstevel@tonic-gate * arg1 context (%o1) 4627c478bd9Sstevel@tonic-gate * arg2 tte (%o2) 4637c478bd9Sstevel@tonic-gate * arg3 flags (%o3) 0x1=d 0x2=i 4647c478bd9Sstevel@tonic-gate */ 4657c478bd9Sstevel@tonic-gate ENTRY(hv_mmu_map_perm_addr) 4667c478bd9Sstevel@tonic-gate mov MAP_PERM_ADDR, %o5 4677c478bd9Sstevel@tonic-gate ta FAST_TRAP 4687c478bd9Sstevel@tonic-gate retl 4697c478bd9Sstevel@tonic-gate nop 4707c478bd9Sstevel@tonic-gate SET_SIZE(hv_mmu_map_perm_addr) 4717c478bd9Sstevel@tonic-gate 4727c478bd9Sstevel@tonic-gate /* 4731ae08745Sheppo * hv_mmu_fault_area_conf(void *raddr) 4741ae08745Sheppo */ 4751ae08745Sheppo ENTRY(hv_mmu_fault_area_conf) 4761ae08745Sheppo mov %o0, %o2 4771ae08745Sheppo ldx [%o2], %o0 4781ae08745Sheppo mov MMU_SET_INFOPTR, %o5 4791ae08745Sheppo ta FAST_TRAP 4801ae08745Sheppo stx %o1, [%o2] 4811ae08745Sheppo retl 4821ae08745Sheppo nop 4831ae08745Sheppo SET_SIZE(hv_mmu_fault_area_conf) 4841ae08745Sheppo 4851ae08745Sheppo /* 4867c478bd9Sstevel@tonic-gate * Unmap permanent address 4877c478bd9Sstevel@tonic-gate * arg0 vaddr (%o0) 4887c478bd9Sstevel@tonic-gate * arg1 context (%o1) 4897c478bd9Sstevel@tonic-gate * arg2 flags (%o2) 0x1=d 0x2=i 4907c478bd9Sstevel@tonic-gate */ 4917c478bd9Sstevel@tonic-gate ENTRY(hv_mmu_unmap_perm_addr) 4927c478bd9Sstevel@tonic-gate mov UNMAP_PERM_ADDR, %o5 4937c478bd9Sstevel@tonic-gate ta FAST_TRAP 4947c478bd9Sstevel@tonic-gate retl 4957c478bd9Sstevel@tonic-gate nop 4967c478bd9Sstevel@tonic-gate SET_SIZE(hv_mmu_unmap_perm_addr) 4977c478bd9Sstevel@tonic-gate 4987c478bd9Sstevel@tonic-gate /* 4997c478bd9Sstevel@tonic-gate * Set TSB for context 0 5007c478bd9Sstevel@tonic-gate * arg0 ntsb_descriptor (%o0) 5017c478bd9Sstevel@tonic-gate * arg1 desc_ra (%o1) 5027c478bd9Sstevel@tonic-gate */ 5037c478bd9Sstevel@tonic-gate ENTRY(hv_set_ctx0) 5047c478bd9Sstevel@tonic-gate mov MMU_TSB_CTX0, %o5 5057c478bd9Sstevel@tonic-gate ta FAST_TRAP 5067c478bd9Sstevel@tonic-gate retl 5077c478bd9Sstevel@tonic-gate nop 5087c478bd9Sstevel@tonic-gate SET_SIZE(hv_set_ctx0) 5097c478bd9Sstevel@tonic-gate 5107c478bd9Sstevel@tonic-gate /* 5117c478bd9Sstevel@tonic-gate * Set TSB for context non0 5127c478bd9Sstevel@tonic-gate * arg0 ntsb_descriptor (%o0) 5137c478bd9Sstevel@tonic-gate * arg1 desc_ra (%o1) 5147c478bd9Sstevel@tonic-gate */ 5157c478bd9Sstevel@tonic-gate ENTRY(hv_set_ctxnon0) 5167c478bd9Sstevel@tonic-gate mov MMU_TSB_CTXNON0, %o5 5177c478bd9Sstevel@tonic-gate ta FAST_TRAP 5187c478bd9Sstevel@tonic-gate retl 5197c478bd9Sstevel@tonic-gate nop 5207c478bd9Sstevel@tonic-gate SET_SIZE(hv_set_ctxnon0) 5217c478bd9Sstevel@tonic-gate 5227c478bd9Sstevel@tonic-gate#ifdef SET_MMU_STATS 5237c478bd9Sstevel@tonic-gate /* 5247c478bd9Sstevel@tonic-gate * Returns old stat area on success 5257c478bd9Sstevel@tonic-gate */ 5267c478bd9Sstevel@tonic-gate ENTRY(hv_mmu_set_stat_area) 5277c478bd9Sstevel@tonic-gate mov MMU_STAT_AREA, %o5 5287c478bd9Sstevel@tonic-gate ta FAST_TRAP 5297c478bd9Sstevel@tonic-gate retl 5307c478bd9Sstevel@tonic-gate nop 5317c478bd9Sstevel@tonic-gate SET_SIZE(hv_mmu_set_stat_area) 5327c478bd9Sstevel@tonic-gate#endif /* SET_MMU_STATS */ 5337c478bd9Sstevel@tonic-gate 5347c478bd9Sstevel@tonic-gate /* 5357c478bd9Sstevel@tonic-gate * CPU Q Configure 5367c478bd9Sstevel@tonic-gate * arg0 queue (%o0) 5377c478bd9Sstevel@tonic-gate * arg1 Base address RA (%o1) 5387c478bd9Sstevel@tonic-gate * arg2 Size (%o2) 5397c478bd9Sstevel@tonic-gate */ 5407c478bd9Sstevel@tonic-gate ENTRY(hv_cpu_qconf) 5411ae08745Sheppo mov HV_CPU_QCONF, %o5 5427c478bd9Sstevel@tonic-gate ta FAST_TRAP 5437c478bd9Sstevel@tonic-gate retl 5447c478bd9Sstevel@tonic-gate nop 5457c478bd9Sstevel@tonic-gate SET_SIZE(hv_cpu_qconf) 5467c478bd9Sstevel@tonic-gate 5477c478bd9Sstevel@tonic-gate /* 5487c478bd9Sstevel@tonic-gate * arg0 - devhandle 5497c478bd9Sstevel@tonic-gate * arg1 - devino 5507c478bd9Sstevel@tonic-gate * 5517c478bd9Sstevel@tonic-gate * ret0 - status 5527c478bd9Sstevel@tonic-gate * ret1 - sysino 5537c478bd9Sstevel@tonic-gate */ 5547c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_devino_to_sysino) 5557c478bd9Sstevel@tonic-gate mov HVIO_INTR_DEVINO2SYSINO, %o5 5567c478bd9Sstevel@tonic-gate ta FAST_TRAP 5577c478bd9Sstevel@tonic-gate brz,a %o0, 1f 5587c478bd9Sstevel@tonic-gate stx %o1, [%o2] 5597c478bd9Sstevel@tonic-gate1: retl 5607c478bd9Sstevel@tonic-gate nop 5617c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_devino_to_sysino) 5627c478bd9Sstevel@tonic-gate 5637c478bd9Sstevel@tonic-gate /* 5647c478bd9Sstevel@tonic-gate * arg0 - sysino 5657c478bd9Sstevel@tonic-gate * 5667c478bd9Sstevel@tonic-gate * ret0 - status 5677c478bd9Sstevel@tonic-gate * ret1 - intr_valid_state 5687c478bd9Sstevel@tonic-gate */ 5697c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_getvalid) 5707c478bd9Sstevel@tonic-gate mov %o1, %o2 5717c478bd9Sstevel@tonic-gate mov HVIO_INTR_GETVALID, %o5 5727c478bd9Sstevel@tonic-gate ta FAST_TRAP 5737c478bd9Sstevel@tonic-gate brz,a %o0, 1f 5747c478bd9Sstevel@tonic-gate stuw %o1, [%o2] 5757c478bd9Sstevel@tonic-gate1: retl 5767c478bd9Sstevel@tonic-gate nop 5777c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_getvalid) 5787c478bd9Sstevel@tonic-gate 5797c478bd9Sstevel@tonic-gate /* 5807c478bd9Sstevel@tonic-gate * arg0 - sysino 5817c478bd9Sstevel@tonic-gate * arg1 - intr_valid_state 5827c478bd9Sstevel@tonic-gate * 5837c478bd9Sstevel@tonic-gate * ret0 - status 5847c478bd9Sstevel@tonic-gate */ 5857c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_setvalid) 5867c478bd9Sstevel@tonic-gate mov HVIO_INTR_SETVALID, %o5 5877c478bd9Sstevel@tonic-gate ta FAST_TRAP 5887c478bd9Sstevel@tonic-gate retl 5897c478bd9Sstevel@tonic-gate nop 5907c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_setvalid) 5917c478bd9Sstevel@tonic-gate 5927c478bd9Sstevel@tonic-gate /* 5937c478bd9Sstevel@tonic-gate * arg0 - sysino 5947c478bd9Sstevel@tonic-gate * 5957c478bd9Sstevel@tonic-gate * ret0 - status 5967c478bd9Sstevel@tonic-gate * ret1 - intr_state 5977c478bd9Sstevel@tonic-gate */ 5987c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_getstate) 5997c478bd9Sstevel@tonic-gate mov %o1, %o2 6007c478bd9Sstevel@tonic-gate mov HVIO_INTR_GETSTATE, %o5 6017c478bd9Sstevel@tonic-gate ta FAST_TRAP 6027c478bd9Sstevel@tonic-gate brz,a %o0, 1f 6037c478bd9Sstevel@tonic-gate stuw %o1, [%o2] 6047c478bd9Sstevel@tonic-gate1: retl 6057c478bd9Sstevel@tonic-gate nop 6067c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_getstate) 6077c478bd9Sstevel@tonic-gate 6087c478bd9Sstevel@tonic-gate /* 6097c478bd9Sstevel@tonic-gate * arg0 - sysino 6107c478bd9Sstevel@tonic-gate * arg1 - intr_state 6117c478bd9Sstevel@tonic-gate * 6127c478bd9Sstevel@tonic-gate * ret0 - status 6137c478bd9Sstevel@tonic-gate */ 6147c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_setstate) 6157c478bd9Sstevel@tonic-gate mov HVIO_INTR_SETSTATE, %o5 6167c478bd9Sstevel@tonic-gate ta FAST_TRAP 6177c478bd9Sstevel@tonic-gate retl 6187c478bd9Sstevel@tonic-gate nop 6197c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_setstate) 6207c478bd9Sstevel@tonic-gate 6217c478bd9Sstevel@tonic-gate /* 6227c478bd9Sstevel@tonic-gate * arg0 - sysino 6237c478bd9Sstevel@tonic-gate * 6247c478bd9Sstevel@tonic-gate * ret0 - status 6257c478bd9Sstevel@tonic-gate * ret1 - cpu_id 6267c478bd9Sstevel@tonic-gate */ 6277c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_gettarget) 6287c478bd9Sstevel@tonic-gate mov %o1, %o2 6297c478bd9Sstevel@tonic-gate mov HVIO_INTR_GETTARGET, %o5 6307c478bd9Sstevel@tonic-gate ta FAST_TRAP 6317c478bd9Sstevel@tonic-gate brz,a %o0, 1f 6327c478bd9Sstevel@tonic-gate stuw %o1, [%o2] 6337c478bd9Sstevel@tonic-gate1: retl 6347c478bd9Sstevel@tonic-gate nop 6357c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_gettarget) 6367c478bd9Sstevel@tonic-gate 6377c478bd9Sstevel@tonic-gate /* 6387c478bd9Sstevel@tonic-gate * arg0 - sysino 6397c478bd9Sstevel@tonic-gate * arg1 - cpu_id 6407c478bd9Sstevel@tonic-gate * 6417c478bd9Sstevel@tonic-gate * ret0 - status 6427c478bd9Sstevel@tonic-gate */ 6437c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_settarget) 6447c478bd9Sstevel@tonic-gate mov HVIO_INTR_SETTARGET, %o5 6457c478bd9Sstevel@tonic-gate ta FAST_TRAP 6467c478bd9Sstevel@tonic-gate retl 6477c478bd9Sstevel@tonic-gate nop 6487c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_settarget) 6497c478bd9Sstevel@tonic-gate 6507c478bd9Sstevel@tonic-gate /* 6517c478bd9Sstevel@tonic-gate * hv_cpu_yield(void) 6527c478bd9Sstevel@tonic-gate */ 6537c478bd9Sstevel@tonic-gate ENTRY(hv_cpu_yield) 6547c478bd9Sstevel@tonic-gate mov HV_CPU_YIELD, %o5 6557c478bd9Sstevel@tonic-gate ta FAST_TRAP 6567c478bd9Sstevel@tonic-gate retl 6577c478bd9Sstevel@tonic-gate nop 6587c478bd9Sstevel@tonic-gate SET_SIZE(hv_cpu_yield) 6597c478bd9Sstevel@tonic-gate 6607c478bd9Sstevel@tonic-gate /* 6617c478bd9Sstevel@tonic-gate * int hv_cpu_state(uint64_t cpuid, uint64_t *cpu_state); 6627c478bd9Sstevel@tonic-gate */ 6637c478bd9Sstevel@tonic-gate ENTRY(hv_cpu_state) 6647c478bd9Sstevel@tonic-gate mov %o1, %o4 ! save datap 6657c478bd9Sstevel@tonic-gate mov HV_CPU_STATE, %o5 6667c478bd9Sstevel@tonic-gate ta FAST_TRAP 6677c478bd9Sstevel@tonic-gate brz,a %o0, 1f 6687c478bd9Sstevel@tonic-gate stx %o1, [%o4] 6697c478bd9Sstevel@tonic-gate1: 6707c478bd9Sstevel@tonic-gate retl 6717c478bd9Sstevel@tonic-gate nop 6727c478bd9Sstevel@tonic-gate SET_SIZE(hv_cpu_state) 6737c478bd9Sstevel@tonic-gate 6747c478bd9Sstevel@tonic-gate /* 6757c478bd9Sstevel@tonic-gate * HV state dump zone Configure 6767c478bd9Sstevel@tonic-gate * arg0 real adrs of dump buffer (%o0) 6777c478bd9Sstevel@tonic-gate * arg1 size of dump buffer (%o1) 6787c478bd9Sstevel@tonic-gate * ret0 status (%o0) 6797c478bd9Sstevel@tonic-gate * ret1 size of buffer on success and min size on EINVAL (%o1) 6807c478bd9Sstevel@tonic-gate * hv_dump_buf_update(uint64_t paddr, uint64_t size, uint64_t *ret_size) 6817c478bd9Sstevel@tonic-gate */ 6827c478bd9Sstevel@tonic-gate ENTRY(hv_dump_buf_update) 6837c478bd9Sstevel@tonic-gate mov DUMP_BUF_UPDATE, %o5 6847c478bd9Sstevel@tonic-gate ta FAST_TRAP 6857c478bd9Sstevel@tonic-gate retl 6867c478bd9Sstevel@tonic-gate stx %o1, [%o2] 6877c478bd9Sstevel@tonic-gate SET_SIZE(hv_dump_buf_update) 6887c478bd9Sstevel@tonic-gate 6893c431bb5Swentaoy /* 6903c431bb5Swentaoy * arg0 - timeout value (%o0) 6913c431bb5Swentaoy * 6923c431bb5Swentaoy * ret0 - status (%o0) 6933c431bb5Swentaoy * ret1 - time_remaining (%o1) 6943c431bb5Swentaoy * hv_mach_set_watchdog(uint64_t timeout, uint64_t *time_remaining) 6953c431bb5Swentaoy */ 6963c431bb5Swentaoy ENTRY(hv_mach_set_watchdog) 6973c431bb5Swentaoy mov %o1, %o2 6983c431bb5Swentaoy mov MACH_SET_WATCHDOG, %o5 6993c431bb5Swentaoy ta FAST_TRAP 7003c431bb5Swentaoy retl 7013c431bb5Swentaoy stx %o1, [%o2] 7023c431bb5Swentaoy SET_SIZE(hv_mach_set_watchdog) 7037c478bd9Sstevel@tonic-gate 7047c478bd9Sstevel@tonic-gate /* 7057c478bd9Sstevel@tonic-gate * For memory scrub 7067c478bd9Sstevel@tonic-gate * int hv_mem_scrub(uint64_t real_addr, uint64_t length, 7077c478bd9Sstevel@tonic-gate * uint64_t *scrubbed_len); 7087c478bd9Sstevel@tonic-gate * Retun %o0 -- status 7097c478bd9Sstevel@tonic-gate * %o1 -- bytes scrubbed 7107c478bd9Sstevel@tonic-gate */ 7117c478bd9Sstevel@tonic-gate ENTRY(hv_mem_scrub) 7127c478bd9Sstevel@tonic-gate mov %o2, %o4 7137c478bd9Sstevel@tonic-gate mov HV_MEM_SCRUB, %o5 7147c478bd9Sstevel@tonic-gate ta FAST_TRAP 7157c478bd9Sstevel@tonic-gate retl 7167c478bd9Sstevel@tonic-gate stx %o1, [%o4] 7177c478bd9Sstevel@tonic-gate SET_SIZE(hv_mem_scrub) 7187c478bd9Sstevel@tonic-gate 7197c478bd9Sstevel@tonic-gate /* 7207c478bd9Sstevel@tonic-gate * Flush ecache 7217c478bd9Sstevel@tonic-gate * int hv_mem_sync(uint64_t real_addr, uint64_t length, 7227c478bd9Sstevel@tonic-gate * uint64_t *flushed_len); 7237c478bd9Sstevel@tonic-gate * Retun %o0 -- status 7247c478bd9Sstevel@tonic-gate * %o1 -- bytes flushed 7257c478bd9Sstevel@tonic-gate */ 7267c478bd9Sstevel@tonic-gate ENTRY(hv_mem_sync) 7277c478bd9Sstevel@tonic-gate mov %o2, %o4 7287c478bd9Sstevel@tonic-gate mov HV_MEM_SYNC, %o5 7297c478bd9Sstevel@tonic-gate ta FAST_TRAP 7307c478bd9Sstevel@tonic-gate retl 7317c478bd9Sstevel@tonic-gate stx %o1, [%o4] 7327c478bd9Sstevel@tonic-gate SET_SIZE(hv_mem_sync) 7337c478bd9Sstevel@tonic-gate 7347c478bd9Sstevel@tonic-gate /* 735*9d0d62adSJason Beloro * uint64_t hv_tm_enable(uint64_t enable) 7362f0fcb93SJason Beloro */ 7372f0fcb93SJason Beloro ENTRY(hv_tm_enable) 7382f0fcb93SJason Beloro mov HV_TM_ENABLE, %o5 7392f0fcb93SJason Beloro ta FAST_TRAP 7402f0fcb93SJason Beloro retl 7412f0fcb93SJason Beloro nop 7422f0fcb93SJason Beloro SET_SIZE(hv_tm_enable) 7432f0fcb93SJason Beloro 7442f0fcb93SJason Beloro /* 7457c478bd9Sstevel@tonic-gate * TTRACE_BUF_CONF Configure 7467c478bd9Sstevel@tonic-gate * arg0 RA base of buffer (%o0) 7477c478bd9Sstevel@tonic-gate * arg1 buf size in no. of entries (%o1) 7487c478bd9Sstevel@tonic-gate * ret0 status (%o0) 7497c478bd9Sstevel@tonic-gate * ret1 minimum size in no. of entries on failure, 7507c478bd9Sstevel@tonic-gate * actual size in no. of entries on success (%o1) 7517c478bd9Sstevel@tonic-gate */ 7527c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_buf_conf) 7537c478bd9Sstevel@tonic-gate mov TTRACE_BUF_CONF, %o5 7547c478bd9Sstevel@tonic-gate ta FAST_TRAP 7557c478bd9Sstevel@tonic-gate retl 7567c478bd9Sstevel@tonic-gate stx %o1, [%o2] 7577c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_buf_conf) 7587c478bd9Sstevel@tonic-gate 7597c478bd9Sstevel@tonic-gate /* 7607c478bd9Sstevel@tonic-gate * TTRACE_BUF_INFO 7617c478bd9Sstevel@tonic-gate * ret0 status (%o0) 7627c478bd9Sstevel@tonic-gate * ret1 RA base of buffer (%o1) 7637c478bd9Sstevel@tonic-gate * ret2 size in no. of entries (%o2) 7647c478bd9Sstevel@tonic-gate */ 7657c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_buf_info) 7667c478bd9Sstevel@tonic-gate mov %o0, %o3 7677c478bd9Sstevel@tonic-gate mov %o1, %o4 7687c478bd9Sstevel@tonic-gate mov TTRACE_BUF_INFO, %o5 7697c478bd9Sstevel@tonic-gate ta FAST_TRAP 7707c478bd9Sstevel@tonic-gate stx %o1, [%o3] 7717c478bd9Sstevel@tonic-gate retl 7727c478bd9Sstevel@tonic-gate stx %o2, [%o4] 7737c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_buf_info) 7747c478bd9Sstevel@tonic-gate 7757c478bd9Sstevel@tonic-gate /* 7767c478bd9Sstevel@tonic-gate * TTRACE_ENABLE 7777c478bd9Sstevel@tonic-gate * arg0 enable/ disable (%o0) 7787c478bd9Sstevel@tonic-gate * ret0 status (%o0) 7797c478bd9Sstevel@tonic-gate * ret1 previous enable state (%o1) 7807c478bd9Sstevel@tonic-gate */ 7817c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_enable) 7827c478bd9Sstevel@tonic-gate mov %o1, %o2 7837c478bd9Sstevel@tonic-gate mov TTRACE_ENABLE, %o5 7847c478bd9Sstevel@tonic-gate ta FAST_TRAP 7857c478bd9Sstevel@tonic-gate retl 7867c478bd9Sstevel@tonic-gate stx %o1, [%o2] 7877c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_enable) 7887c478bd9Sstevel@tonic-gate 7897c478bd9Sstevel@tonic-gate /* 7907c478bd9Sstevel@tonic-gate * TTRACE_FREEZE 7917c478bd9Sstevel@tonic-gate * arg0 enable/ freeze (%o0) 7927c478bd9Sstevel@tonic-gate * ret0 status (%o0) 7937c478bd9Sstevel@tonic-gate * ret1 previous freeze state (%o1) 7947c478bd9Sstevel@tonic-gate */ 7957c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_freeze) 7967c478bd9Sstevel@tonic-gate mov %o1, %o2 7977c478bd9Sstevel@tonic-gate mov TTRACE_FREEZE, %o5 7987c478bd9Sstevel@tonic-gate ta FAST_TRAP 7997c478bd9Sstevel@tonic-gate retl 8007c478bd9Sstevel@tonic-gate stx %o1, [%o2] 8017c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_freeze) 8027c478bd9Sstevel@tonic-gate 8037c478bd9Sstevel@tonic-gate /* 8047c478bd9Sstevel@tonic-gate * MACH_DESC 8057c478bd9Sstevel@tonic-gate * arg0 buffer real address 8067c478bd9Sstevel@tonic-gate * arg1 pointer to uint64_t for size of buffer 8077c478bd9Sstevel@tonic-gate * ret0 status 8087c478bd9Sstevel@tonic-gate * ret1 return required size of buffer / returned data size 8097c478bd9Sstevel@tonic-gate */ 8107c478bd9Sstevel@tonic-gate ENTRY(hv_mach_desc) 8117c478bd9Sstevel@tonic-gate mov %o1, %o4 ! save datap 8127c478bd9Sstevel@tonic-gate ldx [%o1], %o1 8137c478bd9Sstevel@tonic-gate mov HV_MACH_DESC, %o5 8147c478bd9Sstevel@tonic-gate ta FAST_TRAP 8157c478bd9Sstevel@tonic-gate retl 8167c478bd9Sstevel@tonic-gate stx %o1, [%o4] 8177c478bd9Sstevel@tonic-gate SET_SIZE(hv_mach_desc) 8187c478bd9Sstevel@tonic-gate 8197c478bd9Sstevel@tonic-gate /* 82069cd775fSschwartz * hv_ra2pa(uint64_t ra) 82169cd775fSschwartz * 82269cd775fSschwartz * MACH_DESC 82369cd775fSschwartz * arg0 Real address to convert 82469cd775fSschwartz * ret0 Returned physical address or -1 on error 82569cd775fSschwartz */ 82669cd775fSschwartz ENTRY(hv_ra2pa) 82769cd775fSschwartz mov HV_RA2PA, %o5 82869cd775fSschwartz ta FAST_TRAP 82969cd775fSschwartz cmp %o0, 0 83069cd775fSschwartz move %xcc, %o1, %o0 83169cd775fSschwartz movne %xcc, -1, %o0 83269cd775fSschwartz retl 83369cd775fSschwartz nop 83469cd775fSschwartz SET_SIZE(hv_ra2pa) 83569cd775fSschwartz 83669cd775fSschwartz /* 83769cd775fSschwartz * hv_hpriv(void *func, uint64_t arg1, uint64_t arg2, uint64_t arg3) 83869cd775fSschwartz * 83969cd775fSschwartz * MACH_DESC 84069cd775fSschwartz * arg0 OS function to call 84169cd775fSschwartz * arg1 First arg to OS function 84269cd775fSschwartz * arg2 Second arg to OS function 84369cd775fSschwartz * arg3 Third arg to OS function 84469cd775fSschwartz * ret0 Returned value from function 84569cd775fSschwartz */ 84669cd775fSschwartz 84769cd775fSschwartz ENTRY(hv_hpriv) 84869cd775fSschwartz mov HV_HPRIV, %o5 84969cd775fSschwartz ta FAST_TRAP 85069cd775fSschwartz retl 85169cd775fSschwartz nop 85269cd775fSschwartz SET_SIZE(hv_hpriv) 85369cd775fSschwartz 8541ae08745Sheppo /* 8551ae08745Sheppo * hv_ldc_tx_qconf(uint64_t channel, uint64_t ra_base, 8561ae08745Sheppo * uint64_t nentries); 8571ae08745Sheppo */ 8581ae08745Sheppo ENTRY(hv_ldc_tx_qconf) 8591ae08745Sheppo mov LDC_TX_QCONF, %o5 8601ae08745Sheppo ta FAST_TRAP 8611ae08745Sheppo retl 8621ae08745Sheppo nop 8631ae08745Sheppo SET_SIZE(hv_ldc_tx_qconf) 8641ae08745Sheppo 8651ae08745Sheppo 8661ae08745Sheppo /* 8671ae08745Sheppo * hv_ldc_tx_qinfo(uint64_t channel, uint64_t *ra_base, 8681ae08745Sheppo * uint64_t *nentries); 8691ae08745Sheppo */ 8701ae08745Sheppo ENTRY(hv_ldc_tx_qinfo) 8711ae08745Sheppo mov %o1, %g1 8721ae08745Sheppo mov %o2, %g2 8731ae08745Sheppo mov LDC_TX_QINFO, %o5 8741ae08745Sheppo ta FAST_TRAP 8751ae08745Sheppo stx %o1, [%g1] 8761ae08745Sheppo retl 8771ae08745Sheppo stx %o2, [%g2] 8781ae08745Sheppo SET_SIZE(hv_ldc_tx_qinfo) 8791ae08745Sheppo 8801ae08745Sheppo 8811ae08745Sheppo /* 8821ae08745Sheppo * hv_ldc_tx_get_state(uint64_t channel, 8831ae08745Sheppo * uint64_t *headp, uint64_t *tailp, uint64_t *state); 8841ae08745Sheppo */ 8851ae08745Sheppo ENTRY(hv_ldc_tx_get_state) 8861ae08745Sheppo mov LDC_TX_GET_STATE, %o5 8871ae08745Sheppo mov %o1, %g1 8881ae08745Sheppo mov %o2, %g2 8891ae08745Sheppo mov %o3, %g3 8901ae08745Sheppo ta FAST_TRAP 8911ae08745Sheppo stx %o1, [%g1] 8921ae08745Sheppo stx %o2, [%g2] 8931ae08745Sheppo retl 8941ae08745Sheppo stx %o3, [%g3] 8951ae08745Sheppo SET_SIZE(hv_ldc_tx_get_state) 8961ae08745Sheppo 8971ae08745Sheppo 8981ae08745Sheppo /* 8991ae08745Sheppo * hv_ldc_tx_set_qtail(uint64_t channel, uint64_t tail) 9001ae08745Sheppo */ 9011ae08745Sheppo ENTRY(hv_ldc_tx_set_qtail) 9021ae08745Sheppo mov LDC_TX_SET_QTAIL, %o5 9031ae08745Sheppo ta FAST_TRAP 9041ae08745Sheppo retl 9051ae08745Sheppo SET_SIZE(hv_ldc_tx_set_qtail) 9061ae08745Sheppo 9071ae08745Sheppo 9081ae08745Sheppo /* 9091ae08745Sheppo * hv_ldc_rx_qconf(uint64_t channel, uint64_t ra_base, 9101ae08745Sheppo * uint64_t nentries); 9111ae08745Sheppo */ 9121ae08745Sheppo ENTRY(hv_ldc_rx_qconf) 9131ae08745Sheppo mov LDC_RX_QCONF, %o5 9141ae08745Sheppo ta FAST_TRAP 9151ae08745Sheppo retl 9161ae08745Sheppo nop 9171ae08745Sheppo SET_SIZE(hv_ldc_rx_qconf) 9181ae08745Sheppo 9191ae08745Sheppo 9201ae08745Sheppo /* 9211ae08745Sheppo * hv_ldc_rx_qinfo(uint64_t channel, uint64_t *ra_base, 9221ae08745Sheppo * uint64_t *nentries); 9231ae08745Sheppo */ 9241ae08745Sheppo ENTRY(hv_ldc_rx_qinfo) 9251ae08745Sheppo mov %o1, %g1 9261ae08745Sheppo mov %o2, %g2 9271ae08745Sheppo mov LDC_RX_QINFO, %o5 9281ae08745Sheppo ta FAST_TRAP 9291ae08745Sheppo stx %o1, [%g1] 9301ae08745Sheppo retl 9311ae08745Sheppo stx %o2, [%g2] 9321ae08745Sheppo SET_SIZE(hv_ldc_rx_qinfo) 9331ae08745Sheppo 9341ae08745Sheppo 9351ae08745Sheppo /* 9361ae08745Sheppo * hv_ldc_rx_get_state(uint64_t channel, 9371ae08745Sheppo * uint64_t *headp, uint64_t *tailp, uint64_t *state); 9381ae08745Sheppo */ 9391ae08745Sheppo ENTRY(hv_ldc_rx_get_state) 9401ae08745Sheppo mov LDC_RX_GET_STATE, %o5 9411ae08745Sheppo mov %o1, %g1 9421ae08745Sheppo mov %o2, %g2 9431ae08745Sheppo mov %o3, %g3 9441ae08745Sheppo ta FAST_TRAP 9451ae08745Sheppo stx %o1, [%g1] 9461ae08745Sheppo stx %o2, [%g2] 9471ae08745Sheppo retl 9481ae08745Sheppo stx %o3, [%g3] 9491ae08745Sheppo SET_SIZE(hv_ldc_rx_get_state) 9501ae08745Sheppo 9511ae08745Sheppo 9521ae08745Sheppo /* 9531ae08745Sheppo * hv_ldc_rx_set_qhead(uint64_t channel, uint64_t head) 9541ae08745Sheppo */ 9551ae08745Sheppo ENTRY(hv_ldc_rx_set_qhead) 9561ae08745Sheppo mov LDC_RX_SET_QHEAD, %o5 9571ae08745Sheppo ta FAST_TRAP 9581ae08745Sheppo retl 9591ae08745Sheppo SET_SIZE(hv_ldc_rx_set_qhead) 9601ae08745Sheppo 9611ae08745Sheppo /* 9621ae08745Sheppo * hv_ldc_set_map_table(uint64_t channel, uint64_t tbl_ra, 9631ae08745Sheppo * uint64_t tbl_entries) 9641ae08745Sheppo */ 9651ae08745Sheppo ENTRY(hv_ldc_set_map_table) 9661ae08745Sheppo mov LDC_SET_MAP_TABLE, %o5 9671ae08745Sheppo ta FAST_TRAP 9681ae08745Sheppo retl 9691ae08745Sheppo nop 9701ae08745Sheppo SET_SIZE(hv_ldc_set_map_table) 9711ae08745Sheppo 9721ae08745Sheppo 9731ae08745Sheppo /* 9741ae08745Sheppo * hv_ldc_get_map_table(uint64_t channel, uint64_t *tbl_ra, 9751ae08745Sheppo * uint64_t *tbl_entries) 9761ae08745Sheppo */ 9771ae08745Sheppo ENTRY(hv_ldc_get_map_table) 9781ae08745Sheppo mov %o1, %g1 9791ae08745Sheppo mov %o2, %g2 9801ae08745Sheppo mov LDC_GET_MAP_TABLE, %o5 9811ae08745Sheppo ta FAST_TRAP 9821ae08745Sheppo stx %o1, [%g1] 9831ae08745Sheppo retl 9841ae08745Sheppo stx %o2, [%g2] 9851ae08745Sheppo SET_SIZE(hv_ldc_get_map_table) 9861ae08745Sheppo 9871ae08745Sheppo 9881ae08745Sheppo /* 9891ae08745Sheppo * hv_ldc_copy(uint64_t channel, uint64_t request, uint64_t cookie, 9901ae08745Sheppo * uint64_t raddr, uint64_t length, uint64_t *lengthp); 9911ae08745Sheppo */ 9921ae08745Sheppo ENTRY(hv_ldc_copy) 9931ae08745Sheppo mov %o5, %g1 9941ae08745Sheppo mov LDC_COPY, %o5 9951ae08745Sheppo ta FAST_TRAP 9961ae08745Sheppo retl 9971ae08745Sheppo stx %o1, [%g1] 9981ae08745Sheppo SET_SIZE(hv_ldc_copy) 9991ae08745Sheppo 10001ae08745Sheppo 10011ae08745Sheppo /* 10021ae08745Sheppo * hv_ldc_mapin(uint64_t channel, uint64_t cookie, uint64_t *raddr, 10031ae08745Sheppo * uint64_t *perm) 10041ae08745Sheppo */ 10051ae08745Sheppo ENTRY(hv_ldc_mapin) 10061ae08745Sheppo mov %o2, %g1 10071ae08745Sheppo mov %o3, %g2 10081ae08745Sheppo mov LDC_MAPIN, %o5 10091ae08745Sheppo ta FAST_TRAP 10101ae08745Sheppo stx %o1, [%g1] 10111ae08745Sheppo retl 10121ae08745Sheppo stx %o2, [%g2] 10131ae08745Sheppo SET_SIZE(hv_ldc_mapin) 10141ae08745Sheppo 10151ae08745Sheppo 10161ae08745Sheppo /* 10171ae08745Sheppo * hv_ldc_unmap(uint64_t raddr) 10181ae08745Sheppo */ 10191ae08745Sheppo ENTRY(hv_ldc_unmap) 10201ae08745Sheppo mov LDC_UNMAP, %o5 10211ae08745Sheppo ta FAST_TRAP 10221ae08745Sheppo retl 10231ae08745Sheppo nop 10241ae08745Sheppo SET_SIZE(hv_ldc_unmap) 10251ae08745Sheppo 10261ae08745Sheppo 10271ae08745Sheppo /* 10284bac2208Snarayan * hv_ldc_revoke(uint64_t channel, uint64_t cookie, 10294bac2208Snarayan * uint64_t revoke_cookie 10301ae08745Sheppo */ 10311ae08745Sheppo ENTRY(hv_ldc_revoke) 10321ae08745Sheppo mov LDC_REVOKE, %o5 10331ae08745Sheppo ta FAST_TRAP 10341ae08745Sheppo retl 10351ae08745Sheppo nop 10361ae08745Sheppo SET_SIZE(hv_ldc_revoke) 10371ae08745Sheppo 10381ae08745Sheppo 10391ae08745Sheppo /* 10401ae08745Sheppo * hvldc_intr_getcookie(uint64_t dev_hdl, uint32_t devino, 10411ae08745Sheppo * uint64_t *cookie); 10421ae08745Sheppo */ 10431ae08745Sheppo ENTRY(hvldc_intr_getcookie) 10441ae08745Sheppo mov %o2, %g1 10451ae08745Sheppo mov VINTR_GET_COOKIE, %o5 10461ae08745Sheppo ta FAST_TRAP 10471ae08745Sheppo retl 10481ae08745Sheppo stx %o1, [%g1] 10491ae08745Sheppo SET_SIZE(hvldc_intr_getcookie) 10501ae08745Sheppo 10511ae08745Sheppo /* 10521ae08745Sheppo * hvldc_intr_setcookie(uint64_t dev_hdl, uint32_t devino, 10531ae08745Sheppo * uint64_t cookie); 10541ae08745Sheppo */ 10551ae08745Sheppo ENTRY(hvldc_intr_setcookie) 10561ae08745Sheppo mov VINTR_SET_COOKIE, %o5 10571ae08745Sheppo ta FAST_TRAP 10581ae08745Sheppo retl 10591ae08745Sheppo nop 10601ae08745Sheppo SET_SIZE(hvldc_intr_setcookie) 10611ae08745Sheppo 10621ae08745Sheppo 10631ae08745Sheppo /* 10641ae08745Sheppo * hvldc_intr_getvalid(uint64_t dev_hdl, uint32_t devino, 10651ae08745Sheppo * int *intr_valid_state); 10661ae08745Sheppo */ 10671ae08745Sheppo ENTRY(hvldc_intr_getvalid) 10681ae08745Sheppo mov %o2, %g1 10691ae08745Sheppo mov VINTR_GET_VALID, %o5 10701ae08745Sheppo ta FAST_TRAP 10711ae08745Sheppo retl 10721ae08745Sheppo stuw %o1, [%g1] 10731ae08745Sheppo SET_SIZE(hvldc_intr_getvalid) 10741ae08745Sheppo 10751ae08745Sheppo /* 10761ae08745Sheppo * hvldc_intr_setvalid(uint64_t dev_hdl, uint32_t devino, 10771ae08745Sheppo * int intr_valid_state); 10781ae08745Sheppo */ 10791ae08745Sheppo ENTRY(hvldc_intr_setvalid) 10801ae08745Sheppo mov VINTR_SET_VALID, %o5 10811ae08745Sheppo ta FAST_TRAP 10821ae08745Sheppo retl 10831ae08745Sheppo nop 10841ae08745Sheppo SET_SIZE(hvldc_intr_setvalid) 10851ae08745Sheppo 10861ae08745Sheppo /* 10871ae08745Sheppo * hvldc_intr_getstate(uint64_t dev_hdl, uint32_t devino, 10881ae08745Sheppo * int *intr_state); 10891ae08745Sheppo */ 10901ae08745Sheppo ENTRY(hvldc_intr_getstate) 10911ae08745Sheppo mov %o2, %g1 10921ae08745Sheppo mov VINTR_GET_STATE, %o5 10931ae08745Sheppo ta FAST_TRAP 10941ae08745Sheppo retl 10951ae08745Sheppo stuw %o1, [%g1] 10961ae08745Sheppo SET_SIZE(hvldc_intr_getstate) 10971ae08745Sheppo 10981ae08745Sheppo /* 10991ae08745Sheppo * hvldc_intr_setstate(uint64_t dev_hdl, uint32_t devino, 11001ae08745Sheppo * int intr_state); 11011ae08745Sheppo */ 11021ae08745Sheppo ENTRY(hvldc_intr_setstate) 11031ae08745Sheppo mov VINTR_SET_STATE, %o5 11041ae08745Sheppo ta FAST_TRAP 11051ae08745Sheppo retl 11061ae08745Sheppo nop 11071ae08745Sheppo SET_SIZE(hvldc_intr_setstate) 11081ae08745Sheppo 11091ae08745Sheppo /* 11101ae08745Sheppo * hvldc_intr_gettarget(uint64_t dev_hdl, uint32_t devino, 11111ae08745Sheppo * uint32_t *cpuid); 11121ae08745Sheppo */ 11131ae08745Sheppo ENTRY(hvldc_intr_gettarget) 11141ae08745Sheppo mov %o2, %g1 11151ae08745Sheppo mov VINTR_GET_TARGET, %o5 11161ae08745Sheppo ta FAST_TRAP 11171ae08745Sheppo retl 11181ae08745Sheppo stuw %o1, [%g1] 11191ae08745Sheppo SET_SIZE(hvldc_intr_gettarget) 11201ae08745Sheppo 11211ae08745Sheppo /* 11221ae08745Sheppo * hvldc_intr_settarget(uint64_t dev_hdl, uint32_t devino, 11231ae08745Sheppo * uint32_t cpuid); 11241ae08745Sheppo */ 11251ae08745Sheppo ENTRY(hvldc_intr_settarget) 11261ae08745Sheppo mov VINTR_SET_TARGET, %o5 11271ae08745Sheppo ta FAST_TRAP 11281ae08745Sheppo retl 11291ae08745Sheppo nop 11301ae08745Sheppo SET_SIZE(hvldc_intr_settarget) 11311ae08745Sheppo 11321ae08745Sheppo /* 11331ae08745Sheppo * hv_api_get_version(uint64_t api_group, uint64_t *majorp, 11341ae08745Sheppo * uint64_t *minorp) 11351ae08745Sheppo * 11361ae08745Sheppo * API_GET_VERSION 11371ae08745Sheppo * arg0 API group 11381ae08745Sheppo * ret0 status 11391ae08745Sheppo * ret1 major number 11401ae08745Sheppo * ret2 minor number 11411ae08745Sheppo */ 11421ae08745Sheppo ENTRY(hv_api_get_version) 11431ae08745Sheppo mov %o1, %o3 11441ae08745Sheppo mov %o2, %o4 11451ae08745Sheppo mov API_GET_VERSION, %o5 11461ae08745Sheppo ta CORE_TRAP 11471ae08745Sheppo stx %o1, [%o3] 11481ae08745Sheppo retl 11491ae08745Sheppo stx %o2, [%o4] 11501ae08745Sheppo SET_SIZE(hv_api_get_version) 11511ae08745Sheppo 11521ae08745Sheppo /* 11531ae08745Sheppo * hv_api_set_version(uint64_t api_group, uint64_t major, 11541ae08745Sheppo * uint64_t minor, uint64_t *supported_minor) 11551ae08745Sheppo * 11561ae08745Sheppo * API_SET_VERSION 11571ae08745Sheppo * arg0 API group 11581ae08745Sheppo * arg1 major number 11591ae08745Sheppo * arg2 requested minor number 11601ae08745Sheppo * ret0 status 11611ae08745Sheppo * ret1 actual minor number 11621ae08745Sheppo */ 11631ae08745Sheppo ENTRY(hv_api_set_version) 11641ae08745Sheppo mov %o3, %o4 11651ae08745Sheppo mov API_SET_VERSION, %o5 11661ae08745Sheppo ta CORE_TRAP 11671ae08745Sheppo retl 11681ae08745Sheppo stx %o1, [%o4] 11691ae08745Sheppo SET_SIZE(hv_api_set_version) 11701ae08745Sheppo 1171136097ceSjb145095 /* 1172136097ceSjb145095 * %o0 - buffer real address 1173136097ceSjb145095 * %o1 - buffer size 1174136097ceSjb145095 * %o2 - &characters written 1175136097ceSjb145095 * returns 1176136097ceSjb145095 * status 1177136097ceSjb145095 */ 1178136097ceSjb145095 ENTRY(hv_cnwrite) 1179136097ceSjb145095 mov CONS_WRITE, %o5 1180136097ceSjb145095 ta FAST_TRAP 1181136097ceSjb145095 retl 1182136097ceSjb145095 stx %o1, [%o2] 1183136097ceSjb145095 SET_SIZE(hv_cnwrite) 1184136097ceSjb145095 1185136097ceSjb145095 /* 1186136097ceSjb145095 * %o0 character buffer ra 1187136097ceSjb145095 * %o1 buffer size 1188136097ceSjb145095 * %o2 pointer to returned size 1189136097ceSjb145095 * return values: 1190136097ceSjb145095 * 0 success 1191136097ceSjb145095 * hv_errno failure 1192136097ceSjb145095 */ 1193136097ceSjb145095 ENTRY(hv_cnread) 1194136097ceSjb145095 mov CONS_READ, %o5 1195136097ceSjb145095 ta FAST_TRAP 1196136097ceSjb145095 brnz,a %o0, 1f ! failure, just return error 1197136097ceSjb145095 nop 1198136097ceSjb145095 1199136097ceSjb145095 cmp %o1, H_BREAK 1200136097ceSjb145095 be 1f 1201136097ceSjb145095 mov %o1, %o0 1202136097ceSjb145095 1203136097ceSjb145095 cmp %o1, H_HUP 1204136097ceSjb145095 be 1f 1205136097ceSjb145095 mov %o1, %o0 1206136097ceSjb145095 1207136097ceSjb145095 stx %o1, [%o2] ! success, save count and return 0 1208136097ceSjb145095 mov 0, %o0 1209136097ceSjb1450951: 1210136097ceSjb145095 retl 1211136097ceSjb145095 nop 1212136097ceSjb145095 SET_SIZE(hv_cnread) 1213136097ceSjb145095 12143b890a5bSjb145095 /* 12153b890a5bSjb145095 * SOFT_STATE_SET 12163b890a5bSjb145095 * arg0 state (%o0) 12173b890a5bSjb145095 * arg1 string (%o1) 12183b890a5bSjb145095 * ret0 status (%o0) 12193b890a5bSjb145095 */ 12203b890a5bSjb145095 ENTRY(hv_soft_state_set) 12213b890a5bSjb145095 mov SOFT_STATE_SET, %o5 12223b890a5bSjb145095 ta FAST_TRAP 12233b890a5bSjb145095 retl 12243b890a5bSjb145095 nop 12253b890a5bSjb145095 SET_SIZE(hv_soft_state_set) 12263b890a5bSjb145095 12273b890a5bSjb145095 /* 12283b890a5bSjb145095 * SOFT_STATE_GET 12293b890a5bSjb145095 * arg0 string buffer (%o0) 12303b890a5bSjb145095 * ret0 status (%o0) 12313b890a5bSjb145095 * ret1 current state (%o1) 12323b890a5bSjb145095 */ 12333b890a5bSjb145095 ENTRY(hv_soft_state_get) 12343b890a5bSjb145095 mov %o1, %o2 12353b890a5bSjb145095 mov SOFT_STATE_GET, %o5 12363b890a5bSjb145095 ta FAST_TRAP 12373b890a5bSjb145095 retl 12383b890a5bSjb145095 stx %o1, [%o2] 12393b890a5bSjb145095 SET_SIZE(hv_soft_state_get) 12403b890a5bSjb145095 12417c478bd9Sstevel@tonic-gate#endif /* lint || __lint */ 1242