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*34f94fbcSWENTAO YANG * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate/* 277c478bd9Sstevel@tonic-gate * Hypervisor calls 287c478bd9Sstevel@tonic-gate */ 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate#include <sys/asm_linkage.h> 317c478bd9Sstevel@tonic-gate#include <sys/machasi.h> 327c478bd9Sstevel@tonic-gate#include <sys/machparam.h> 337c478bd9Sstevel@tonic-gate#include <sys/hypervisor_api.h> 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate#if defined(lint) || defined(__lint) 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 381ae08745Sheppouint64_t 391ae08745Sheppohv_mach_exit(uint64_t exit_code) 401ae08745Sheppo{ return (0); } 411ae08745Sheppo 421ae08745Sheppouint64_t 431ae08745Sheppohv_mach_sir(void) 441ae08745Sheppo{ return (0); } 451ae08745Sheppo 461ae08745Sheppo/*ARGSUSED*/ 471ae08745Sheppouint64_t 481ae08745Sheppohv_cpu_start(uint64_t cpuid, uint64_t pc, uint64_t rtba, uint64_t arg) 491ae08745Sheppo{ return (0); } 501ae08745Sheppo 511ae08745Sheppo/*ARGSUSED*/ 521ae08745Sheppouint64_t 531ae08745Sheppohv_cpu_stop(uint64_t cpuid) 541ae08745Sheppo{ return (0); } 551ae08745Sheppo 561ae08745Sheppo/*ARGSUSED*/ 571ae08745Sheppouint64_t 581ae08745Sheppohv_cpu_set_rtba(uint64_t *rtba) 591ae08745Sheppo{ return (0); } 601ae08745Sheppo 611ae08745Sheppo/*ARGSUSED*/ 627c478bd9Sstevel@tonic-gateint64_t 637c478bd9Sstevel@tonic-gatehv_cnputchar(uint8_t ch) 647c478bd9Sstevel@tonic-gate{ return (0); } 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 677c478bd9Sstevel@tonic-gateint64_t 687c478bd9Sstevel@tonic-gatehv_cngetchar(uint8_t *ch) 697c478bd9Sstevel@tonic-gate{ return (0); } 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 727c478bd9Sstevel@tonic-gateuint64_t 737c478bd9Sstevel@tonic-gatehv_tod_get(uint64_t *seconds) 747c478bd9Sstevel@tonic-gate{ return (0); } 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 777c478bd9Sstevel@tonic-gateuint64_t 787c478bd9Sstevel@tonic-gatehv_tod_set(uint64_t seconds) 797c478bd9Sstevel@tonic-gate{ return (0);} 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 827c478bd9Sstevel@tonic-gateuint64_t 837c478bd9Sstevel@tonic-gatehv_mmu_map_perm_addr(void *vaddr, int ctx, uint64_t tte, int flags) 847c478bd9Sstevel@tonic-gate{ return (0); } 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gate/*ARGSUSED */ 877c478bd9Sstevel@tonic-gateuint64_t 881ae08745Sheppohv_mmu_fault_area_conf(void *raddr) 891ae08745Sheppo{ return (0); } 901ae08745Sheppo 911ae08745Sheppo/*ARGSUSED*/ 921ae08745Sheppouint64_t 937c478bd9Sstevel@tonic-gatehv_mmu_unmap_perm_addr(void *vaddr, int ctx, int flags) 947c478bd9Sstevel@tonic-gate{ return (0); } 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 977c478bd9Sstevel@tonic-gateuint64_t 987c478bd9Sstevel@tonic-gatehv_set_ctx0(uint64_t ntsb_descriptor, uint64_t desc_ra) 997c478bd9Sstevel@tonic-gate{ return (0); } 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1027c478bd9Sstevel@tonic-gateuint64_t 1037c478bd9Sstevel@tonic-gatehv_set_ctxnon0(uint64_t ntsb_descriptor, uint64_t desc_ra) 1047c478bd9Sstevel@tonic-gate{ return (0); } 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate#ifdef SET_MMU_STATS 1077c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1087c478bd9Sstevel@tonic-gateuint64_t 1097c478bd9Sstevel@tonic-gatehv_mmu_set_stat_area(uint64_t rstatarea, uint64_t size) 1107c478bd9Sstevel@tonic-gate{ return (0); } 1117c478bd9Sstevel@tonic-gate#endif /* SET_MMU_STATS */ 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1147c478bd9Sstevel@tonic-gateuint64_t 1157c478bd9Sstevel@tonic-gatehv_cpu_qconf(int queue, uint64_t paddr, int size) 1167c478bd9Sstevel@tonic-gate{ return (0); } 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1197c478bd9Sstevel@tonic-gateuint64_t 1207c478bd9Sstevel@tonic-gatehvio_intr_devino_to_sysino(uint64_t dev_hdl, uint32_t devino, uint64_t *sysino) 1217c478bd9Sstevel@tonic-gate{ return (0); } 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1247c478bd9Sstevel@tonic-gateuint64_t 1257c478bd9Sstevel@tonic-gatehvio_intr_getvalid(uint64_t sysino, int *intr_valid_state) 1267c478bd9Sstevel@tonic-gate{ return (0); } 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1297c478bd9Sstevel@tonic-gateuint64_t 1307c478bd9Sstevel@tonic-gatehvio_intr_setvalid(uint64_t sysino, int intr_valid_state) 1317c478bd9Sstevel@tonic-gate{ return (0); } 1327c478bd9Sstevel@tonic-gate 1337c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1347c478bd9Sstevel@tonic-gateuint64_t 1357c478bd9Sstevel@tonic-gatehvio_intr_getstate(uint64_t sysino, int *intr_state) 1367c478bd9Sstevel@tonic-gate{ return (0); } 1377c478bd9Sstevel@tonic-gate 1387c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1397c478bd9Sstevel@tonic-gateuint64_t 1407c478bd9Sstevel@tonic-gatehvio_intr_setstate(uint64_t sysino, int intr_state) 1417c478bd9Sstevel@tonic-gate{ return (0); } 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1447c478bd9Sstevel@tonic-gateuint64_t 1457c478bd9Sstevel@tonic-gatehvio_intr_gettarget(uint64_t sysino, uint32_t *cpuid) 1467c478bd9Sstevel@tonic-gate{ return (0); } 1477c478bd9Sstevel@tonic-gate 1487c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1497c478bd9Sstevel@tonic-gateuint64_t 1507c478bd9Sstevel@tonic-gatehvio_intr_settarget(uint64_t sysino, uint32_t cpuid) 1517c478bd9Sstevel@tonic-gate{ return (0); } 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gateuint64_t 1547c478bd9Sstevel@tonic-gatehv_cpu_yield(void) 1557c478bd9Sstevel@tonic-gate{ return (0); } 1567c478bd9Sstevel@tonic-gate 1577c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1587c478bd9Sstevel@tonic-gateuint64_t 1597c478bd9Sstevel@tonic-gatehv_cpu_state(uint64_t cpuid, uint64_t *cpu_state) 1607c478bd9Sstevel@tonic-gate{ return (0); } 1617c478bd9Sstevel@tonic-gate 1627c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1637c478bd9Sstevel@tonic-gateuint64_t 1647c478bd9Sstevel@tonic-gatehv_dump_buf_update(uint64_t paddr, uint64_t size, uint64_t *minsize) 1657c478bd9Sstevel@tonic-gate{ return (0); } 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1687c478bd9Sstevel@tonic-gateuint64_t 1697c478bd9Sstevel@tonic-gatehv_mem_scrub(uint64_t real_addr, uint64_t length, uint64_t *scrubbed_len) 1707c478bd9Sstevel@tonic-gate{ return (0); } 1717c478bd9Sstevel@tonic-gate 1727c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1737c478bd9Sstevel@tonic-gateuint64_t 1747c478bd9Sstevel@tonic-gatehv_mem_sync(uint64_t real_addr, uint64_t length, uint64_t *flushed_len) 1757c478bd9Sstevel@tonic-gate{ return (0); } 1767c478bd9Sstevel@tonic-gate 1777c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1787c478bd9Sstevel@tonic-gateuint64_t 1797c478bd9Sstevel@tonic-gatehv_ttrace_buf_conf(uint64_t paddr, uint64_t size, uint64_t *size1) 1807c478bd9Sstevel@tonic-gate{ return (0); } 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1837c478bd9Sstevel@tonic-gateuint64_t 1847c478bd9Sstevel@tonic-gatehv_ttrace_buf_info(uint64_t *paddr, uint64_t *size) 1857c478bd9Sstevel@tonic-gate{ return (0); } 1867c478bd9Sstevel@tonic-gate 1877c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1887c478bd9Sstevel@tonic-gateuint64_t 1897c478bd9Sstevel@tonic-gatehv_ttrace_enable(uint64_t enable, uint64_t *prev_enable) 1907c478bd9Sstevel@tonic-gate{ return (0); } 1917c478bd9Sstevel@tonic-gate 1927c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1937c478bd9Sstevel@tonic-gateuint64_t 1947c478bd9Sstevel@tonic-gatehv_ttrace_freeze(uint64_t freeze, uint64_t *prev_freeze) 1957c478bd9Sstevel@tonic-gate{ return (0); } 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 1987c478bd9Sstevel@tonic-gateuint64_t 1997c478bd9Sstevel@tonic-gatehv_mach_desc(uint64_t buffer_ra, uint64_t *buffer_sizep) 2007c478bd9Sstevel@tonic-gate{ return (0); } 2017c478bd9Sstevel@tonic-gate 2027c478bd9Sstevel@tonic-gate/*ARGSUSED*/ 2037c478bd9Sstevel@tonic-gateuint64_t 20469cd775fSschwartzhv_ra2pa(uint64_t ra) 20569cd775fSschwartz{ return (0); } 20669cd775fSschwartz 20769cd775fSschwartz/*ARGSUSED*/ 20869cd775fSschwartzuint64_t 20969cd775fSschwartzhv_hpriv(void *func, uint64_t arg1, uint64_t arg2, uint64_t arg3) 21069cd775fSschwartz{ return (0); } 21169cd775fSschwartz 2121ae08745Sheppo/*ARGSUSED*/ 2131ae08745Sheppouint64_t 2141ae08745Sheppohv_ldc_tx_qconf(uint64_t channel, uint64_t ra_base, uint64_t nentries) 2151ae08745Sheppo{ return (0); } 2161ae08745Sheppo 2171ae08745Sheppo/*ARGSUSED*/ 2181ae08745Sheppouint64_t 2191ae08745Sheppohv_ldc_tx_qinfo(uint64_t channel, uint64_t *ra_base, uint64_t *nentries) 2201ae08745Sheppo{ return (0); } 2211ae08745Sheppo 2221ae08745Sheppo/*ARGSUSED*/ 2231ae08745Sheppouint64_t 2241ae08745Sheppohv_ldc_tx_get_state(uint64_t channel, 2251ae08745Sheppo uint64_t *headp, uint64_t *tailp, uint64_t *state) 2261ae08745Sheppo{ return (0); } 2271ae08745Sheppo 2281ae08745Sheppo/*ARGSUSED*/ 2291ae08745Sheppouint64_t 2301ae08745Sheppohv_ldc_tx_set_qtail(uint64_t channel, uint64_t tail) 2311ae08745Sheppo{ return (0); } 2321ae08745Sheppo 2331ae08745Sheppo/*ARGSUSED*/ 2341ae08745Sheppouint64_t 2351ae08745Sheppohv_ldc_rx_qconf(uint64_t channel, uint64_t ra_base, uint64_t nentries) 2361ae08745Sheppo{ return (0); } 2371ae08745Sheppo 2381ae08745Sheppo/*ARGSUSED*/ 2391ae08745Sheppouint64_t 2401ae08745Sheppohv_ldc_rx_qinfo(uint64_t channel, uint64_t *ra_base, uint64_t *nentries) 2411ae08745Sheppo{ return (0); } 2421ae08745Sheppo 2431ae08745Sheppo/*ARGSUSED*/ 2441ae08745Sheppouint64_t 2451ae08745Sheppohv_ldc_rx_get_state(uint64_t channel, 2461ae08745Sheppo uint64_t *headp, uint64_t *tailp, uint64_t *state) 2471ae08745Sheppo{ return (0); } 2481ae08745Sheppo 2491ae08745Sheppo/*ARGSUSED*/ 2501ae08745Sheppouint64_t 2511ae08745Sheppohv_ldc_rx_set_qhead(uint64_t channel, uint64_t head) 2521ae08745Sheppo{ return (0); } 2531ae08745Sheppo 2541ae08745Sheppo/*ARGSUSED*/ 2551ae08745Sheppouint64_t 2561ae08745Sheppohv_ldc_send_msg(uint64_t channel, uint64_t msg_ra) 2571ae08745Sheppo{ return (0); } 2581ae08745Sheppo 2591ae08745Sheppo/*ARGSUSED*/ 2601ae08745Sheppouint64_t 2611ae08745Sheppohv_ldc_set_map_table(uint64_t channel, uint64_t tbl_ra, uint64_t tbl_entries) 2621ae08745Sheppo{ return (0); } 2631ae08745Sheppo 2641ae08745Sheppo/*ARGSUSED*/ 2651ae08745Sheppouint64_t 2661ae08745Sheppohv_ldc_copy(uint64_t channel, uint64_t request, uint64_t cookie, 2671ae08745Sheppo uint64_t raddr, uint64_t length, uint64_t *lengthp) 2681ae08745Sheppo{ return (0); } 2691ae08745Sheppo 2701ae08745Sheppo/*ARGSUSED*/ 2711ae08745Sheppouint64_t 2721ae08745Sheppohvldc_intr_getcookie(uint64_t dev_hdl, uint32_t devino, uint64_t *cookie) 2731ae08745Sheppo{ return (0); } 2741ae08745Sheppo 2751ae08745Sheppo/*ARGSUSED*/ 2761ae08745Sheppouint64_t 2771ae08745Sheppohvldc_intr_setcookie(uint64_t dev_hdl, uint32_t devino, uint64_t cookie) 2781ae08745Sheppo{ return (0); } 2791ae08745Sheppo 2801ae08745Sheppo/*ARGSUSED*/ 2811ae08745Sheppouint64_t 2821ae08745Sheppohvldc_intr_getvalid(uint64_t dev_hdl, uint32_t devino, int *intr_valid_state) 2831ae08745Sheppo{ return (0); } 2841ae08745Sheppo 2851ae08745Sheppo/*ARGSUSED*/ 2861ae08745Sheppouint64_t 2871ae08745Sheppohvldc_intr_setvalid(uint64_t dev_hdl, uint32_t devino, int intr_valid_state) 2881ae08745Sheppo{ return (0); } 2891ae08745Sheppo 2901ae08745Sheppo/*ARGSUSED*/ 2911ae08745Sheppouint64_t 2921ae08745Sheppohvldc_intr_getstate(uint64_t dev_hdl, uint32_t devino, int *intr_state) 2931ae08745Sheppo{ return (0); } 2941ae08745Sheppo 2951ae08745Sheppo/*ARGSUSED*/ 2961ae08745Sheppouint64_t 2971ae08745Sheppohvldc_intr_setstate(uint64_t dev_hdl, uint32_t devino, int intr_state) 2981ae08745Sheppo{ return (0); } 2991ae08745Sheppo 3001ae08745Sheppo/*ARGSUSED*/ 3011ae08745Sheppouint64_t 3021ae08745Sheppohvldc_intr_gettarget(uint64_t dev_hdl, uint32_t devino, uint32_t *cpuid) 3031ae08745Sheppo{ return (0); } 3041ae08745Sheppo 3051ae08745Sheppo/*ARGSUSED*/ 3061ae08745Sheppouint64_t 3071ae08745Sheppohvldc_intr_settarget(uint64_t dev_hdl, uint32_t devino, uint32_t cpuid) 3081ae08745Sheppo{ return (0); } 3091ae08745Sheppo 3101ae08745Sheppo/*ARGSUSED*/ 3111ae08745Sheppouint64_t 3121ae08745Sheppohv_api_get_version(uint64_t api_group, uint64_t *majorp, uint64_t *minorp) 3131ae08745Sheppo{ return (0); } 3141ae08745Sheppo 3151ae08745Sheppo/*ARGSUSED*/ 3161ae08745Sheppouint64_t 3171ae08745Sheppohv_api_set_version(uint64_t api_group, uint64_t major, uint64_t minor, 3181ae08745Sheppo uint64_t *supported_minor) 3191ae08745Sheppo{ return (0); } 3201ae08745Sheppo 3213c431bb5Swentaoy/*ARGSUSED*/ 3223c431bb5Swentaoyuint64_t 3232f0fcb93SJason Belorohv_tm_enable(uint64_t enable) 3242f0fcb93SJason Beloro{ return (0); } 3252f0fcb93SJason Beloro 3262f0fcb93SJason Beloro/*ARGSUSED*/ 3272f0fcb93SJason Belorouint64_t 3283c431bb5Swentaoyhv_mach_set_watchdog(uint64_t timeout, uint64_t *time_remaining) 3293c431bb5Swentaoy{ return (0); } 3303c431bb5Swentaoy 331136097ceSjb145095/*ARGSUSED*/ 332136097ceSjb145095int64_t 333136097ceSjb145095hv_cnwrite(uint64_t buf_ra, uint64_t count, uint64_t *retcount) 334136097ceSjb145095{ return (0); } 335136097ceSjb145095 336136097ceSjb145095/*ARGSUSED*/ 337136097ceSjb145095int64_t 338136097ceSjb145095hv_cnread(uint64_t buf_ra, uint64_t count, int64_t *retcount) 339136097ceSjb145095{ return (0); } 340136097ceSjb145095 3413b890a5bSjb145095/*ARGSUSED*/ 3423b890a5bSjb145095uint64_t 3433b890a5bSjb145095hv_soft_state_set(uint64_t state, uint64_t string) 3443b890a5bSjb145095{ return (0); } 3453b890a5bSjb145095 3463b890a5bSjb145095/*ARGSUSED*/ 3473b890a5bSjb145095uint64_t 3483b890a5bSjb145095hv_soft_state_get(uint64_t string, uint64_t *state) 3494df55fdeSJanie Lu{ return (0); }uint64_t 350023e71deSHaik Aftandilianhv_guest_suspend(void) 351023e71deSHaik Aftandilian{ return (0); } 352023e71deSHaik Aftandilian 353023e71deSHaik Aftandilian/*ARGSUSED*/ 354023e71deSHaik Aftandilianuint64_t 355c1374a13SSurya Prakkihv_tick_set_npt(uint64_t npt) 356023e71deSHaik Aftandilian{ return (0); } 357023e71deSHaik Aftandilian 358023e71deSHaik Aftandilian/*ARGSUSED*/ 359023e71deSHaik Aftandilianuint64_t 360c1374a13SSurya Prakkihv_stick_set_npt(uint64_t npt) 361023e71deSHaik Aftandilian{ return (0); } 362023e71deSHaik Aftandilian 3634df55fdeSJanie Lu/*ARGSUSED*/ 3644df55fdeSJanie Luuint64_t 3654df55fdeSJanie Luhv_reboot_data_set(uint64_t buffer_ra, uint64_t buffer_len) 3664df55fdeSJanie Lu{ return (0); } 3674df55fdeSJanie Lu 3687c478bd9Sstevel@tonic-gate#else /* lint || __lint */ 3697c478bd9Sstevel@tonic-gate 3707c478bd9Sstevel@tonic-gate /* 3711ae08745Sheppo * int hv_mach_exit(uint64_t exit_code) 3721ae08745Sheppo */ 3731ae08745Sheppo ENTRY(hv_mach_exit) 3741ae08745Sheppo mov HV_MACH_EXIT, %o5 3751ae08745Sheppo ta FAST_TRAP 3761ae08745Sheppo retl 3771ae08745Sheppo nop 3781ae08745Sheppo SET_SIZE(hv_mach_exit) 3791ae08745Sheppo 3801ae08745Sheppo /* 3811ae08745Sheppo * uint64_t hv_mach_sir(void) 3821ae08745Sheppo */ 3831ae08745Sheppo ENTRY(hv_mach_sir) 3841ae08745Sheppo mov HV_MACH_SIR, %o5 3851ae08745Sheppo ta FAST_TRAP 3861ae08745Sheppo retl 3871ae08745Sheppo nop 3881ae08745Sheppo SET_SIZE(hv_mach_sir) 3891ae08745Sheppo 3901ae08745Sheppo /* 3911ae08745Sheppo * hv_cpu_start(uint64_t cpuid, uint64_t pc, ui64_t rtba, 3921ae08745Sheppo * uint64_t arg) 3931ae08745Sheppo */ 3941ae08745Sheppo ENTRY(hv_cpu_start) 3951ae08745Sheppo mov HV_CPU_START, %o5 3961ae08745Sheppo ta FAST_TRAP 3971ae08745Sheppo retl 3981ae08745Sheppo nop 3991ae08745Sheppo SET_SIZE(hv_cpu_start) 4001ae08745Sheppo 4011ae08745Sheppo /* 4021ae08745Sheppo * hv_cpu_stop(uint64_t cpuid) 4031ae08745Sheppo */ 4041ae08745Sheppo ENTRY(hv_cpu_stop) 4051ae08745Sheppo mov HV_CPU_STOP, %o5 4061ae08745Sheppo ta FAST_TRAP 4071ae08745Sheppo retl 4081ae08745Sheppo nop 4091ae08745Sheppo SET_SIZE(hv_cpu_stop) 4101ae08745Sheppo 4111ae08745Sheppo /* 4121ae08745Sheppo * hv_cpu_set_rtba(uint64_t *rtba) 4131ae08745Sheppo */ 4141ae08745Sheppo ENTRY(hv_cpu_set_rtba) 4151ae08745Sheppo mov %o0, %o2 4161ae08745Sheppo ldx [%o2], %o0 4171ae08745Sheppo mov HV_CPU_SET_RTBA, %o5 4181ae08745Sheppo ta FAST_TRAP 4191ae08745Sheppo stx %o1, [%o2] 4201ae08745Sheppo retl 4211ae08745Sheppo nop 4221ae08745Sheppo SET_SIZE(hv_cpu_set_rtba) 4231ae08745Sheppo 4241ae08745Sheppo /* 4251ae08745Sheppo * int64_t hv_cnputchar(uint8_t ch) 4267c478bd9Sstevel@tonic-gate */ 4277c478bd9Sstevel@tonic-gate ENTRY(hv_cnputchar) 4281ae08745Sheppo mov CONS_PUTCHAR, %o5 4297c478bd9Sstevel@tonic-gate ta FAST_TRAP 4307c478bd9Sstevel@tonic-gate retl 4311ae08745Sheppo nop 4327c478bd9Sstevel@tonic-gate SET_SIZE(hv_cnputchar) 4337c478bd9Sstevel@tonic-gate 4347c478bd9Sstevel@tonic-gate /* 4351ae08745Sheppo * int64_t hv_cngetchar(uint8_t *ch) 4367c478bd9Sstevel@tonic-gate */ 4377c478bd9Sstevel@tonic-gate ENTRY(hv_cngetchar) 4387c478bd9Sstevel@tonic-gate mov %o0, %o2 4391ae08745Sheppo mov CONS_GETCHAR, %o5 4407c478bd9Sstevel@tonic-gate ta FAST_TRAP 4417c478bd9Sstevel@tonic-gate brnz,a %o0, 1f ! failure, just return error 4421ae08745Sheppo nop 4437c478bd9Sstevel@tonic-gate 4447c478bd9Sstevel@tonic-gate cmp %o1, H_BREAK 4457c478bd9Sstevel@tonic-gate be 1f 4467c478bd9Sstevel@tonic-gate mov %o1, %o0 4477c478bd9Sstevel@tonic-gate 4487c478bd9Sstevel@tonic-gate cmp %o1, H_HUP 4497c478bd9Sstevel@tonic-gate be 1f 4507c478bd9Sstevel@tonic-gate mov %o1, %o0 4517c478bd9Sstevel@tonic-gate 4527c478bd9Sstevel@tonic-gate stb %o1, [%o2] ! success, save character and return 0 4537c478bd9Sstevel@tonic-gate mov 0, %o0 4547c478bd9Sstevel@tonic-gate1: 4557c478bd9Sstevel@tonic-gate retl 4567c478bd9Sstevel@tonic-gate nop 4577c478bd9Sstevel@tonic-gate SET_SIZE(hv_cngetchar) 4587c478bd9Sstevel@tonic-gate 4597c478bd9Sstevel@tonic-gate ENTRY(hv_tod_get) 4607c478bd9Sstevel@tonic-gate mov %o0, %o4 4617c478bd9Sstevel@tonic-gate mov TOD_GET, %o5 4627c478bd9Sstevel@tonic-gate ta FAST_TRAP 4637c478bd9Sstevel@tonic-gate retl 4647c478bd9Sstevel@tonic-gate stx %o1, [%o4] 4657c478bd9Sstevel@tonic-gate SET_SIZE(hv_tod_get) 4667c478bd9Sstevel@tonic-gate 4677c478bd9Sstevel@tonic-gate ENTRY(hv_tod_set) 4687c478bd9Sstevel@tonic-gate mov TOD_SET, %o5 4697c478bd9Sstevel@tonic-gate ta FAST_TRAP 4707c478bd9Sstevel@tonic-gate retl 4717c478bd9Sstevel@tonic-gate nop 4727c478bd9Sstevel@tonic-gate SET_SIZE(hv_tod_set) 4737c478bd9Sstevel@tonic-gate 4747c478bd9Sstevel@tonic-gate /* 4757c478bd9Sstevel@tonic-gate * Map permanent address 4767c478bd9Sstevel@tonic-gate * arg0 vaddr (%o0) 4777c478bd9Sstevel@tonic-gate * arg1 context (%o1) 4787c478bd9Sstevel@tonic-gate * arg2 tte (%o2) 4797c478bd9Sstevel@tonic-gate * arg3 flags (%o3) 0x1=d 0x2=i 4807c478bd9Sstevel@tonic-gate */ 4817c478bd9Sstevel@tonic-gate ENTRY(hv_mmu_map_perm_addr) 4827c478bd9Sstevel@tonic-gate mov MAP_PERM_ADDR, %o5 4837c478bd9Sstevel@tonic-gate ta FAST_TRAP 4847c478bd9Sstevel@tonic-gate retl 4857c478bd9Sstevel@tonic-gate nop 4867c478bd9Sstevel@tonic-gate SET_SIZE(hv_mmu_map_perm_addr) 4877c478bd9Sstevel@tonic-gate 4887c478bd9Sstevel@tonic-gate /* 4891ae08745Sheppo * hv_mmu_fault_area_conf(void *raddr) 4901ae08745Sheppo */ 4911ae08745Sheppo ENTRY(hv_mmu_fault_area_conf) 4921ae08745Sheppo mov %o0, %o2 4931ae08745Sheppo ldx [%o2], %o0 4941ae08745Sheppo mov MMU_SET_INFOPTR, %o5 4951ae08745Sheppo ta FAST_TRAP 4961ae08745Sheppo stx %o1, [%o2] 4971ae08745Sheppo retl 4981ae08745Sheppo nop 4991ae08745Sheppo SET_SIZE(hv_mmu_fault_area_conf) 5001ae08745Sheppo 5011ae08745Sheppo /* 5027c478bd9Sstevel@tonic-gate * Unmap permanent address 5037c478bd9Sstevel@tonic-gate * arg0 vaddr (%o0) 5047c478bd9Sstevel@tonic-gate * arg1 context (%o1) 5057c478bd9Sstevel@tonic-gate * arg2 flags (%o2) 0x1=d 0x2=i 5067c478bd9Sstevel@tonic-gate */ 5077c478bd9Sstevel@tonic-gate ENTRY(hv_mmu_unmap_perm_addr) 5087c478bd9Sstevel@tonic-gate mov UNMAP_PERM_ADDR, %o5 5097c478bd9Sstevel@tonic-gate ta FAST_TRAP 5107c478bd9Sstevel@tonic-gate retl 5117c478bd9Sstevel@tonic-gate nop 5127c478bd9Sstevel@tonic-gate SET_SIZE(hv_mmu_unmap_perm_addr) 5137c478bd9Sstevel@tonic-gate 5147c478bd9Sstevel@tonic-gate /* 5157c478bd9Sstevel@tonic-gate * Set TSB for context 0 5167c478bd9Sstevel@tonic-gate * arg0 ntsb_descriptor (%o0) 5177c478bd9Sstevel@tonic-gate * arg1 desc_ra (%o1) 5187c478bd9Sstevel@tonic-gate */ 5197c478bd9Sstevel@tonic-gate ENTRY(hv_set_ctx0) 5207c478bd9Sstevel@tonic-gate mov MMU_TSB_CTX0, %o5 5217c478bd9Sstevel@tonic-gate ta FAST_TRAP 5227c478bd9Sstevel@tonic-gate retl 5237c478bd9Sstevel@tonic-gate nop 5247c478bd9Sstevel@tonic-gate SET_SIZE(hv_set_ctx0) 5257c478bd9Sstevel@tonic-gate 5267c478bd9Sstevel@tonic-gate /* 5277c478bd9Sstevel@tonic-gate * Set TSB for context non0 5287c478bd9Sstevel@tonic-gate * arg0 ntsb_descriptor (%o0) 5297c478bd9Sstevel@tonic-gate * arg1 desc_ra (%o1) 5307c478bd9Sstevel@tonic-gate */ 5317c478bd9Sstevel@tonic-gate ENTRY(hv_set_ctxnon0) 5327c478bd9Sstevel@tonic-gate mov MMU_TSB_CTXNON0, %o5 5337c478bd9Sstevel@tonic-gate ta FAST_TRAP 5347c478bd9Sstevel@tonic-gate retl 5357c478bd9Sstevel@tonic-gate nop 5367c478bd9Sstevel@tonic-gate SET_SIZE(hv_set_ctxnon0) 5377c478bd9Sstevel@tonic-gate 5387c478bd9Sstevel@tonic-gate#ifdef SET_MMU_STATS 5397c478bd9Sstevel@tonic-gate /* 5407c478bd9Sstevel@tonic-gate * Returns old stat area on success 5417c478bd9Sstevel@tonic-gate */ 5427c478bd9Sstevel@tonic-gate ENTRY(hv_mmu_set_stat_area) 5437c478bd9Sstevel@tonic-gate mov MMU_STAT_AREA, %o5 5447c478bd9Sstevel@tonic-gate ta FAST_TRAP 5457c478bd9Sstevel@tonic-gate retl 5467c478bd9Sstevel@tonic-gate nop 5477c478bd9Sstevel@tonic-gate SET_SIZE(hv_mmu_set_stat_area) 5487c478bd9Sstevel@tonic-gate#endif /* SET_MMU_STATS */ 5497c478bd9Sstevel@tonic-gate 5507c478bd9Sstevel@tonic-gate /* 5517c478bd9Sstevel@tonic-gate * CPU Q Configure 5527c478bd9Sstevel@tonic-gate * arg0 queue (%o0) 5537c478bd9Sstevel@tonic-gate * arg1 Base address RA (%o1) 5547c478bd9Sstevel@tonic-gate * arg2 Size (%o2) 5557c478bd9Sstevel@tonic-gate */ 5567c478bd9Sstevel@tonic-gate ENTRY(hv_cpu_qconf) 5571ae08745Sheppo mov HV_CPU_QCONF, %o5 5587c478bd9Sstevel@tonic-gate ta FAST_TRAP 5597c478bd9Sstevel@tonic-gate retl 5607c478bd9Sstevel@tonic-gate nop 5617c478bd9Sstevel@tonic-gate SET_SIZE(hv_cpu_qconf) 5627c478bd9Sstevel@tonic-gate 5637c478bd9Sstevel@tonic-gate /* 5647c478bd9Sstevel@tonic-gate * arg0 - devhandle 5657c478bd9Sstevel@tonic-gate * arg1 - devino 5667c478bd9Sstevel@tonic-gate * 5677c478bd9Sstevel@tonic-gate * ret0 - status 5687c478bd9Sstevel@tonic-gate * ret1 - sysino 5697c478bd9Sstevel@tonic-gate */ 5707c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_devino_to_sysino) 5717c478bd9Sstevel@tonic-gate mov HVIO_INTR_DEVINO2SYSINO, %o5 5727c478bd9Sstevel@tonic-gate ta FAST_TRAP 5737c478bd9Sstevel@tonic-gate brz,a %o0, 1f 5747c478bd9Sstevel@tonic-gate stx %o1, [%o2] 5757c478bd9Sstevel@tonic-gate1: retl 5767c478bd9Sstevel@tonic-gate nop 5777c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_devino_to_sysino) 5787c478bd9Sstevel@tonic-gate 5797c478bd9Sstevel@tonic-gate /* 5807c478bd9Sstevel@tonic-gate * arg0 - sysino 5817c478bd9Sstevel@tonic-gate * 5827c478bd9Sstevel@tonic-gate * ret0 - status 5837c478bd9Sstevel@tonic-gate * ret1 - intr_valid_state 5847c478bd9Sstevel@tonic-gate */ 5857c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_getvalid) 5867c478bd9Sstevel@tonic-gate mov %o1, %o2 5877c478bd9Sstevel@tonic-gate mov HVIO_INTR_GETVALID, %o5 5887c478bd9Sstevel@tonic-gate ta FAST_TRAP 5897c478bd9Sstevel@tonic-gate brz,a %o0, 1f 5907c478bd9Sstevel@tonic-gate stuw %o1, [%o2] 5917c478bd9Sstevel@tonic-gate1: retl 5927c478bd9Sstevel@tonic-gate nop 5937c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_getvalid) 5947c478bd9Sstevel@tonic-gate 5957c478bd9Sstevel@tonic-gate /* 5967c478bd9Sstevel@tonic-gate * arg0 - sysino 5977c478bd9Sstevel@tonic-gate * arg1 - intr_valid_state 5987c478bd9Sstevel@tonic-gate * 5997c478bd9Sstevel@tonic-gate * ret0 - status 6007c478bd9Sstevel@tonic-gate */ 6017c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_setvalid) 6027c478bd9Sstevel@tonic-gate mov HVIO_INTR_SETVALID, %o5 6037c478bd9Sstevel@tonic-gate ta FAST_TRAP 6047c478bd9Sstevel@tonic-gate retl 6057c478bd9Sstevel@tonic-gate nop 6067c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_setvalid) 6077c478bd9Sstevel@tonic-gate 6087c478bd9Sstevel@tonic-gate /* 6097c478bd9Sstevel@tonic-gate * arg0 - sysino 6107c478bd9Sstevel@tonic-gate * 6117c478bd9Sstevel@tonic-gate * ret0 - status 6127c478bd9Sstevel@tonic-gate * ret1 - intr_state 6137c478bd9Sstevel@tonic-gate */ 6147c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_getstate) 6157c478bd9Sstevel@tonic-gate mov %o1, %o2 6167c478bd9Sstevel@tonic-gate mov HVIO_INTR_GETSTATE, %o5 6177c478bd9Sstevel@tonic-gate ta FAST_TRAP 6187c478bd9Sstevel@tonic-gate brz,a %o0, 1f 6197c478bd9Sstevel@tonic-gate stuw %o1, [%o2] 6207c478bd9Sstevel@tonic-gate1: retl 6217c478bd9Sstevel@tonic-gate nop 6227c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_getstate) 6237c478bd9Sstevel@tonic-gate 6247c478bd9Sstevel@tonic-gate /* 6257c478bd9Sstevel@tonic-gate * arg0 - sysino 6267c478bd9Sstevel@tonic-gate * arg1 - intr_state 6277c478bd9Sstevel@tonic-gate * 6287c478bd9Sstevel@tonic-gate * ret0 - status 6297c478bd9Sstevel@tonic-gate */ 6307c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_setstate) 6317c478bd9Sstevel@tonic-gate mov HVIO_INTR_SETSTATE, %o5 6327c478bd9Sstevel@tonic-gate ta FAST_TRAP 6337c478bd9Sstevel@tonic-gate retl 6347c478bd9Sstevel@tonic-gate nop 6357c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_setstate) 6367c478bd9Sstevel@tonic-gate 6377c478bd9Sstevel@tonic-gate /* 6387c478bd9Sstevel@tonic-gate * arg0 - sysino 6397c478bd9Sstevel@tonic-gate * 6407c478bd9Sstevel@tonic-gate * ret0 - status 6417c478bd9Sstevel@tonic-gate * ret1 - cpu_id 6427c478bd9Sstevel@tonic-gate */ 6437c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_gettarget) 6447c478bd9Sstevel@tonic-gate mov %o1, %o2 6457c478bd9Sstevel@tonic-gate mov HVIO_INTR_GETTARGET, %o5 6467c478bd9Sstevel@tonic-gate ta FAST_TRAP 6477c478bd9Sstevel@tonic-gate brz,a %o0, 1f 6487c478bd9Sstevel@tonic-gate stuw %o1, [%o2] 6497c478bd9Sstevel@tonic-gate1: retl 6507c478bd9Sstevel@tonic-gate nop 6517c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_gettarget) 6527c478bd9Sstevel@tonic-gate 6537c478bd9Sstevel@tonic-gate /* 6547c478bd9Sstevel@tonic-gate * arg0 - sysino 6557c478bd9Sstevel@tonic-gate * arg1 - cpu_id 6567c478bd9Sstevel@tonic-gate * 6577c478bd9Sstevel@tonic-gate * ret0 - status 6587c478bd9Sstevel@tonic-gate */ 6597c478bd9Sstevel@tonic-gate ENTRY(hvio_intr_settarget) 6607c478bd9Sstevel@tonic-gate mov HVIO_INTR_SETTARGET, %o5 6617c478bd9Sstevel@tonic-gate ta FAST_TRAP 6627c478bd9Sstevel@tonic-gate retl 6637c478bd9Sstevel@tonic-gate nop 6647c478bd9Sstevel@tonic-gate SET_SIZE(hvio_intr_settarget) 6657c478bd9Sstevel@tonic-gate 6667c478bd9Sstevel@tonic-gate /* 6677c478bd9Sstevel@tonic-gate * hv_cpu_yield(void) 6687c478bd9Sstevel@tonic-gate */ 6697c478bd9Sstevel@tonic-gate ENTRY(hv_cpu_yield) 6707c478bd9Sstevel@tonic-gate mov HV_CPU_YIELD, %o5 6717c478bd9Sstevel@tonic-gate ta FAST_TRAP 6727c478bd9Sstevel@tonic-gate retl 6737c478bd9Sstevel@tonic-gate nop 6747c478bd9Sstevel@tonic-gate SET_SIZE(hv_cpu_yield) 6757c478bd9Sstevel@tonic-gate 6767c478bd9Sstevel@tonic-gate /* 6777c478bd9Sstevel@tonic-gate * int hv_cpu_state(uint64_t cpuid, uint64_t *cpu_state); 6787c478bd9Sstevel@tonic-gate */ 6797c478bd9Sstevel@tonic-gate ENTRY(hv_cpu_state) 6807c478bd9Sstevel@tonic-gate mov %o1, %o4 ! save datap 6817c478bd9Sstevel@tonic-gate mov HV_CPU_STATE, %o5 6827c478bd9Sstevel@tonic-gate ta FAST_TRAP 6837c478bd9Sstevel@tonic-gate brz,a %o0, 1f 6847c478bd9Sstevel@tonic-gate stx %o1, [%o4] 6857c478bd9Sstevel@tonic-gate1: 6867c478bd9Sstevel@tonic-gate retl 6877c478bd9Sstevel@tonic-gate nop 6887c478bd9Sstevel@tonic-gate SET_SIZE(hv_cpu_state) 6897c478bd9Sstevel@tonic-gate 6907c478bd9Sstevel@tonic-gate /* 6917c478bd9Sstevel@tonic-gate * HV state dump zone Configure 6927c478bd9Sstevel@tonic-gate * arg0 real adrs of dump buffer (%o0) 6937c478bd9Sstevel@tonic-gate * arg1 size of dump buffer (%o1) 6947c478bd9Sstevel@tonic-gate * ret0 status (%o0) 6957c478bd9Sstevel@tonic-gate * ret1 size of buffer on success and min size on EINVAL (%o1) 6967c478bd9Sstevel@tonic-gate * hv_dump_buf_update(uint64_t paddr, uint64_t size, uint64_t *ret_size) 6977c478bd9Sstevel@tonic-gate */ 6987c478bd9Sstevel@tonic-gate ENTRY(hv_dump_buf_update) 6997c478bd9Sstevel@tonic-gate mov DUMP_BUF_UPDATE, %o5 7007c478bd9Sstevel@tonic-gate ta FAST_TRAP 7017c478bd9Sstevel@tonic-gate retl 7027c478bd9Sstevel@tonic-gate stx %o1, [%o2] 7037c478bd9Sstevel@tonic-gate SET_SIZE(hv_dump_buf_update) 7047c478bd9Sstevel@tonic-gate 7053c431bb5Swentaoy /* 7063c431bb5Swentaoy * arg0 - timeout value (%o0) 7073c431bb5Swentaoy * 7083c431bb5Swentaoy * ret0 - status (%o0) 7093c431bb5Swentaoy * ret1 - time_remaining (%o1) 7103c431bb5Swentaoy * hv_mach_set_watchdog(uint64_t timeout, uint64_t *time_remaining) 7113c431bb5Swentaoy */ 7123c431bb5Swentaoy ENTRY(hv_mach_set_watchdog) 7133c431bb5Swentaoy mov %o1, %o2 7143c431bb5Swentaoy mov MACH_SET_WATCHDOG, %o5 7153c431bb5Swentaoy ta FAST_TRAP 7163c431bb5Swentaoy retl 7173c431bb5Swentaoy stx %o1, [%o2] 7183c431bb5Swentaoy SET_SIZE(hv_mach_set_watchdog) 7197c478bd9Sstevel@tonic-gate 7207c478bd9Sstevel@tonic-gate /* 7217c478bd9Sstevel@tonic-gate * For memory scrub 7227c478bd9Sstevel@tonic-gate * int hv_mem_scrub(uint64_t real_addr, uint64_t length, 7237c478bd9Sstevel@tonic-gate * uint64_t *scrubbed_len); 7247c478bd9Sstevel@tonic-gate * Retun %o0 -- status 7257c478bd9Sstevel@tonic-gate * %o1 -- bytes scrubbed 7267c478bd9Sstevel@tonic-gate */ 7277c478bd9Sstevel@tonic-gate ENTRY(hv_mem_scrub) 7287c478bd9Sstevel@tonic-gate mov %o2, %o4 7297c478bd9Sstevel@tonic-gate mov HV_MEM_SCRUB, %o5 7307c478bd9Sstevel@tonic-gate ta FAST_TRAP 7317c478bd9Sstevel@tonic-gate retl 7327c478bd9Sstevel@tonic-gate stx %o1, [%o4] 7337c478bd9Sstevel@tonic-gate SET_SIZE(hv_mem_scrub) 7347c478bd9Sstevel@tonic-gate 7357c478bd9Sstevel@tonic-gate /* 7367c478bd9Sstevel@tonic-gate * Flush ecache 7377c478bd9Sstevel@tonic-gate * int hv_mem_sync(uint64_t real_addr, uint64_t length, 7387c478bd9Sstevel@tonic-gate * uint64_t *flushed_len); 7397c478bd9Sstevel@tonic-gate * Retun %o0 -- status 7407c478bd9Sstevel@tonic-gate * %o1 -- bytes flushed 7417c478bd9Sstevel@tonic-gate */ 7427c478bd9Sstevel@tonic-gate ENTRY(hv_mem_sync) 7437c478bd9Sstevel@tonic-gate mov %o2, %o4 7447c478bd9Sstevel@tonic-gate mov HV_MEM_SYNC, %o5 7457c478bd9Sstevel@tonic-gate ta FAST_TRAP 7467c478bd9Sstevel@tonic-gate retl 7477c478bd9Sstevel@tonic-gate stx %o1, [%o4] 7487c478bd9Sstevel@tonic-gate SET_SIZE(hv_mem_sync) 7497c478bd9Sstevel@tonic-gate 7507c478bd9Sstevel@tonic-gate /* 7519d0d62adSJason Beloro * uint64_t hv_tm_enable(uint64_t enable) 7522f0fcb93SJason Beloro */ 7532f0fcb93SJason Beloro ENTRY(hv_tm_enable) 7542f0fcb93SJason Beloro mov HV_TM_ENABLE, %o5 7552f0fcb93SJason Beloro ta FAST_TRAP 7562f0fcb93SJason Beloro retl 7572f0fcb93SJason Beloro nop 7582f0fcb93SJason Beloro SET_SIZE(hv_tm_enable) 7592f0fcb93SJason Beloro 7602f0fcb93SJason Beloro /* 7617c478bd9Sstevel@tonic-gate * TTRACE_BUF_CONF Configure 7627c478bd9Sstevel@tonic-gate * arg0 RA base of buffer (%o0) 7637c478bd9Sstevel@tonic-gate * arg1 buf size in no. of entries (%o1) 7647c478bd9Sstevel@tonic-gate * ret0 status (%o0) 7657c478bd9Sstevel@tonic-gate * ret1 minimum size in no. of entries on failure, 7667c478bd9Sstevel@tonic-gate * actual size in no. of entries on success (%o1) 7677c478bd9Sstevel@tonic-gate */ 7687c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_buf_conf) 7697c478bd9Sstevel@tonic-gate mov TTRACE_BUF_CONF, %o5 7707c478bd9Sstevel@tonic-gate ta FAST_TRAP 7717c478bd9Sstevel@tonic-gate retl 7727c478bd9Sstevel@tonic-gate stx %o1, [%o2] 7737c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_buf_conf) 7747c478bd9Sstevel@tonic-gate 7757c478bd9Sstevel@tonic-gate /* 7767c478bd9Sstevel@tonic-gate * TTRACE_BUF_INFO 7777c478bd9Sstevel@tonic-gate * ret0 status (%o0) 7787c478bd9Sstevel@tonic-gate * ret1 RA base of buffer (%o1) 7797c478bd9Sstevel@tonic-gate * ret2 size in no. of entries (%o2) 7807c478bd9Sstevel@tonic-gate */ 7817c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_buf_info) 7827c478bd9Sstevel@tonic-gate mov %o0, %o3 7837c478bd9Sstevel@tonic-gate mov %o1, %o4 7847c478bd9Sstevel@tonic-gate mov TTRACE_BUF_INFO, %o5 7857c478bd9Sstevel@tonic-gate ta FAST_TRAP 7867c478bd9Sstevel@tonic-gate stx %o1, [%o3] 7877c478bd9Sstevel@tonic-gate retl 7887c478bd9Sstevel@tonic-gate stx %o2, [%o4] 7897c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_buf_info) 7907c478bd9Sstevel@tonic-gate 7917c478bd9Sstevel@tonic-gate /* 7927c478bd9Sstevel@tonic-gate * TTRACE_ENABLE 7937c478bd9Sstevel@tonic-gate * arg0 enable/ disable (%o0) 7947c478bd9Sstevel@tonic-gate * ret0 status (%o0) 7957c478bd9Sstevel@tonic-gate * ret1 previous enable state (%o1) 7967c478bd9Sstevel@tonic-gate */ 7977c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_enable) 7987c478bd9Sstevel@tonic-gate mov %o1, %o2 7997c478bd9Sstevel@tonic-gate mov TTRACE_ENABLE, %o5 8007c478bd9Sstevel@tonic-gate ta FAST_TRAP 8017c478bd9Sstevel@tonic-gate retl 8027c478bd9Sstevel@tonic-gate stx %o1, [%o2] 8037c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_enable) 8047c478bd9Sstevel@tonic-gate 8057c478bd9Sstevel@tonic-gate /* 8067c478bd9Sstevel@tonic-gate * TTRACE_FREEZE 8077c478bd9Sstevel@tonic-gate * arg0 enable/ freeze (%o0) 8087c478bd9Sstevel@tonic-gate * ret0 status (%o0) 8097c478bd9Sstevel@tonic-gate * ret1 previous freeze state (%o1) 8107c478bd9Sstevel@tonic-gate */ 8117c478bd9Sstevel@tonic-gate ENTRY(hv_ttrace_freeze) 8127c478bd9Sstevel@tonic-gate mov %o1, %o2 8137c478bd9Sstevel@tonic-gate mov TTRACE_FREEZE, %o5 8147c478bd9Sstevel@tonic-gate ta FAST_TRAP 8157c478bd9Sstevel@tonic-gate retl 8167c478bd9Sstevel@tonic-gate stx %o1, [%o2] 8177c478bd9Sstevel@tonic-gate SET_SIZE(hv_ttrace_freeze) 8187c478bd9Sstevel@tonic-gate 8197c478bd9Sstevel@tonic-gate /* 8207c478bd9Sstevel@tonic-gate * MACH_DESC 8217c478bd9Sstevel@tonic-gate * arg0 buffer real address 8227c478bd9Sstevel@tonic-gate * arg1 pointer to uint64_t for size of buffer 8237c478bd9Sstevel@tonic-gate * ret0 status 8247c478bd9Sstevel@tonic-gate * ret1 return required size of buffer / returned data size 8257c478bd9Sstevel@tonic-gate */ 8267c478bd9Sstevel@tonic-gate ENTRY(hv_mach_desc) 8277c478bd9Sstevel@tonic-gate mov %o1, %o4 ! save datap 8287c478bd9Sstevel@tonic-gate ldx [%o1], %o1 8297c478bd9Sstevel@tonic-gate mov HV_MACH_DESC, %o5 8307c478bd9Sstevel@tonic-gate ta FAST_TRAP 8317c478bd9Sstevel@tonic-gate retl 8327c478bd9Sstevel@tonic-gate stx %o1, [%o4] 8337c478bd9Sstevel@tonic-gate SET_SIZE(hv_mach_desc) 8347c478bd9Sstevel@tonic-gate 8357c478bd9Sstevel@tonic-gate /* 83669cd775fSschwartz * hv_ra2pa(uint64_t ra) 83769cd775fSschwartz * 83869cd775fSschwartz * MACH_DESC 83969cd775fSschwartz * arg0 Real address to convert 84069cd775fSschwartz * ret0 Returned physical address or -1 on error 84169cd775fSschwartz */ 84269cd775fSschwartz ENTRY(hv_ra2pa) 84369cd775fSschwartz mov HV_RA2PA, %o5 84469cd775fSschwartz ta FAST_TRAP 84569cd775fSschwartz cmp %o0, 0 84669cd775fSschwartz move %xcc, %o1, %o0 84769cd775fSschwartz movne %xcc, -1, %o0 84869cd775fSschwartz retl 84969cd775fSschwartz nop 85069cd775fSschwartz SET_SIZE(hv_ra2pa) 85169cd775fSschwartz 85269cd775fSschwartz /* 85369cd775fSschwartz * hv_hpriv(void *func, uint64_t arg1, uint64_t arg2, uint64_t arg3) 85469cd775fSschwartz * 85569cd775fSschwartz * MACH_DESC 85669cd775fSschwartz * arg0 OS function to call 85769cd775fSschwartz * arg1 First arg to OS function 85869cd775fSschwartz * arg2 Second arg to OS function 85969cd775fSschwartz * arg3 Third arg to OS function 86069cd775fSschwartz * ret0 Returned value from function 86169cd775fSschwartz */ 86269cd775fSschwartz 86369cd775fSschwartz ENTRY(hv_hpriv) 86469cd775fSschwartz mov HV_HPRIV, %o5 86569cd775fSschwartz ta FAST_TRAP 86669cd775fSschwartz retl 86769cd775fSschwartz nop 86869cd775fSschwartz SET_SIZE(hv_hpriv) 86969cd775fSschwartz 8701ae08745Sheppo /* 8711ae08745Sheppo * hv_ldc_tx_qconf(uint64_t channel, uint64_t ra_base, 8721ae08745Sheppo * uint64_t nentries); 8731ae08745Sheppo */ 8741ae08745Sheppo ENTRY(hv_ldc_tx_qconf) 8751ae08745Sheppo mov LDC_TX_QCONF, %o5 8761ae08745Sheppo ta FAST_TRAP 8771ae08745Sheppo retl 8781ae08745Sheppo nop 8791ae08745Sheppo SET_SIZE(hv_ldc_tx_qconf) 8801ae08745Sheppo 8811ae08745Sheppo 8821ae08745Sheppo /* 8831ae08745Sheppo * hv_ldc_tx_qinfo(uint64_t channel, uint64_t *ra_base, 8841ae08745Sheppo * uint64_t *nentries); 8851ae08745Sheppo */ 8861ae08745Sheppo ENTRY(hv_ldc_tx_qinfo) 8871ae08745Sheppo mov %o1, %g1 8881ae08745Sheppo mov %o2, %g2 8891ae08745Sheppo mov LDC_TX_QINFO, %o5 8901ae08745Sheppo ta FAST_TRAP 8911ae08745Sheppo stx %o1, [%g1] 8921ae08745Sheppo retl 8931ae08745Sheppo stx %o2, [%g2] 8941ae08745Sheppo SET_SIZE(hv_ldc_tx_qinfo) 8951ae08745Sheppo 8961ae08745Sheppo 8971ae08745Sheppo /* 8981ae08745Sheppo * hv_ldc_tx_get_state(uint64_t channel, 8991ae08745Sheppo * uint64_t *headp, uint64_t *tailp, uint64_t *state); 9001ae08745Sheppo */ 9011ae08745Sheppo ENTRY(hv_ldc_tx_get_state) 9021ae08745Sheppo mov LDC_TX_GET_STATE, %o5 9031ae08745Sheppo mov %o1, %g1 9041ae08745Sheppo mov %o2, %g2 9051ae08745Sheppo mov %o3, %g3 9061ae08745Sheppo ta FAST_TRAP 9071ae08745Sheppo stx %o1, [%g1] 9081ae08745Sheppo stx %o2, [%g2] 9091ae08745Sheppo retl 9101ae08745Sheppo stx %o3, [%g3] 9111ae08745Sheppo SET_SIZE(hv_ldc_tx_get_state) 9121ae08745Sheppo 9131ae08745Sheppo 9141ae08745Sheppo /* 9151ae08745Sheppo * hv_ldc_tx_set_qtail(uint64_t channel, uint64_t tail) 9161ae08745Sheppo */ 9171ae08745Sheppo ENTRY(hv_ldc_tx_set_qtail) 9181ae08745Sheppo mov LDC_TX_SET_QTAIL, %o5 9191ae08745Sheppo ta FAST_TRAP 9201ae08745Sheppo retl 9211ae08745Sheppo SET_SIZE(hv_ldc_tx_set_qtail) 9221ae08745Sheppo 9231ae08745Sheppo 9241ae08745Sheppo /* 9251ae08745Sheppo * hv_ldc_rx_qconf(uint64_t channel, uint64_t ra_base, 9261ae08745Sheppo * uint64_t nentries); 9271ae08745Sheppo */ 9281ae08745Sheppo ENTRY(hv_ldc_rx_qconf) 9291ae08745Sheppo mov LDC_RX_QCONF, %o5 9301ae08745Sheppo ta FAST_TRAP 9311ae08745Sheppo retl 9321ae08745Sheppo nop 9331ae08745Sheppo SET_SIZE(hv_ldc_rx_qconf) 9341ae08745Sheppo 9351ae08745Sheppo 9361ae08745Sheppo /* 9371ae08745Sheppo * hv_ldc_rx_qinfo(uint64_t channel, uint64_t *ra_base, 9381ae08745Sheppo * uint64_t *nentries); 9391ae08745Sheppo */ 9401ae08745Sheppo ENTRY(hv_ldc_rx_qinfo) 9411ae08745Sheppo mov %o1, %g1 9421ae08745Sheppo mov %o2, %g2 9431ae08745Sheppo mov LDC_RX_QINFO, %o5 9441ae08745Sheppo ta FAST_TRAP 9451ae08745Sheppo stx %o1, [%g1] 9461ae08745Sheppo retl 9471ae08745Sheppo stx %o2, [%g2] 9481ae08745Sheppo SET_SIZE(hv_ldc_rx_qinfo) 9491ae08745Sheppo 9501ae08745Sheppo 9511ae08745Sheppo /* 9521ae08745Sheppo * hv_ldc_rx_get_state(uint64_t channel, 9531ae08745Sheppo * uint64_t *headp, uint64_t *tailp, uint64_t *state); 9541ae08745Sheppo */ 9551ae08745Sheppo ENTRY(hv_ldc_rx_get_state) 9561ae08745Sheppo mov LDC_RX_GET_STATE, %o5 9571ae08745Sheppo mov %o1, %g1 9581ae08745Sheppo mov %o2, %g2 9591ae08745Sheppo mov %o3, %g3 9601ae08745Sheppo ta FAST_TRAP 9611ae08745Sheppo stx %o1, [%g1] 9621ae08745Sheppo stx %o2, [%g2] 9631ae08745Sheppo retl 9641ae08745Sheppo stx %o3, [%g3] 9651ae08745Sheppo SET_SIZE(hv_ldc_rx_get_state) 9661ae08745Sheppo 9671ae08745Sheppo 9681ae08745Sheppo /* 9691ae08745Sheppo * hv_ldc_rx_set_qhead(uint64_t channel, uint64_t head) 9701ae08745Sheppo */ 9711ae08745Sheppo ENTRY(hv_ldc_rx_set_qhead) 9721ae08745Sheppo mov LDC_RX_SET_QHEAD, %o5 9731ae08745Sheppo ta FAST_TRAP 9741ae08745Sheppo retl 9751ae08745Sheppo SET_SIZE(hv_ldc_rx_set_qhead) 9761ae08745Sheppo 9771ae08745Sheppo /* 9781ae08745Sheppo * hv_ldc_set_map_table(uint64_t channel, uint64_t tbl_ra, 9791ae08745Sheppo * uint64_t tbl_entries) 9801ae08745Sheppo */ 9811ae08745Sheppo ENTRY(hv_ldc_set_map_table) 9821ae08745Sheppo mov LDC_SET_MAP_TABLE, %o5 9831ae08745Sheppo ta FAST_TRAP 9841ae08745Sheppo retl 9851ae08745Sheppo nop 9861ae08745Sheppo SET_SIZE(hv_ldc_set_map_table) 9871ae08745Sheppo 9881ae08745Sheppo 9891ae08745Sheppo /* 9901ae08745Sheppo * hv_ldc_get_map_table(uint64_t channel, uint64_t *tbl_ra, 9911ae08745Sheppo * uint64_t *tbl_entries) 9921ae08745Sheppo */ 9931ae08745Sheppo ENTRY(hv_ldc_get_map_table) 9941ae08745Sheppo mov %o1, %g1 9951ae08745Sheppo mov %o2, %g2 9961ae08745Sheppo mov LDC_GET_MAP_TABLE, %o5 9971ae08745Sheppo ta FAST_TRAP 9981ae08745Sheppo stx %o1, [%g1] 9991ae08745Sheppo retl 10001ae08745Sheppo stx %o2, [%g2] 10011ae08745Sheppo SET_SIZE(hv_ldc_get_map_table) 10021ae08745Sheppo 10031ae08745Sheppo 10041ae08745Sheppo /* 10051ae08745Sheppo * hv_ldc_copy(uint64_t channel, uint64_t request, uint64_t cookie, 10061ae08745Sheppo * uint64_t raddr, uint64_t length, uint64_t *lengthp); 10071ae08745Sheppo */ 10081ae08745Sheppo ENTRY(hv_ldc_copy) 10091ae08745Sheppo mov %o5, %g1 10101ae08745Sheppo mov LDC_COPY, %o5 10111ae08745Sheppo ta FAST_TRAP 10121ae08745Sheppo retl 10131ae08745Sheppo stx %o1, [%g1] 10141ae08745Sheppo SET_SIZE(hv_ldc_copy) 10151ae08745Sheppo 10161ae08745Sheppo 10171ae08745Sheppo /* 10181ae08745Sheppo * hv_ldc_mapin(uint64_t channel, uint64_t cookie, uint64_t *raddr, 10191ae08745Sheppo * uint64_t *perm) 10201ae08745Sheppo */ 10211ae08745Sheppo ENTRY(hv_ldc_mapin) 10221ae08745Sheppo mov %o2, %g1 10231ae08745Sheppo mov %o3, %g2 10241ae08745Sheppo mov LDC_MAPIN, %o5 10251ae08745Sheppo ta FAST_TRAP 10261ae08745Sheppo stx %o1, [%g1] 10271ae08745Sheppo retl 10281ae08745Sheppo stx %o2, [%g2] 10291ae08745Sheppo SET_SIZE(hv_ldc_mapin) 10301ae08745Sheppo 10311ae08745Sheppo 10321ae08745Sheppo /* 10331ae08745Sheppo * hv_ldc_unmap(uint64_t raddr) 10341ae08745Sheppo */ 10351ae08745Sheppo ENTRY(hv_ldc_unmap) 10361ae08745Sheppo mov LDC_UNMAP, %o5 10371ae08745Sheppo ta FAST_TRAP 10381ae08745Sheppo retl 10391ae08745Sheppo nop 10401ae08745Sheppo SET_SIZE(hv_ldc_unmap) 10411ae08745Sheppo 10421ae08745Sheppo 10431ae08745Sheppo /* 10444bac2208Snarayan * hv_ldc_revoke(uint64_t channel, uint64_t cookie, 10454bac2208Snarayan * uint64_t revoke_cookie 10461ae08745Sheppo */ 10471ae08745Sheppo ENTRY(hv_ldc_revoke) 10481ae08745Sheppo mov LDC_REVOKE, %o5 10491ae08745Sheppo ta FAST_TRAP 10501ae08745Sheppo retl 10511ae08745Sheppo nop 10521ae08745Sheppo SET_SIZE(hv_ldc_revoke) 10531ae08745Sheppo 1054*34f94fbcSWENTAO YANG /* 1055*34f94fbcSWENTAO YANG * hv_ldc_mapin_size_max(uint64_t tbl_type, uint64_t *sz) 1056*34f94fbcSWENTAO YANG */ 1057*34f94fbcSWENTAO YANG ENTRY(hv_ldc_mapin_size_max) 1058*34f94fbcSWENTAO YANG mov %o1, %g1 1059*34f94fbcSWENTAO YANG mov LDC_MAPIN_SIZE_MAX, %o5 1060*34f94fbcSWENTAO YANG ta FAST_TRAP 1061*34f94fbcSWENTAO YANG retl 1062*34f94fbcSWENTAO YANG stx %o1, [%g1] 1063*34f94fbcSWENTAO YANG SET_SIZE(hv_ldc_mapin_size_max) 10641ae08745Sheppo 10651ae08745Sheppo /* 10661ae08745Sheppo * hvldc_intr_getcookie(uint64_t dev_hdl, uint32_t devino, 10671ae08745Sheppo * uint64_t *cookie); 10681ae08745Sheppo */ 10691ae08745Sheppo ENTRY(hvldc_intr_getcookie) 10701ae08745Sheppo mov %o2, %g1 10711ae08745Sheppo mov VINTR_GET_COOKIE, %o5 10721ae08745Sheppo ta FAST_TRAP 10731ae08745Sheppo retl 10741ae08745Sheppo stx %o1, [%g1] 10751ae08745Sheppo SET_SIZE(hvldc_intr_getcookie) 10761ae08745Sheppo 10771ae08745Sheppo /* 10781ae08745Sheppo * hvldc_intr_setcookie(uint64_t dev_hdl, uint32_t devino, 10791ae08745Sheppo * uint64_t cookie); 10801ae08745Sheppo */ 10811ae08745Sheppo ENTRY(hvldc_intr_setcookie) 10821ae08745Sheppo mov VINTR_SET_COOKIE, %o5 10831ae08745Sheppo ta FAST_TRAP 10841ae08745Sheppo retl 10851ae08745Sheppo nop 10861ae08745Sheppo SET_SIZE(hvldc_intr_setcookie) 10871ae08745Sheppo 10881ae08745Sheppo 10891ae08745Sheppo /* 10901ae08745Sheppo * hvldc_intr_getvalid(uint64_t dev_hdl, uint32_t devino, 10911ae08745Sheppo * int *intr_valid_state); 10921ae08745Sheppo */ 10931ae08745Sheppo ENTRY(hvldc_intr_getvalid) 10941ae08745Sheppo mov %o2, %g1 10951ae08745Sheppo mov VINTR_GET_VALID, %o5 10961ae08745Sheppo ta FAST_TRAP 10971ae08745Sheppo retl 10981ae08745Sheppo stuw %o1, [%g1] 10991ae08745Sheppo SET_SIZE(hvldc_intr_getvalid) 11001ae08745Sheppo 11011ae08745Sheppo /* 11021ae08745Sheppo * hvldc_intr_setvalid(uint64_t dev_hdl, uint32_t devino, 11031ae08745Sheppo * int intr_valid_state); 11041ae08745Sheppo */ 11051ae08745Sheppo ENTRY(hvldc_intr_setvalid) 11061ae08745Sheppo mov VINTR_SET_VALID, %o5 11071ae08745Sheppo ta FAST_TRAP 11081ae08745Sheppo retl 11091ae08745Sheppo nop 11101ae08745Sheppo SET_SIZE(hvldc_intr_setvalid) 11111ae08745Sheppo 11121ae08745Sheppo /* 11131ae08745Sheppo * hvldc_intr_getstate(uint64_t dev_hdl, uint32_t devino, 11141ae08745Sheppo * int *intr_state); 11151ae08745Sheppo */ 11161ae08745Sheppo ENTRY(hvldc_intr_getstate) 11171ae08745Sheppo mov %o2, %g1 11181ae08745Sheppo mov VINTR_GET_STATE, %o5 11191ae08745Sheppo ta FAST_TRAP 11201ae08745Sheppo retl 11211ae08745Sheppo stuw %o1, [%g1] 11221ae08745Sheppo SET_SIZE(hvldc_intr_getstate) 11231ae08745Sheppo 11241ae08745Sheppo /* 11251ae08745Sheppo * hvldc_intr_setstate(uint64_t dev_hdl, uint32_t devino, 11261ae08745Sheppo * int intr_state); 11271ae08745Sheppo */ 11281ae08745Sheppo ENTRY(hvldc_intr_setstate) 11291ae08745Sheppo mov VINTR_SET_STATE, %o5 11301ae08745Sheppo ta FAST_TRAP 11311ae08745Sheppo retl 11321ae08745Sheppo nop 11331ae08745Sheppo SET_SIZE(hvldc_intr_setstate) 11341ae08745Sheppo 11351ae08745Sheppo /* 11361ae08745Sheppo * hvldc_intr_gettarget(uint64_t dev_hdl, uint32_t devino, 11371ae08745Sheppo * uint32_t *cpuid); 11381ae08745Sheppo */ 11391ae08745Sheppo ENTRY(hvldc_intr_gettarget) 11401ae08745Sheppo mov %o2, %g1 11411ae08745Sheppo mov VINTR_GET_TARGET, %o5 11421ae08745Sheppo ta FAST_TRAP 11431ae08745Sheppo retl 11441ae08745Sheppo stuw %o1, [%g1] 11451ae08745Sheppo SET_SIZE(hvldc_intr_gettarget) 11461ae08745Sheppo 11471ae08745Sheppo /* 11481ae08745Sheppo * hvldc_intr_settarget(uint64_t dev_hdl, uint32_t devino, 11491ae08745Sheppo * uint32_t cpuid); 11501ae08745Sheppo */ 11511ae08745Sheppo ENTRY(hvldc_intr_settarget) 11521ae08745Sheppo mov VINTR_SET_TARGET, %o5 11531ae08745Sheppo ta FAST_TRAP 11541ae08745Sheppo retl 11551ae08745Sheppo nop 11561ae08745Sheppo SET_SIZE(hvldc_intr_settarget) 11571ae08745Sheppo 11581ae08745Sheppo /* 11591ae08745Sheppo * hv_api_get_version(uint64_t api_group, uint64_t *majorp, 11601ae08745Sheppo * uint64_t *minorp) 11611ae08745Sheppo * 11621ae08745Sheppo * API_GET_VERSION 11631ae08745Sheppo * arg0 API group 11641ae08745Sheppo * ret0 status 11651ae08745Sheppo * ret1 major number 11661ae08745Sheppo * ret2 minor number 11671ae08745Sheppo */ 11681ae08745Sheppo ENTRY(hv_api_get_version) 11691ae08745Sheppo mov %o1, %o3 11701ae08745Sheppo mov %o2, %o4 11711ae08745Sheppo mov API_GET_VERSION, %o5 11721ae08745Sheppo ta CORE_TRAP 11731ae08745Sheppo stx %o1, [%o3] 11741ae08745Sheppo retl 11751ae08745Sheppo stx %o2, [%o4] 11761ae08745Sheppo SET_SIZE(hv_api_get_version) 11771ae08745Sheppo 11781ae08745Sheppo /* 11791ae08745Sheppo * hv_api_set_version(uint64_t api_group, uint64_t major, 11801ae08745Sheppo * uint64_t minor, uint64_t *supported_minor) 11811ae08745Sheppo * 11821ae08745Sheppo * API_SET_VERSION 11831ae08745Sheppo * arg0 API group 11841ae08745Sheppo * arg1 major number 11851ae08745Sheppo * arg2 requested minor number 11861ae08745Sheppo * ret0 status 11871ae08745Sheppo * ret1 actual minor number 11881ae08745Sheppo */ 11891ae08745Sheppo ENTRY(hv_api_set_version) 11901ae08745Sheppo mov %o3, %o4 11911ae08745Sheppo mov API_SET_VERSION, %o5 11921ae08745Sheppo ta CORE_TRAP 11931ae08745Sheppo retl 11941ae08745Sheppo stx %o1, [%o4] 11951ae08745Sheppo SET_SIZE(hv_api_set_version) 11961ae08745Sheppo 1197136097ceSjb145095 /* 1198136097ceSjb145095 * %o0 - buffer real address 1199136097ceSjb145095 * %o1 - buffer size 1200136097ceSjb145095 * %o2 - &characters written 1201136097ceSjb145095 * returns 1202136097ceSjb145095 * status 1203136097ceSjb145095 */ 1204136097ceSjb145095 ENTRY(hv_cnwrite) 1205136097ceSjb145095 mov CONS_WRITE, %o5 1206136097ceSjb145095 ta FAST_TRAP 1207136097ceSjb145095 retl 1208136097ceSjb145095 stx %o1, [%o2] 1209136097ceSjb145095 SET_SIZE(hv_cnwrite) 1210136097ceSjb145095 1211136097ceSjb145095 /* 1212136097ceSjb145095 * %o0 character buffer ra 1213136097ceSjb145095 * %o1 buffer size 1214136097ceSjb145095 * %o2 pointer to returned size 1215136097ceSjb145095 * return values: 1216136097ceSjb145095 * 0 success 1217136097ceSjb145095 * hv_errno failure 1218136097ceSjb145095 */ 1219136097ceSjb145095 ENTRY(hv_cnread) 1220136097ceSjb145095 mov CONS_READ, %o5 1221136097ceSjb145095 ta FAST_TRAP 1222136097ceSjb145095 brnz,a %o0, 1f ! failure, just return error 1223136097ceSjb145095 nop 1224136097ceSjb145095 1225136097ceSjb145095 cmp %o1, H_BREAK 1226136097ceSjb145095 be 1f 1227136097ceSjb145095 mov %o1, %o0 1228136097ceSjb145095 1229136097ceSjb145095 cmp %o1, H_HUP 1230136097ceSjb145095 be 1f 1231136097ceSjb145095 mov %o1, %o0 1232136097ceSjb145095 1233136097ceSjb145095 stx %o1, [%o2] ! success, save count and return 0 1234136097ceSjb145095 mov 0, %o0 1235136097ceSjb1450951: 1236136097ceSjb145095 retl 1237136097ceSjb145095 nop 1238136097ceSjb145095 SET_SIZE(hv_cnread) 1239136097ceSjb145095 12403b890a5bSjb145095 /* 12413b890a5bSjb145095 * SOFT_STATE_SET 12423b890a5bSjb145095 * arg0 state (%o0) 12433b890a5bSjb145095 * arg1 string (%o1) 12443b890a5bSjb145095 * ret0 status (%o0) 12453b890a5bSjb145095 */ 12463b890a5bSjb145095 ENTRY(hv_soft_state_set) 12473b890a5bSjb145095 mov SOFT_STATE_SET, %o5 12483b890a5bSjb145095 ta FAST_TRAP 12493b890a5bSjb145095 retl 12503b890a5bSjb145095 nop 12513b890a5bSjb145095 SET_SIZE(hv_soft_state_set) 12523b890a5bSjb145095 12533b890a5bSjb145095 /* 12543b890a5bSjb145095 * SOFT_STATE_GET 12553b890a5bSjb145095 * arg0 string buffer (%o0) 12563b890a5bSjb145095 * ret0 status (%o0) 12573b890a5bSjb145095 * ret1 current state (%o1) 12583b890a5bSjb145095 */ 12593b890a5bSjb145095 ENTRY(hv_soft_state_get) 12603b890a5bSjb145095 mov %o1, %o2 12613b890a5bSjb145095 mov SOFT_STATE_GET, %o5 12623b890a5bSjb145095 ta FAST_TRAP 12633b890a5bSjb145095 retl 12643b890a5bSjb145095 stx %o1, [%o2] 12653b890a5bSjb145095 SET_SIZE(hv_soft_state_get) 12663b890a5bSjb145095 1267023e71deSHaik Aftandilian ENTRY(hv_guest_suspend) 1268023e71deSHaik Aftandilian mov GUEST_SUSPEND, %o5 1269023e71deSHaik Aftandilian ta FAST_TRAP 1270023e71deSHaik Aftandilian retl 1271023e71deSHaik Aftandilian nop 1272023e71deSHaik Aftandilian SET_SIZE(hv_guest_suspend) 1273023e71deSHaik Aftandilian 1274023e71deSHaik Aftandilian ENTRY(hv_tick_set_npt) 1275023e71deSHaik Aftandilian mov TICK_SET_NPT, %o5 1276023e71deSHaik Aftandilian ta FAST_TRAP 1277023e71deSHaik Aftandilian retl 1278023e71deSHaik Aftandilian nop 1279023e71deSHaik Aftandilian SET_SIZE(hv_tick_set_npt) 1280023e71deSHaik Aftandilian 1281023e71deSHaik Aftandilian ENTRY(hv_stick_set_npt) 1282023e71deSHaik Aftandilian mov STICK_SET_NPT, %o5 1283023e71deSHaik Aftandilian ta FAST_TRAP 1284023e71deSHaik Aftandilian retl 1285023e71deSHaik Aftandilian nop 1286023e71deSHaik Aftandilian SET_SIZE(hv_stick_set_npt) 1287023e71deSHaik Aftandilian 12884df55fdeSJanie Lu /* 12894df55fdeSJanie Lu * REBOOT_DATA_SET 12904df55fdeSJanie Lu * arg0 buffer real address 12914df55fdeSJanie Lu * arg1 buffer length 12924df55fdeSJanie Lu * ret0 status 12934df55fdeSJanie Lu */ 12944df55fdeSJanie Lu ENTRY(hv_reboot_data_set) 12954df55fdeSJanie Lu mov HV_REBOOT_DATA_SET, %o5 12964df55fdeSJanie Lu ta FAST_TRAP 12974df55fdeSJanie Lu retl 12984df55fdeSJanie Lu nop 12994df55fdeSJanie Lu SET_SIZE(hv_reboot_data_set) 13004df55fdeSJanie Lu 13017c478bd9Sstevel@tonic-gate#endif /* lint || __lint */ 1302