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/* 239d0d62adSJason 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) 350*4df55fdeSJanie Lu{ return (0); }uint64_t 351023e71deSHaik Aftandilianhv_guest_suspend(void) 352023e71deSHaik Aftandilian{ return (0); } 353023e71deSHaik Aftandilian 354023e71deSHaik Aftandilian/*ARGSUSED*/ 355023e71deSHaik Aftandilianuint64_t 356023e71deSHaik Aftandilianhv_set_tick_npt(uint64_t npt) 357023e71deSHaik Aftandilian{ return (0); } 358023e71deSHaik Aftandilian 359023e71deSHaik Aftandilian/*ARGSUSED*/ 360023e71deSHaik Aftandilianuint64_t 361023e71deSHaik Aftandilianhv_set_stick_npt(uint64_t npt) 362023e71deSHaik Aftandilian{ return (0); } 363023e71deSHaik Aftandilian 364*4df55fdeSJanie Lu/*ARGSUSED*/ 365*4df55fdeSJanie Luuint64_t 366*4df55fdeSJanie Luhv_reboot_data_set(uint64_t buffer_ra, uint64_t buffer_len) 367*4df55fdeSJanie Lu{ return (0); } 368*4df55fdeSJanie Lu 3697c478bd9Sstevel@tonic-gate#else /* lint || __lint */ 3707c478bd9Sstevel@tonic-gate 3717c478bd9Sstevel@tonic-gate /* 3721ae08745Sheppo * int hv_mach_exit(uint64_t exit_code) 3731ae08745Sheppo */ 3741ae08745Sheppo ENTRY(hv_mach_exit) 3751ae08745Sheppo mov HV_MACH_EXIT, %o5 3761ae08745Sheppo ta FAST_TRAP 3771ae08745Sheppo retl 3781ae08745Sheppo nop 3791ae08745Sheppo SET_SIZE(hv_mach_exit) 3801ae08745Sheppo 3811ae08745Sheppo /* 3821ae08745Sheppo * uint64_t hv_mach_sir(void) 3831ae08745Sheppo */ 3841ae08745Sheppo ENTRY(hv_mach_sir) 3851ae08745Sheppo mov HV_MACH_SIR, %o5 3861ae08745Sheppo ta FAST_TRAP 3871ae08745Sheppo retl 3881ae08745Sheppo nop 3891ae08745Sheppo SET_SIZE(hv_mach_sir) 3901ae08745Sheppo 3911ae08745Sheppo /* 3921ae08745Sheppo * hv_cpu_start(uint64_t cpuid, uint64_t pc, ui64_t rtba, 3931ae08745Sheppo * uint64_t arg) 3941ae08745Sheppo */ 3951ae08745Sheppo ENTRY(hv_cpu_start) 3961ae08745Sheppo mov HV_CPU_START, %o5 3971ae08745Sheppo ta FAST_TRAP 3981ae08745Sheppo retl 3991ae08745Sheppo nop 4001ae08745Sheppo SET_SIZE(hv_cpu_start) 4011ae08745Sheppo 4021ae08745Sheppo /* 4031ae08745Sheppo * hv_cpu_stop(uint64_t cpuid) 4041ae08745Sheppo */ 4051ae08745Sheppo ENTRY(hv_cpu_stop) 4061ae08745Sheppo mov HV_CPU_STOP, %o5 4071ae08745Sheppo ta FAST_TRAP 4081ae08745Sheppo retl 4091ae08745Sheppo nop 4101ae08745Sheppo SET_SIZE(hv_cpu_stop) 4111ae08745Sheppo 4121ae08745Sheppo /* 4131ae08745Sheppo * hv_cpu_set_rtba(uint64_t *rtba) 4141ae08745Sheppo */ 4151ae08745Sheppo ENTRY(hv_cpu_set_rtba) 4161ae08745Sheppo mov %o0, %o2 4171ae08745Sheppo ldx [%o2], %o0 4181ae08745Sheppo mov HV_CPU_SET_RTBA, %o5 4191ae08745Sheppo ta FAST_TRAP 4201ae08745Sheppo stx %o1, [%o2] 4211ae08745Sheppo retl 4221ae08745Sheppo nop 4231ae08745Sheppo SET_SIZE(hv_cpu_set_rtba) 4241ae08745Sheppo 4251ae08745Sheppo /* 4261ae08745Sheppo * int64_t hv_cnputchar(uint8_t ch) 4277c478bd9Sstevel@tonic-gate */ 4287c478bd9Sstevel@tonic-gate ENTRY(hv_cnputchar) 4291ae08745Sheppo mov CONS_PUTCHAR, %o5 4307c478bd9Sstevel@tonic-gate ta FAST_TRAP 4317c478bd9Sstevel@tonic-gate retl 4321ae08745Sheppo nop 4337c478bd9Sstevel@tonic-gate SET_SIZE(hv_cnputchar) 4347c478bd9Sstevel@tonic-gate 4357c478bd9Sstevel@tonic-gate /* 4361ae08745Sheppo * int64_t hv_cngetchar(uint8_t *ch) 4377c478bd9Sstevel@tonic-gate */ 4387c478bd9Sstevel@tonic-gate ENTRY(hv_cngetchar) 4397c478bd9Sstevel@tonic-gate mov %o0, %o2 4401ae08745Sheppo mov CONS_GETCHAR, %o5 4417c478bd9Sstevel@tonic-gate ta FAST_TRAP 4427c478bd9Sstevel@tonic-gate brnz,a %o0, 1f ! failure, just return error 4431ae08745Sheppo nop 4447c478bd9Sstevel@tonic-gate 4457c478bd9Sstevel@tonic-gate cmp %o1, H_BREAK 4467c478bd9Sstevel@tonic-gate be 1f 4477c478bd9Sstevel@tonic-gate mov %o1, %o0 4487c478bd9Sstevel@tonic-gate 4497c478bd9Sstevel@tonic-gate cmp %o1, H_HUP 4507c478bd9Sstevel@tonic-gate be 1f 4517c478bd9Sstevel@tonic-gate mov %o1, %o0 4527c478bd9Sstevel@tonic-gate 4537c478bd9Sstevel@tonic-gate stb %o1, [%o2] ! success, save character and return 0 4547c478bd9Sstevel@tonic-gate mov 0, %o0 4557c478bd9Sstevel@tonic-gate1: 4567c478bd9Sstevel@tonic-gate retl 4577c478bd9Sstevel@tonic-gate nop 4587c478bd9Sstevel@tonic-gate SET_SIZE(hv_cngetchar) 4597c478bd9Sstevel@tonic-gate 4607c478bd9Sstevel@tonic-gate ENTRY(hv_tod_get) 4617c478bd9Sstevel@tonic-gate mov %o0, %o4 4627c478bd9Sstevel@tonic-gate mov TOD_GET, %o5 4637c478bd9Sstevel@tonic-gate ta FAST_TRAP 4647c478bd9Sstevel@tonic-gate retl 4657c478bd9Sstevel@tonic-gate stx %o1, [%o4] 4667c478bd9Sstevel@tonic-gate SET_SIZE(hv_tod_get) 4677c478bd9Sstevel@tonic-gate 4687c478bd9Sstevel@tonic-gate ENTRY(hv_tod_set) 4697c478bd9Sstevel@tonic-gate mov TOD_SET, %o5 4707c478bd9Sstevel@tonic-gate ta FAST_TRAP 4717c478bd9Sstevel@tonic-gate retl 4727c478bd9Sstevel@tonic-gate nop 4737c478bd9Sstevel@tonic-gate SET_SIZE(hv_tod_set) 4747c478bd9Sstevel@tonic-gate 4757c478bd9Sstevel@tonic-gate /* 4767c478bd9Sstevel@tonic-gate * Map permanent address 4777c478bd9Sstevel@tonic-gate * arg0 vaddr (%o0) 4787c478bd9Sstevel@tonic-gate * arg1 context (%o1) 4797c478bd9Sstevel@tonic-gate * arg2 tte (%o2) 4807c478bd9Sstevel@tonic-gate * arg3 flags (%o3) 0x1=d 0x2=i 4817c478bd9Sstevel@tonic-gate */ 4827c478bd9Sstevel@tonic-gate ENTRY(hv_mmu_map_perm_addr) 4837c478bd9Sstevel@tonic-gate mov MAP_PERM_ADDR, %o5 4847c478bd9Sstevel@tonic-gate ta FAST_TRAP 4857c478bd9Sstevel@tonic-gate retl 4867c478bd9Sstevel@tonic-gate nop 4877c478bd9Sstevel@tonic-gate SET_SIZE(hv_mmu_map_perm_addr) 4887c478bd9Sstevel@tonic-gate 4897c478bd9Sstevel@tonic-gate /* 4901ae08745Sheppo * hv_mmu_fault_area_conf(void *raddr) 4911ae08745Sheppo */ 4921ae08745Sheppo ENTRY(hv_mmu_fault_area_conf) 4931ae08745Sheppo mov %o0, %o2 4941ae08745Sheppo ldx [%o2], %o0 4951ae08745Sheppo mov MMU_SET_INFOPTR, %o5 4961ae08745Sheppo ta FAST_TRAP 4971ae08745Sheppo stx %o1, [%o2] 4981ae08745Sheppo retl 4991ae08745Sheppo nop 5001ae08745Sheppo SET_SIZE(hv_mmu_fault_area_conf) 5011ae08745Sheppo 5021ae08745Sheppo /* 5037c478bd9Sstevel@tonic-gate * Unmap permanent address 5047c478bd9Sstevel@tonic-gate * arg0 vaddr (%o0) 5057c478bd9Sstevel@tonic-gate * arg1 context (%o1) 5067c478bd9Sstevel@tonic-gate * arg2 flags (%o2) 0x1=d 0x2=i 5077c478bd9Sstevel@tonic-gate */ 5087c478bd9Sstevel@tonic-gate ENTRY(hv_mmu_unmap_perm_addr) 5097c478bd9Sstevel@tonic-gate mov UNMAP_PERM_ADDR, %o5 5107c478bd9Sstevel@tonic-gate ta FAST_TRAP 5117c478bd9Sstevel@tonic-gate retl 5127c478bd9Sstevel@tonic-gate nop 5137c478bd9Sstevel@tonic-gate SET_SIZE(hv_mmu_unmap_perm_addr) 5147c478bd9Sstevel@tonic-gate 5157c478bd9Sstevel@tonic-gate /* 5167c478bd9Sstevel@tonic-gate * Set TSB for context 0 5177c478bd9Sstevel@tonic-gate * arg0 ntsb_descriptor (%o0) 5187c478bd9Sstevel@tonic-gate * arg1 desc_ra (%o1) 5197c478bd9Sstevel@tonic-gate */ 5207c478bd9Sstevel@tonic-gate ENTRY(hv_set_ctx0) 5217c478bd9Sstevel@tonic-gate mov MMU_TSB_CTX0, %o5 5227c478bd9Sstevel@tonic-gate ta FAST_TRAP 5237c478bd9Sstevel@tonic-gate retl 5247c478bd9Sstevel@tonic-gate nop 5257c478bd9Sstevel@tonic-gate SET_SIZE(hv_set_ctx0) 5267c478bd9Sstevel@tonic-gate 5277c478bd9Sstevel@tonic-gate /* 5287c478bd9Sstevel@tonic-gate * Set TSB for context non0 5297c478bd9Sstevel@tonic-gate * arg0 ntsb_descriptor (%o0) 5307c478bd9Sstevel@tonic-gate * arg1 desc_ra (%o1) 5317c478bd9Sstevel@tonic-gate */ 5327c478bd9Sstevel@tonic-gate ENTRY(hv_set_ctxnon0) 5337c478bd9Sstevel@tonic-gate mov MMU_TSB_CTXNON0, %o5 5347c478bd9Sstevel@tonic-gate ta FAST_TRAP 5357c478bd9Sstevel@tonic-gate retl 5367c478bd9Sstevel@tonic-gate nop 5377c478bd9Sstevel@tonic-gate SET_SIZE(hv_set_ctxnon0) 5387c478bd9Sstevel@tonic-gate 5397c478bd9Sstevel@tonic-gate#ifdef SET_MMU_STATS 5407c478bd9Sstevel@tonic-gate /* 5417c478bd9Sstevel@tonic-gate * Returns old stat area on success 5427c478bd9Sstevel@tonic-gate */ 5437c478bd9Sstevel@tonic-gate ENTRY(hv_mmu_set_stat_area) 5447c478bd9Sstevel@tonic-gate mov MMU_STAT_AREA, %o5 5457c478bd9Sstevel@tonic-gate ta FAST_TRAP 5467c478bd9Sstevel@tonic-gate retl 5477c478bd9Sstevel@tonic-gate nop 5487c478bd9Sstevel@tonic-gate SET_SIZE(hv_mmu_set_stat_area) 5497c478bd9Sstevel@tonic-gate#endif /* SET_MMU_STATS */ 5507c478bd9Sstevel@tonic-gate 5517c478bd9Sstevel@tonic-gate /* 5527c478bd9Sstevel@tonic-gate * CPU Q Configure 5537c478bd9Sstevel@tonic-gate * arg0 queue (%o0) 5547c478bd9Sstevel@tonic-gate * arg1 Base address RA (%o1) 5557c478bd9Sstevel@tonic-gate * arg2 Size (%o2) 5567c478bd9Sstevel@tonic-gate */ 5577c478bd9Sstevel@tonic-gate ENTRY(hv_cpu_qconf) 5581ae08745Sheppo mov HV_CPU_QCONF, %o5 5597c478bd9Sstevel@tonic-gate ta FAST_TRAP 5607c478bd9Sstevel@tonic-gate retl 5617c478bd9Sstevel@tonic-gate nop 5627c478bd9Sstevel@tonic-gate SET_SIZE(hv_cpu_qconf) 5637c478bd9Sstevel@tonic-gate 5647c478bd9Sstevel@tonic-gate /* 5657c478bd9Sstevel@tonic-gate * arg0 - devhandle 5667c478bd9Sstevel@tonic-gate * arg1 - devino 5677c478bd9Sstevel@tonic-gate * 5687c478bd9Sstevel@tonic-gate * ret0 - status 5697c478bd9Sstevel@tonic-gate * ret1 - sysino 5707c478bd9Sstevel@tonic-gate */ 5717c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_devino_to_sysino) 5727c478bd9Sstevel@tonic-gate mov HVIO_INTR_DEVINO2SYSINO, %o5 5737c478bd9Sstevel@tonic-gate ta FAST_TRAP 5747c478bd9Sstevel@tonic-gate brz,a %o0, 1f 5757c478bd9Sstevel@tonic-gate stx %o1, [%o2] 5767c478bd9Sstevel@tonic-gate1: retl 5777c478bd9Sstevel@tonic-gate nop 5787c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_devino_to_sysino) 5797c478bd9Sstevel@tonic-gate 5807c478bd9Sstevel@tonic-gate /* 5817c478bd9Sstevel@tonic-gate * arg0 - sysino 5827c478bd9Sstevel@tonic-gate * 5837c478bd9Sstevel@tonic-gate * ret0 - status 5847c478bd9Sstevel@tonic-gate * ret1 - intr_valid_state 5857c478bd9Sstevel@tonic-gate */ 5867c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_getvalid) 5877c478bd9Sstevel@tonic-gate mov %o1, %o2 5887c478bd9Sstevel@tonic-gate mov HVIO_INTR_GETVALID, %o5 5897c478bd9Sstevel@tonic-gate ta FAST_TRAP 5907c478bd9Sstevel@tonic-gate brz,a %o0, 1f 5917c478bd9Sstevel@tonic-gate stuw %o1, [%o2] 5927c478bd9Sstevel@tonic-gate1: retl 5937c478bd9Sstevel@tonic-gate nop 5947c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_getvalid) 5957c478bd9Sstevel@tonic-gate 5967c478bd9Sstevel@tonic-gate /* 5977c478bd9Sstevel@tonic-gate * arg0 - sysino 5987c478bd9Sstevel@tonic-gate * arg1 - intr_valid_state 5997c478bd9Sstevel@tonic-gate * 6007c478bd9Sstevel@tonic-gate * ret0 - status 6017c478bd9Sstevel@tonic-gate */ 6027c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_setvalid) 6037c478bd9Sstevel@tonic-gate mov HVIO_INTR_SETVALID, %o5 6047c478bd9Sstevel@tonic-gate ta FAST_TRAP 6057c478bd9Sstevel@tonic-gate retl 6067c478bd9Sstevel@tonic-gate nop 6077c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_setvalid) 6087c478bd9Sstevel@tonic-gate 6097c478bd9Sstevel@tonic-gate /* 6107c478bd9Sstevel@tonic-gate * arg0 - sysino 6117c478bd9Sstevel@tonic-gate * 6127c478bd9Sstevel@tonic-gate * ret0 - status 6137c478bd9Sstevel@tonic-gate * ret1 - intr_state 6147c478bd9Sstevel@tonic-gate */ 6157c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_getstate) 6167c478bd9Sstevel@tonic-gate mov %o1, %o2 6177c478bd9Sstevel@tonic-gate mov HVIO_INTR_GETSTATE, %o5 6187c478bd9Sstevel@tonic-gate ta FAST_TRAP 6197c478bd9Sstevel@tonic-gate brz,a %o0, 1f 6207c478bd9Sstevel@tonic-gate stuw %o1, [%o2] 6217c478bd9Sstevel@tonic-gate1: retl 6227c478bd9Sstevel@tonic-gate nop 6237c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_getstate) 6247c478bd9Sstevel@tonic-gate 6257c478bd9Sstevel@tonic-gate /* 6267c478bd9Sstevel@tonic-gate * arg0 - sysino 6277c478bd9Sstevel@tonic-gate * arg1 - intr_state 6287c478bd9Sstevel@tonic-gate * 6297c478bd9Sstevel@tonic-gate * ret0 - status 6307c478bd9Sstevel@tonic-gate */ 6317c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_setstate) 6327c478bd9Sstevel@tonic-gate mov HVIO_INTR_SETSTATE, %o5 6337c478bd9Sstevel@tonic-gate ta FAST_TRAP 6347c478bd9Sstevel@tonic-gate retl 6357c478bd9Sstevel@tonic-gate nop 6367c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_setstate) 6377c478bd9Sstevel@tonic-gate 6387c478bd9Sstevel@tonic-gate /* 6397c478bd9Sstevel@tonic-gate * arg0 - sysino 6407c478bd9Sstevel@tonic-gate * 6417c478bd9Sstevel@tonic-gate * ret0 - status 6427c478bd9Sstevel@tonic-gate * ret1 - cpu_id 6437c478bd9Sstevel@tonic-gate */ 6447c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_gettarget) 6457c478bd9Sstevel@tonic-gate mov %o1, %o2 6467c478bd9Sstevel@tonic-gate mov HVIO_INTR_GETTARGET, %o5 6477c478bd9Sstevel@tonic-gate ta FAST_TRAP 6487c478bd9Sstevel@tonic-gate brz,a %o0, 1f 6497c478bd9Sstevel@tonic-gate stuw %o1, [%o2] 6507c478bd9Sstevel@tonic-gate1: retl 6517c478bd9Sstevel@tonic-gate nop 6527c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_gettarget) 6537c478bd9Sstevel@tonic-gate 6547c478bd9Sstevel@tonic-gate /* 6557c478bd9Sstevel@tonic-gate * arg0 - sysino 6567c478bd9Sstevel@tonic-gate * arg1 - cpu_id 6577c478bd9Sstevel@tonic-gate * 6587c478bd9Sstevel@tonic-gate * ret0 - status 6597c478bd9Sstevel@tonic-gate */ 6607c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_settarget) 6617c478bd9Sstevel@tonic-gate mov HVIO_INTR_SETTARGET, %o5 6627c478bd9Sstevel@tonic-gate ta FAST_TRAP 6637c478bd9Sstevel@tonic-gate retl 6647c478bd9Sstevel@tonic-gate nop 6657c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_settarget) 6667c478bd9Sstevel@tonic-gate 6677c478bd9Sstevel@tonic-gate /* 6687c478bd9Sstevel@tonic-gate * hv_cpu_yield(void) 6697c478bd9Sstevel@tonic-gate */ 6707c478bd9Sstevel@tonic-gate ENTRY(hv_cpu_yield) 6717c478bd9Sstevel@tonic-gate mov HV_CPU_YIELD, %o5 6727c478bd9Sstevel@tonic-gate ta FAST_TRAP 6737c478bd9Sstevel@tonic-gate retl 6747c478bd9Sstevel@tonic-gate nop 6757c478bd9Sstevel@tonic-gate SET_SIZE(hv_cpu_yield) 6767c478bd9Sstevel@tonic-gate 6777c478bd9Sstevel@tonic-gate /* 6787c478bd9Sstevel@tonic-gate * int hv_cpu_state(uint64_t cpuid, uint64_t *cpu_state); 6797c478bd9Sstevel@tonic-gate */ 6807c478bd9Sstevel@tonic-gate ENTRY(hv_cpu_state) 6817c478bd9Sstevel@tonic-gate mov %o1, %o4 ! save datap 6827c478bd9Sstevel@tonic-gate mov HV_CPU_STATE, %o5 6837c478bd9Sstevel@tonic-gate ta FAST_TRAP 6847c478bd9Sstevel@tonic-gate brz,a %o0, 1f 6857c478bd9Sstevel@tonic-gate stx %o1, [%o4] 6867c478bd9Sstevel@tonic-gate1: 6877c478bd9Sstevel@tonic-gate retl 6887c478bd9Sstevel@tonic-gate nop 6897c478bd9Sstevel@tonic-gate SET_SIZE(hv_cpu_state) 6907c478bd9Sstevel@tonic-gate 6917c478bd9Sstevel@tonic-gate /* 6927c478bd9Sstevel@tonic-gate * HV state dump zone Configure 6937c478bd9Sstevel@tonic-gate * arg0 real adrs of dump buffer (%o0) 6947c478bd9Sstevel@tonic-gate * arg1 size of dump buffer (%o1) 6957c478bd9Sstevel@tonic-gate * ret0 status (%o0) 6967c478bd9Sstevel@tonic-gate * ret1 size of buffer on success and min size on EINVAL (%o1) 6977c478bd9Sstevel@tonic-gate * hv_dump_buf_update(uint64_t paddr, uint64_t size, uint64_t *ret_size) 6987c478bd9Sstevel@tonic-gate */ 6997c478bd9Sstevel@tonic-gate ENTRY(hv_dump_buf_update) 7007c478bd9Sstevel@tonic-gate mov DUMP_BUF_UPDATE, %o5 7017c478bd9Sstevel@tonic-gate ta FAST_TRAP 7027c478bd9Sstevel@tonic-gate retl 7037c478bd9Sstevel@tonic-gate stx %o1, [%o2] 7047c478bd9Sstevel@tonic-gate SET_SIZE(hv_dump_buf_update) 7057c478bd9Sstevel@tonic-gate 7063c431bb5Swentaoy /* 7073c431bb5Swentaoy * arg0 - timeout value (%o0) 7083c431bb5Swentaoy * 7093c431bb5Swentaoy * ret0 - status (%o0) 7103c431bb5Swentaoy * ret1 - time_remaining (%o1) 7113c431bb5Swentaoy * hv_mach_set_watchdog(uint64_t timeout, uint64_t *time_remaining) 7123c431bb5Swentaoy */ 7133c431bb5Swentaoy ENTRY(hv_mach_set_watchdog) 7143c431bb5Swentaoy mov %o1, %o2 7153c431bb5Swentaoy mov MACH_SET_WATCHDOG, %o5 7163c431bb5Swentaoy ta FAST_TRAP 7173c431bb5Swentaoy retl 7183c431bb5Swentaoy stx %o1, [%o2] 7193c431bb5Swentaoy SET_SIZE(hv_mach_set_watchdog) 7207c478bd9Sstevel@tonic-gate 7217c478bd9Sstevel@tonic-gate /* 7227c478bd9Sstevel@tonic-gate * For memory scrub 7237c478bd9Sstevel@tonic-gate * int hv_mem_scrub(uint64_t real_addr, uint64_t length, 7247c478bd9Sstevel@tonic-gate * uint64_t *scrubbed_len); 7257c478bd9Sstevel@tonic-gate * Retun %o0 -- status 7267c478bd9Sstevel@tonic-gate * %o1 -- bytes scrubbed 7277c478bd9Sstevel@tonic-gate */ 7287c478bd9Sstevel@tonic-gate ENTRY(hv_mem_scrub) 7297c478bd9Sstevel@tonic-gate mov %o2, %o4 7307c478bd9Sstevel@tonic-gate mov HV_MEM_SCRUB, %o5 7317c478bd9Sstevel@tonic-gate ta FAST_TRAP 7327c478bd9Sstevel@tonic-gate retl 7337c478bd9Sstevel@tonic-gate stx %o1, [%o4] 7347c478bd9Sstevel@tonic-gate SET_SIZE(hv_mem_scrub) 7357c478bd9Sstevel@tonic-gate 7367c478bd9Sstevel@tonic-gate /* 7377c478bd9Sstevel@tonic-gate * Flush ecache 7387c478bd9Sstevel@tonic-gate * int hv_mem_sync(uint64_t real_addr, uint64_t length, 7397c478bd9Sstevel@tonic-gate * uint64_t *flushed_len); 7407c478bd9Sstevel@tonic-gate * Retun %o0 -- status 7417c478bd9Sstevel@tonic-gate * %o1 -- bytes flushed 7427c478bd9Sstevel@tonic-gate */ 7437c478bd9Sstevel@tonic-gate ENTRY(hv_mem_sync) 7447c478bd9Sstevel@tonic-gate mov %o2, %o4 7457c478bd9Sstevel@tonic-gate mov HV_MEM_SYNC, %o5 7467c478bd9Sstevel@tonic-gate ta FAST_TRAP 7477c478bd9Sstevel@tonic-gate retl 7487c478bd9Sstevel@tonic-gate stx %o1, [%o4] 7497c478bd9Sstevel@tonic-gate SET_SIZE(hv_mem_sync) 7507c478bd9Sstevel@tonic-gate 7517c478bd9Sstevel@tonic-gate /* 7529d0d62adSJason Beloro * uint64_t hv_tm_enable(uint64_t enable) 7532f0fcb93SJason Beloro */ 7542f0fcb93SJason Beloro ENTRY(hv_tm_enable) 7552f0fcb93SJason Beloro mov HV_TM_ENABLE, %o5 7562f0fcb93SJason Beloro ta FAST_TRAP 7572f0fcb93SJason Beloro retl 7582f0fcb93SJason Beloro nop 7592f0fcb93SJason Beloro SET_SIZE(hv_tm_enable) 7602f0fcb93SJason Beloro 7612f0fcb93SJason Beloro /* 7627c478bd9Sstevel@tonic-gate * TTRACE_BUF_CONF Configure 7637c478bd9Sstevel@tonic-gate * arg0 RA base of buffer (%o0) 7647c478bd9Sstevel@tonic-gate * arg1 buf size in no. of entries (%o1) 7657c478bd9Sstevel@tonic-gate * ret0 status (%o0) 7667c478bd9Sstevel@tonic-gate * ret1 minimum size in no. of entries on failure, 7677c478bd9Sstevel@tonic-gate * actual size in no. of entries on success (%o1) 7687c478bd9Sstevel@tonic-gate */ 7697c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_buf_conf) 7707c478bd9Sstevel@tonic-gate mov TTRACE_BUF_CONF, %o5 7717c478bd9Sstevel@tonic-gate ta FAST_TRAP 7727c478bd9Sstevel@tonic-gate retl 7737c478bd9Sstevel@tonic-gate stx %o1, [%o2] 7747c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_buf_conf) 7757c478bd9Sstevel@tonic-gate 7767c478bd9Sstevel@tonic-gate /* 7777c478bd9Sstevel@tonic-gate * TTRACE_BUF_INFO 7787c478bd9Sstevel@tonic-gate * ret0 status (%o0) 7797c478bd9Sstevel@tonic-gate * ret1 RA base of buffer (%o1) 7807c478bd9Sstevel@tonic-gate * ret2 size in no. of entries (%o2) 7817c478bd9Sstevel@tonic-gate */ 7827c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_buf_info) 7837c478bd9Sstevel@tonic-gate mov %o0, %o3 7847c478bd9Sstevel@tonic-gate mov %o1, %o4 7857c478bd9Sstevel@tonic-gate mov TTRACE_BUF_INFO, %o5 7867c478bd9Sstevel@tonic-gate ta FAST_TRAP 7877c478bd9Sstevel@tonic-gate stx %o1, [%o3] 7887c478bd9Sstevel@tonic-gate retl 7897c478bd9Sstevel@tonic-gate stx %o2, [%o4] 7907c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_buf_info) 7917c478bd9Sstevel@tonic-gate 7927c478bd9Sstevel@tonic-gate /* 7937c478bd9Sstevel@tonic-gate * TTRACE_ENABLE 7947c478bd9Sstevel@tonic-gate * arg0 enable/ disable (%o0) 7957c478bd9Sstevel@tonic-gate * ret0 status (%o0) 7967c478bd9Sstevel@tonic-gate * ret1 previous enable state (%o1) 7977c478bd9Sstevel@tonic-gate */ 7987c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_enable) 7997c478bd9Sstevel@tonic-gate mov %o1, %o2 8007c478bd9Sstevel@tonic-gate mov TTRACE_ENABLE, %o5 8017c478bd9Sstevel@tonic-gate ta FAST_TRAP 8027c478bd9Sstevel@tonic-gate retl 8037c478bd9Sstevel@tonic-gate stx %o1, [%o2] 8047c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_enable) 8057c478bd9Sstevel@tonic-gate 8067c478bd9Sstevel@tonic-gate /* 8077c478bd9Sstevel@tonic-gate * TTRACE_FREEZE 8087c478bd9Sstevel@tonic-gate * arg0 enable/ freeze (%o0) 8097c478bd9Sstevel@tonic-gate * ret0 status (%o0) 8107c478bd9Sstevel@tonic-gate * ret1 previous freeze state (%o1) 8117c478bd9Sstevel@tonic-gate */ 8127c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_freeze) 8137c478bd9Sstevel@tonic-gate mov %o1, %o2 8147c478bd9Sstevel@tonic-gate mov TTRACE_FREEZE, %o5 8157c478bd9Sstevel@tonic-gate ta FAST_TRAP 8167c478bd9Sstevel@tonic-gate retl 8177c478bd9Sstevel@tonic-gate stx %o1, [%o2] 8187c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_freeze) 8197c478bd9Sstevel@tonic-gate 8207c478bd9Sstevel@tonic-gate /* 8217c478bd9Sstevel@tonic-gate * MACH_DESC 8227c478bd9Sstevel@tonic-gate * arg0 buffer real address 8237c478bd9Sstevel@tonic-gate * arg1 pointer to uint64_t for size of buffer 8247c478bd9Sstevel@tonic-gate * ret0 status 8257c478bd9Sstevel@tonic-gate * ret1 return required size of buffer / returned data size 8267c478bd9Sstevel@tonic-gate */ 8277c478bd9Sstevel@tonic-gate ENTRY(hv_mach_desc) 8287c478bd9Sstevel@tonic-gate mov %o1, %o4 ! save datap 8297c478bd9Sstevel@tonic-gate ldx [%o1], %o1 8307c478bd9Sstevel@tonic-gate mov HV_MACH_DESC, %o5 8317c478bd9Sstevel@tonic-gate ta FAST_TRAP 8327c478bd9Sstevel@tonic-gate retl 8337c478bd9Sstevel@tonic-gate stx %o1, [%o4] 8347c478bd9Sstevel@tonic-gate SET_SIZE(hv_mach_desc) 8357c478bd9Sstevel@tonic-gate 8367c478bd9Sstevel@tonic-gate /* 83769cd775fSschwartz * hv_ra2pa(uint64_t ra) 83869cd775fSschwartz * 83969cd775fSschwartz * MACH_DESC 84069cd775fSschwartz * arg0 Real address to convert 84169cd775fSschwartz * ret0 Returned physical address or -1 on error 84269cd775fSschwartz */ 84369cd775fSschwartz ENTRY(hv_ra2pa) 84469cd775fSschwartz mov HV_RA2PA, %o5 84569cd775fSschwartz ta FAST_TRAP 84669cd775fSschwartz cmp %o0, 0 84769cd775fSschwartz move %xcc, %o1, %o0 84869cd775fSschwartz movne %xcc, -1, %o0 84969cd775fSschwartz retl 85069cd775fSschwartz nop 85169cd775fSschwartz SET_SIZE(hv_ra2pa) 85269cd775fSschwartz 85369cd775fSschwartz /* 85469cd775fSschwartz * hv_hpriv(void *func, uint64_t arg1, uint64_t arg2, uint64_t arg3) 85569cd775fSschwartz * 85669cd775fSschwartz * MACH_DESC 85769cd775fSschwartz * arg0 OS function to call 85869cd775fSschwartz * arg1 First arg to OS function 85969cd775fSschwartz * arg2 Second arg to OS function 86069cd775fSschwartz * arg3 Third arg to OS function 86169cd775fSschwartz * ret0 Returned value from function 86269cd775fSschwartz */ 86369cd775fSschwartz 86469cd775fSschwartz ENTRY(hv_hpriv) 86569cd775fSschwartz mov HV_HPRIV, %o5 86669cd775fSschwartz ta FAST_TRAP 86769cd775fSschwartz retl 86869cd775fSschwartz nop 86969cd775fSschwartz SET_SIZE(hv_hpriv) 87069cd775fSschwartz 8711ae08745Sheppo /* 8721ae08745Sheppo * hv_ldc_tx_qconf(uint64_t channel, uint64_t ra_base, 8731ae08745Sheppo * uint64_t nentries); 8741ae08745Sheppo */ 8751ae08745Sheppo ENTRY(hv_ldc_tx_qconf) 8761ae08745Sheppo mov LDC_TX_QCONF, %o5 8771ae08745Sheppo ta FAST_TRAP 8781ae08745Sheppo retl 8791ae08745Sheppo nop 8801ae08745Sheppo SET_SIZE(hv_ldc_tx_qconf) 8811ae08745Sheppo 8821ae08745Sheppo 8831ae08745Sheppo /* 8841ae08745Sheppo * hv_ldc_tx_qinfo(uint64_t channel, uint64_t *ra_base, 8851ae08745Sheppo * uint64_t *nentries); 8861ae08745Sheppo */ 8871ae08745Sheppo ENTRY(hv_ldc_tx_qinfo) 8881ae08745Sheppo mov %o1, %g1 8891ae08745Sheppo mov %o2, %g2 8901ae08745Sheppo mov LDC_TX_QINFO, %o5 8911ae08745Sheppo ta FAST_TRAP 8921ae08745Sheppo stx %o1, [%g1] 8931ae08745Sheppo retl 8941ae08745Sheppo stx %o2, [%g2] 8951ae08745Sheppo SET_SIZE(hv_ldc_tx_qinfo) 8961ae08745Sheppo 8971ae08745Sheppo 8981ae08745Sheppo /* 8991ae08745Sheppo * hv_ldc_tx_get_state(uint64_t channel, 9001ae08745Sheppo * uint64_t *headp, uint64_t *tailp, uint64_t *state); 9011ae08745Sheppo */ 9021ae08745Sheppo ENTRY(hv_ldc_tx_get_state) 9031ae08745Sheppo mov LDC_TX_GET_STATE, %o5 9041ae08745Sheppo mov %o1, %g1 9051ae08745Sheppo mov %o2, %g2 9061ae08745Sheppo mov %o3, %g3 9071ae08745Sheppo ta FAST_TRAP 9081ae08745Sheppo stx %o1, [%g1] 9091ae08745Sheppo stx %o2, [%g2] 9101ae08745Sheppo retl 9111ae08745Sheppo stx %o3, [%g3] 9121ae08745Sheppo SET_SIZE(hv_ldc_tx_get_state) 9131ae08745Sheppo 9141ae08745Sheppo 9151ae08745Sheppo /* 9161ae08745Sheppo * hv_ldc_tx_set_qtail(uint64_t channel, uint64_t tail) 9171ae08745Sheppo */ 9181ae08745Sheppo ENTRY(hv_ldc_tx_set_qtail) 9191ae08745Sheppo mov LDC_TX_SET_QTAIL, %o5 9201ae08745Sheppo ta FAST_TRAP 9211ae08745Sheppo retl 9221ae08745Sheppo SET_SIZE(hv_ldc_tx_set_qtail) 9231ae08745Sheppo 9241ae08745Sheppo 9251ae08745Sheppo /* 9261ae08745Sheppo * hv_ldc_rx_qconf(uint64_t channel, uint64_t ra_base, 9271ae08745Sheppo * uint64_t nentries); 9281ae08745Sheppo */ 9291ae08745Sheppo ENTRY(hv_ldc_rx_qconf) 9301ae08745Sheppo mov LDC_RX_QCONF, %o5 9311ae08745Sheppo ta FAST_TRAP 9321ae08745Sheppo retl 9331ae08745Sheppo nop 9341ae08745Sheppo SET_SIZE(hv_ldc_rx_qconf) 9351ae08745Sheppo 9361ae08745Sheppo 9371ae08745Sheppo /* 9381ae08745Sheppo * hv_ldc_rx_qinfo(uint64_t channel, uint64_t *ra_base, 9391ae08745Sheppo * uint64_t *nentries); 9401ae08745Sheppo */ 9411ae08745Sheppo ENTRY(hv_ldc_rx_qinfo) 9421ae08745Sheppo mov %o1, %g1 9431ae08745Sheppo mov %o2, %g2 9441ae08745Sheppo mov LDC_RX_QINFO, %o5 9451ae08745Sheppo ta FAST_TRAP 9461ae08745Sheppo stx %o1, [%g1] 9471ae08745Sheppo retl 9481ae08745Sheppo stx %o2, [%g2] 9491ae08745Sheppo SET_SIZE(hv_ldc_rx_qinfo) 9501ae08745Sheppo 9511ae08745Sheppo 9521ae08745Sheppo /* 9531ae08745Sheppo * hv_ldc_rx_get_state(uint64_t channel, 9541ae08745Sheppo * uint64_t *headp, uint64_t *tailp, uint64_t *state); 9551ae08745Sheppo */ 9561ae08745Sheppo ENTRY(hv_ldc_rx_get_state) 9571ae08745Sheppo mov LDC_RX_GET_STATE, %o5 9581ae08745Sheppo mov %o1, %g1 9591ae08745Sheppo mov %o2, %g2 9601ae08745Sheppo mov %o3, %g3 9611ae08745Sheppo ta FAST_TRAP 9621ae08745Sheppo stx %o1, [%g1] 9631ae08745Sheppo stx %o2, [%g2] 9641ae08745Sheppo retl 9651ae08745Sheppo stx %o3, [%g3] 9661ae08745Sheppo SET_SIZE(hv_ldc_rx_get_state) 9671ae08745Sheppo 9681ae08745Sheppo 9691ae08745Sheppo /* 9701ae08745Sheppo * hv_ldc_rx_set_qhead(uint64_t channel, uint64_t head) 9711ae08745Sheppo */ 9721ae08745Sheppo ENTRY(hv_ldc_rx_set_qhead) 9731ae08745Sheppo mov LDC_RX_SET_QHEAD, %o5 9741ae08745Sheppo ta FAST_TRAP 9751ae08745Sheppo retl 9761ae08745Sheppo SET_SIZE(hv_ldc_rx_set_qhead) 9771ae08745Sheppo 9781ae08745Sheppo /* 9791ae08745Sheppo * hv_ldc_set_map_table(uint64_t channel, uint64_t tbl_ra, 9801ae08745Sheppo * uint64_t tbl_entries) 9811ae08745Sheppo */ 9821ae08745Sheppo ENTRY(hv_ldc_set_map_table) 9831ae08745Sheppo mov LDC_SET_MAP_TABLE, %o5 9841ae08745Sheppo ta FAST_TRAP 9851ae08745Sheppo retl 9861ae08745Sheppo nop 9871ae08745Sheppo SET_SIZE(hv_ldc_set_map_table) 9881ae08745Sheppo 9891ae08745Sheppo 9901ae08745Sheppo /* 9911ae08745Sheppo * hv_ldc_get_map_table(uint64_t channel, uint64_t *tbl_ra, 9921ae08745Sheppo * uint64_t *tbl_entries) 9931ae08745Sheppo */ 9941ae08745Sheppo ENTRY(hv_ldc_get_map_table) 9951ae08745Sheppo mov %o1, %g1 9961ae08745Sheppo mov %o2, %g2 9971ae08745Sheppo mov LDC_GET_MAP_TABLE, %o5 9981ae08745Sheppo ta FAST_TRAP 9991ae08745Sheppo stx %o1, [%g1] 10001ae08745Sheppo retl 10011ae08745Sheppo stx %o2, [%g2] 10021ae08745Sheppo SET_SIZE(hv_ldc_get_map_table) 10031ae08745Sheppo 10041ae08745Sheppo 10051ae08745Sheppo /* 10061ae08745Sheppo * hv_ldc_copy(uint64_t channel, uint64_t request, uint64_t cookie, 10071ae08745Sheppo * uint64_t raddr, uint64_t length, uint64_t *lengthp); 10081ae08745Sheppo */ 10091ae08745Sheppo ENTRY(hv_ldc_copy) 10101ae08745Sheppo mov %o5, %g1 10111ae08745Sheppo mov LDC_COPY, %o5 10121ae08745Sheppo ta FAST_TRAP 10131ae08745Sheppo retl 10141ae08745Sheppo stx %o1, [%g1] 10151ae08745Sheppo SET_SIZE(hv_ldc_copy) 10161ae08745Sheppo 10171ae08745Sheppo 10181ae08745Sheppo /* 10191ae08745Sheppo * hv_ldc_mapin(uint64_t channel, uint64_t cookie, uint64_t *raddr, 10201ae08745Sheppo * uint64_t *perm) 10211ae08745Sheppo */ 10221ae08745Sheppo ENTRY(hv_ldc_mapin) 10231ae08745Sheppo mov %o2, %g1 10241ae08745Sheppo mov %o3, %g2 10251ae08745Sheppo mov LDC_MAPIN, %o5 10261ae08745Sheppo ta FAST_TRAP 10271ae08745Sheppo stx %o1, [%g1] 10281ae08745Sheppo retl 10291ae08745Sheppo stx %o2, [%g2] 10301ae08745Sheppo SET_SIZE(hv_ldc_mapin) 10311ae08745Sheppo 10321ae08745Sheppo 10331ae08745Sheppo /* 10341ae08745Sheppo * hv_ldc_unmap(uint64_t raddr) 10351ae08745Sheppo */ 10361ae08745Sheppo ENTRY(hv_ldc_unmap) 10371ae08745Sheppo mov LDC_UNMAP, %o5 10381ae08745Sheppo ta FAST_TRAP 10391ae08745Sheppo retl 10401ae08745Sheppo nop 10411ae08745Sheppo SET_SIZE(hv_ldc_unmap) 10421ae08745Sheppo 10431ae08745Sheppo 10441ae08745Sheppo /* 10454bac2208Snarayan * hv_ldc_revoke(uint64_t channel, uint64_t cookie, 10464bac2208Snarayan * uint64_t revoke_cookie 10471ae08745Sheppo */ 10481ae08745Sheppo ENTRY(hv_ldc_revoke) 10491ae08745Sheppo mov LDC_REVOKE, %o5 10501ae08745Sheppo ta FAST_TRAP 10511ae08745Sheppo retl 10521ae08745Sheppo nop 10531ae08745Sheppo SET_SIZE(hv_ldc_revoke) 10541ae08745Sheppo 10551ae08745Sheppo 10561ae08745Sheppo /* 10571ae08745Sheppo * hvldc_intr_getcookie(uint64_t dev_hdl, uint32_t devino, 10581ae08745Sheppo * uint64_t *cookie); 10591ae08745Sheppo */ 10601ae08745Sheppo ENTRY(hvldc_intr_getcookie) 10611ae08745Sheppo mov %o2, %g1 10621ae08745Sheppo mov VINTR_GET_COOKIE, %o5 10631ae08745Sheppo ta FAST_TRAP 10641ae08745Sheppo retl 10651ae08745Sheppo stx %o1, [%g1] 10661ae08745Sheppo SET_SIZE(hvldc_intr_getcookie) 10671ae08745Sheppo 10681ae08745Sheppo /* 10691ae08745Sheppo * hvldc_intr_setcookie(uint64_t dev_hdl, uint32_t devino, 10701ae08745Sheppo * uint64_t cookie); 10711ae08745Sheppo */ 10721ae08745Sheppo ENTRY(hvldc_intr_setcookie) 10731ae08745Sheppo mov VINTR_SET_COOKIE, %o5 10741ae08745Sheppo ta FAST_TRAP 10751ae08745Sheppo retl 10761ae08745Sheppo nop 10771ae08745Sheppo SET_SIZE(hvldc_intr_setcookie) 10781ae08745Sheppo 10791ae08745Sheppo 10801ae08745Sheppo /* 10811ae08745Sheppo * hvldc_intr_getvalid(uint64_t dev_hdl, uint32_t devino, 10821ae08745Sheppo * int *intr_valid_state); 10831ae08745Sheppo */ 10841ae08745Sheppo ENTRY(hvldc_intr_getvalid) 10851ae08745Sheppo mov %o2, %g1 10861ae08745Sheppo mov VINTR_GET_VALID, %o5 10871ae08745Sheppo ta FAST_TRAP 10881ae08745Sheppo retl 10891ae08745Sheppo stuw %o1, [%g1] 10901ae08745Sheppo SET_SIZE(hvldc_intr_getvalid) 10911ae08745Sheppo 10921ae08745Sheppo /* 10931ae08745Sheppo * hvldc_intr_setvalid(uint64_t dev_hdl, uint32_t devino, 10941ae08745Sheppo * int intr_valid_state); 10951ae08745Sheppo */ 10961ae08745Sheppo ENTRY(hvldc_intr_setvalid) 10971ae08745Sheppo mov VINTR_SET_VALID, %o5 10981ae08745Sheppo ta FAST_TRAP 10991ae08745Sheppo retl 11001ae08745Sheppo nop 11011ae08745Sheppo SET_SIZE(hvldc_intr_setvalid) 11021ae08745Sheppo 11031ae08745Sheppo /* 11041ae08745Sheppo * hvldc_intr_getstate(uint64_t dev_hdl, uint32_t devino, 11051ae08745Sheppo * int *intr_state); 11061ae08745Sheppo */ 11071ae08745Sheppo ENTRY(hvldc_intr_getstate) 11081ae08745Sheppo mov %o2, %g1 11091ae08745Sheppo mov VINTR_GET_STATE, %o5 11101ae08745Sheppo ta FAST_TRAP 11111ae08745Sheppo retl 11121ae08745Sheppo stuw %o1, [%g1] 11131ae08745Sheppo SET_SIZE(hvldc_intr_getstate) 11141ae08745Sheppo 11151ae08745Sheppo /* 11161ae08745Sheppo * hvldc_intr_setstate(uint64_t dev_hdl, uint32_t devino, 11171ae08745Sheppo * int intr_state); 11181ae08745Sheppo */ 11191ae08745Sheppo ENTRY(hvldc_intr_setstate) 11201ae08745Sheppo mov VINTR_SET_STATE, %o5 11211ae08745Sheppo ta FAST_TRAP 11221ae08745Sheppo retl 11231ae08745Sheppo nop 11241ae08745Sheppo SET_SIZE(hvldc_intr_setstate) 11251ae08745Sheppo 11261ae08745Sheppo /* 11271ae08745Sheppo * hvldc_intr_gettarget(uint64_t dev_hdl, uint32_t devino, 11281ae08745Sheppo * uint32_t *cpuid); 11291ae08745Sheppo */ 11301ae08745Sheppo ENTRY(hvldc_intr_gettarget) 11311ae08745Sheppo mov %o2, %g1 11321ae08745Sheppo mov VINTR_GET_TARGET, %o5 11331ae08745Sheppo ta FAST_TRAP 11341ae08745Sheppo retl 11351ae08745Sheppo stuw %o1, [%g1] 11361ae08745Sheppo SET_SIZE(hvldc_intr_gettarget) 11371ae08745Sheppo 11381ae08745Sheppo /* 11391ae08745Sheppo * hvldc_intr_settarget(uint64_t dev_hdl, uint32_t devino, 11401ae08745Sheppo * uint32_t cpuid); 11411ae08745Sheppo */ 11421ae08745Sheppo ENTRY(hvldc_intr_settarget) 11431ae08745Sheppo mov VINTR_SET_TARGET, %o5 11441ae08745Sheppo ta FAST_TRAP 11451ae08745Sheppo retl 11461ae08745Sheppo nop 11471ae08745Sheppo SET_SIZE(hvldc_intr_settarget) 11481ae08745Sheppo 11491ae08745Sheppo /* 11501ae08745Sheppo * hv_api_get_version(uint64_t api_group, uint64_t *majorp, 11511ae08745Sheppo * uint64_t *minorp) 11521ae08745Sheppo * 11531ae08745Sheppo * API_GET_VERSION 11541ae08745Sheppo * arg0 API group 11551ae08745Sheppo * ret0 status 11561ae08745Sheppo * ret1 major number 11571ae08745Sheppo * ret2 minor number 11581ae08745Sheppo */ 11591ae08745Sheppo ENTRY(hv_api_get_version) 11601ae08745Sheppo mov %o1, %o3 11611ae08745Sheppo mov %o2, %o4 11621ae08745Sheppo mov API_GET_VERSION, %o5 11631ae08745Sheppo ta CORE_TRAP 11641ae08745Sheppo stx %o1, [%o3] 11651ae08745Sheppo retl 11661ae08745Sheppo stx %o2, [%o4] 11671ae08745Sheppo SET_SIZE(hv_api_get_version) 11681ae08745Sheppo 11691ae08745Sheppo /* 11701ae08745Sheppo * hv_api_set_version(uint64_t api_group, uint64_t major, 11711ae08745Sheppo * uint64_t minor, uint64_t *supported_minor) 11721ae08745Sheppo * 11731ae08745Sheppo * API_SET_VERSION 11741ae08745Sheppo * arg0 API group 11751ae08745Sheppo * arg1 major number 11761ae08745Sheppo * arg2 requested minor number 11771ae08745Sheppo * ret0 status 11781ae08745Sheppo * ret1 actual minor number 11791ae08745Sheppo */ 11801ae08745Sheppo ENTRY(hv_api_set_version) 11811ae08745Sheppo mov %o3, %o4 11821ae08745Sheppo mov API_SET_VERSION, %o5 11831ae08745Sheppo ta CORE_TRAP 11841ae08745Sheppo retl 11851ae08745Sheppo stx %o1, [%o4] 11861ae08745Sheppo SET_SIZE(hv_api_set_version) 11871ae08745Sheppo 1188136097ceSjb145095 /* 1189136097ceSjb145095 * %o0 - buffer real address 1190136097ceSjb145095 * %o1 - buffer size 1191136097ceSjb145095 * %o2 - &characters written 1192136097ceSjb145095 * returns 1193136097ceSjb145095 * status 1194136097ceSjb145095 */ 1195136097ceSjb145095 ENTRY(hv_cnwrite) 1196136097ceSjb145095 mov CONS_WRITE, %o5 1197136097ceSjb145095 ta FAST_TRAP 1198136097ceSjb145095 retl 1199136097ceSjb145095 stx %o1, [%o2] 1200136097ceSjb145095 SET_SIZE(hv_cnwrite) 1201136097ceSjb145095 1202136097ceSjb145095 /* 1203136097ceSjb145095 * %o0 character buffer ra 1204136097ceSjb145095 * %o1 buffer size 1205136097ceSjb145095 * %o2 pointer to returned size 1206136097ceSjb145095 * return values: 1207136097ceSjb145095 * 0 success 1208136097ceSjb145095 * hv_errno failure 1209136097ceSjb145095 */ 1210136097ceSjb145095 ENTRY(hv_cnread) 1211136097ceSjb145095 mov CONS_READ, %o5 1212136097ceSjb145095 ta FAST_TRAP 1213136097ceSjb145095 brnz,a %o0, 1f ! failure, just return error 1214136097ceSjb145095 nop 1215136097ceSjb145095 1216136097ceSjb145095 cmp %o1, H_BREAK 1217136097ceSjb145095 be 1f 1218136097ceSjb145095 mov %o1, %o0 1219136097ceSjb145095 1220136097ceSjb145095 cmp %o1, H_HUP 1221136097ceSjb145095 be 1f 1222136097ceSjb145095 mov %o1, %o0 1223136097ceSjb145095 1224136097ceSjb145095 stx %o1, [%o2] ! success, save count and return 0 1225136097ceSjb145095 mov 0, %o0 1226136097ceSjb1450951: 1227136097ceSjb145095 retl 1228136097ceSjb145095 nop 1229136097ceSjb145095 SET_SIZE(hv_cnread) 1230136097ceSjb145095 12313b890a5bSjb145095 /* 12323b890a5bSjb145095 * SOFT_STATE_SET 12333b890a5bSjb145095 * arg0 state (%o0) 12343b890a5bSjb145095 * arg1 string (%o1) 12353b890a5bSjb145095 * ret0 status (%o0) 12363b890a5bSjb145095 */ 12373b890a5bSjb145095 ENTRY(hv_soft_state_set) 12383b890a5bSjb145095 mov SOFT_STATE_SET, %o5 12393b890a5bSjb145095 ta FAST_TRAP 12403b890a5bSjb145095 retl 12413b890a5bSjb145095 nop 12423b890a5bSjb145095 SET_SIZE(hv_soft_state_set) 12433b890a5bSjb145095 12443b890a5bSjb145095 /* 12453b890a5bSjb145095 * SOFT_STATE_GET 12463b890a5bSjb145095 * arg0 string buffer (%o0) 12473b890a5bSjb145095 * ret0 status (%o0) 12483b890a5bSjb145095 * ret1 current state (%o1) 12493b890a5bSjb145095 */ 12503b890a5bSjb145095 ENTRY(hv_soft_state_get) 12513b890a5bSjb145095 mov %o1, %o2 12523b890a5bSjb145095 mov SOFT_STATE_GET, %o5 12533b890a5bSjb145095 ta FAST_TRAP 12543b890a5bSjb145095 retl 12553b890a5bSjb145095 stx %o1, [%o2] 12563b890a5bSjb145095 SET_SIZE(hv_soft_state_get) 12573b890a5bSjb145095 1258023e71deSHaik Aftandilian ENTRY(hv_guest_suspend) 1259023e71deSHaik Aftandilian mov GUEST_SUSPEND, %o5 1260023e71deSHaik Aftandilian ta FAST_TRAP 1261023e71deSHaik Aftandilian retl 1262023e71deSHaik Aftandilian nop 1263023e71deSHaik Aftandilian SET_SIZE(hv_guest_suspend) 1264023e71deSHaik Aftandilian 1265023e71deSHaik Aftandilian ENTRY(hv_tick_set_npt) 1266023e71deSHaik Aftandilian mov TICK_SET_NPT, %o5 1267023e71deSHaik Aftandilian ta FAST_TRAP 1268023e71deSHaik Aftandilian retl 1269023e71deSHaik Aftandilian nop 1270023e71deSHaik Aftandilian SET_SIZE(hv_tick_set_npt) 1271023e71deSHaik Aftandilian 1272023e71deSHaik Aftandilian ENTRY(hv_stick_set_npt) 1273023e71deSHaik Aftandilian mov STICK_SET_NPT, %o5 1274023e71deSHaik Aftandilian ta FAST_TRAP 1275023e71deSHaik Aftandilian retl 1276023e71deSHaik Aftandilian nop 1277023e71deSHaik Aftandilian SET_SIZE(hv_stick_set_npt) 1278023e71deSHaik Aftandilian 1279*4df55fdeSJanie Lu /* 1280*4df55fdeSJanie Lu * REBOOT_DATA_SET 1281*4df55fdeSJanie Lu * arg0 buffer real address 1282*4df55fdeSJanie Lu * arg1 buffer length 1283*4df55fdeSJanie Lu * ret0 status 1284*4df55fdeSJanie Lu */ 1285*4df55fdeSJanie Lu ENTRY(hv_reboot_data_set) 1286*4df55fdeSJanie Lu mov HV_REBOOT_DATA_SET, %o5 1287*4df55fdeSJanie Lu ta FAST_TRAP 1288*4df55fdeSJanie Lu retl 1289*4df55fdeSJanie Lu nop 1290*4df55fdeSJanie Lu SET_SIZE(hv_reboot_data_set) 1291*4df55fdeSJanie Lu 12927c478bd9Sstevel@tonic-gate#endif /* lint || __lint */ 1293