13859Sml29623/* 23859Sml29623 * CDDL HEADER START 33859Sml29623 * 43859Sml29623 * The contents of this file are subject to the terms of the 53859Sml29623 * Common Development and Distribution License (the "License"). 63859Sml29623 * You may not use this file except in compliance with the License. 73859Sml29623 * 83859Sml29623 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 93859Sml29623 * or http://www.opensolaris.org/os/licensing. 103859Sml29623 * See the License for the specific language governing permissions 113859Sml29623 * and limitations under the License. 123859Sml29623 * 133859Sml29623 * When distributing Covered Code, include this CDDL HEADER in each 143859Sml29623 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 153859Sml29623 * If applicable, add the following below this CDDL HEADER, with the 163859Sml29623 * fields enclosed by brackets "[]" replaced with your own identifying 173859Sml29623 * information: Portions Copyright [yyyy] [name of copyright owner] 183859Sml29623 * 193859Sml29623 * CDDL HEADER END 203859Sml29623 */ 216495Sspeer 223859Sml29623/* 23*11304SJanie.Lu@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 243859Sml29623 * Use is subject to license terms. 253859Sml29623 */ 263859Sml29623 273859Sml29623/* 283859Sml29623 * Hypervisor calls called by niu leaf driver. 296929Smisaki */ 303859Sml29623 313859Sml29623#include <sys/asm_linkage.h> 323859Sml29623#include <sys/hypervisor_api.h> 333859Sml29623#include <sys/nxge/nxge_impl.h> 343859Sml29623 358275SEric Cheng#if defined(sun4v) 368275SEric Cheng 376495Sspeer/* 386495Sspeer * NIU HV API v1.0 definitions 396495Sspeer */ 406495Sspeer#define N2NIU_RX_LP_SET 0x142 416495Sspeer#define N2NIU_RX_LP_GET 0x143 426495Sspeer#define N2NIU_TX_LP_SET 0x144 436495Sspeer#define N2NIU_TX_LP_GET 0x145 446495Sspeer 456495Sspeer/* 466495Sspeer * NIU HV API v1.1 definitions 476495Sspeer */ 486495Sspeer#define N2NIU_VR_ASSIGN 0x146 496495Sspeer#define N2NIU_VR_UNASSIGN 0x147 506495Sspeer#define N2NIU_VR_GETINFO 0x148 516495Sspeer 526495Sspeer#define N2NIU_VR_RX_DMA_ASSIGN 0x149 536495Sspeer#define N2NIU_VR_RX_DMA_UNASSIGN 0x14a 546495Sspeer#define N2NIU_VR_TX_DMA_ASSIGN 0x14b 556495Sspeer#define N2NIU_VR_TX_DMA_UNASSIGN 0x14c 566495Sspeer 576495Sspeer#define N2NIU_VR_GET_RX_MAP 0x14d 586495Sspeer#define N2NIU_VR_GET_TX_MAP 0x14e 596495Sspeer 606929Smisaki#define N2NIU_VRRX_SET_INO 0x150 616929Smisaki#define N2NIU_VRTX_SET_INO 0x151 626495Sspeer 636495Sspeer#define N2NIU_VRRX_GET_INFO 0x152 646495Sspeer#define N2NIU_VRTX_GET_INFO 0x153 656495Sspeer 666495Sspeer#define N2NIU_VRRX_LP_SET 0x154 676495Sspeer#define N2NIU_VRRX_LP_GET 0x155 686495Sspeer#define N2NIU_VRTX_LP_SET 0x156 696495Sspeer#define N2NIU_VRTX_LP_GET 0x157 706495Sspeer 716929Smisaki#define N2NIU_VRRX_PARAM_GET 0x158 726929Smisaki#define N2NIU_VRRX_PARAM_SET 0x159 736495Sspeer 746929Smisaki#define N2NIU_VRTX_PARAM_GET 0x15a 756929Smisaki#define N2NIU_VRTX_PARAM_SET 0x15b 766495Sspeer 77*11304SJanie.Lu@Sun.COM/* 78*11304SJanie.Lu@Sun.COM * The new set of HV APIs to provide the ability 79*11304SJanie.Lu@Sun.COM * of a domain to manage multiple NIU resources at once to 80*11304SJanie.Lu@Sun.COM * support the KT familty chip having up to 4 NIUs 81*11304SJanie.Lu@Sun.COM * per system. The trap # will be the same as those defined 82*11304SJanie.Lu@Sun.COM * before 2.0 83*11304SJanie.Lu@Sun.COM */ 84*11304SJanie.Lu@Sun.COM#define N2NIU_CFGH_RX_LP_SET 0x142 85*11304SJanie.Lu@Sun.COM#define N2NIU_CFGH_TX_LP_SET 0x143 86*11304SJanie.Lu@Sun.COM#define N2NIU_CFGH_RX_LP_GET 0x144 87*11304SJanie.Lu@Sun.COM#define N2NIU_CFGH_TX_LP_GET 0x145 88*11304SJanie.Lu@Sun.COM#define N2NIU_CFGH_VR_ASSIGN 0x146 89*11304SJanie.Lu@Sun.COM 903859Sml29623#if defined(lint) || defined(__lint) 913859Sml29623 923859Sml29623/*ARGSUSED*/ 933859Sml29623uint64_t 943859Sml29623hv_niu_rx_logical_page_conf(uint64_t chidx, uint64_t pgidx, 953859Sml29623 uint64_t raddr, uint64_t size) 963859Sml29623{ return (0); } 973859Sml29623 983859Sml29623/*ARGSUSED*/ 993859Sml29623uint64_t 1003859Sml29623hv_niu_rx_logical_page_info(uint64_t chidx, uint64_t pgidx, 1013859Sml29623 uint64_t *raddr, uint64_t *size) 1023859Sml29623{ return (0); } 1033859Sml29623 1043859Sml29623/*ARGSUSED*/ 1053859Sml29623uint64_t 1063859Sml29623hv_niu_tx_logical_page_conf(uint64_t chidx, uint64_t pgidx, 1073859Sml29623 uint64_t raddr, uint64_t size) 1083859Sml29623{ return (0); } 1093859Sml29623 1103859Sml29623/*ARGSUSED*/ 1113859Sml29623uint64_t 1123859Sml29623hv_niu_tx_logical_page_info(uint64_t chidx, uint64_t pgidx, 1133859Sml29623 uint64_t *raddr, uint64_t *size) 1143859Sml29623{ return (0); } 1153859Sml29623 1166495Sspeer/*ARGSUSED*/ 1176495Sspeeruint64_t 1186495Sspeerhv_niu_vr_assign(uint64_t vridx, uint64_t ldc_id, uint32_t *cookie) 1196495Sspeer{ return (0); } 1206495Sspeer 121*11304SJanie.Lu@Sun.COM/* 122*11304SJanie.Lu@Sun.COM * KT: Interfaces functions which require the configuration handle 123*11304SJanie.Lu@Sun.COM */ 124*11304SJanie.Lu@Sun.COM/*ARGSUSED*/ 125*11304SJanie.Lu@Sun.COMuint64_t 126*11304SJanie.Lu@Sun.COMhv_niu_cfgh_rx_logical_page_conf(uint64_t cfgh, uint64_t chidx, uint64_t pgidx, 127*11304SJanie.Lu@Sun.COM uint64_t raddr, uint64_t size) 128*11304SJanie.Lu@Sun.COM{ return (0); } 129*11304SJanie.Lu@Sun.COM 130*11304SJanie.Lu@Sun.COM/*ARGSUSED*/ 131*11304SJanie.Lu@Sun.COMuint64_t 132*11304SJanie.Lu@Sun.COMhv_niu_cfgh_rx_logical_page_info(uint64_t cfgh, uint64_t chidx, uint64_t pgidx, 133*11304SJanie.Lu@Sun.COM uint64_t *raddr, uint64_t *size) 134*11304SJanie.Lu@Sun.COM{ return (0); } 135*11304SJanie.Lu@Sun.COM 136*11304SJanie.Lu@Sun.COM/*ARGSUSED*/ 137*11304SJanie.Lu@Sun.COMuint64_t 138*11304SJanie.Lu@Sun.COMhv_niu_cfgh_tx_logical_page_conf(uint64_t cfgh, uint64_t chidx, uint64_t pgidx, 139*11304SJanie.Lu@Sun.COM uint64_t raddr, uint64_t size) 140*11304SJanie.Lu@Sun.COM{ return (0); } 141*11304SJanie.Lu@Sun.COM 142*11304SJanie.Lu@Sun.COM/*ARGSUSED*/ 143*11304SJanie.Lu@Sun.COMuint64_t 144*11304SJanie.Lu@Sun.COMhv_niu_cfgh_tx_logical_page_info(uint64_t cfgh, uint64_t chidx, uint64_t pgidx, 145*11304SJanie.Lu@Sun.COM uint64_t *raddr, uint64_t *size) 146*11304SJanie.Lu@Sun.COM{ return (0); } 147*11304SJanie.Lu@Sun.COM 148*11304SJanie.Lu@Sun.COM/*ARGSUSED*/ 149*11304SJanie.Lu@Sun.COMuint64_t 150*11304SJanie.Lu@Sun.COMhv_niu_cfgh_vr_assign(uint64_t cfgh, uint64_t vridx, uint64_t ldc_id, uint32_t *cookie) 151*11304SJanie.Lu@Sun.COM{ return (0); } 152*11304SJanie.Lu@Sun.COM 1536495Sspeer/*ARGSUSED*/ 1546495Sspeeruint64_t 1556495Sspeerhv_niu_vr_unassign(uint32_t cookie) 1566495Sspeer{ return (0); } 1576495Sspeer 1586495Sspeer/*ARGSUSED*/ 1596495Sspeeruint64_t 1606495Sspeerhv_niu_vr_getinfo(uint32_t cookie, uint64_t *real_start, uint64_t *size) 1616495Sspeer{ return (0); } 1626495Sspeer 1636495Sspeer/*ARGSUSED*/ 1646495Sspeeruint64_t 1656495Sspeerhv_niu_vr_get_rxmap(uint32_t cookie, uint64_t *dma_map) 1666495Sspeer{ return (0); } 1676495Sspeer 1686495Sspeer/*ARGSUSED*/ 1696495Sspeeruint64_t 1706495Sspeerhv_niu_vr_get_txmap(uint32_t cookie, uint64_t *dma_map) 1716495Sspeer{ return (0); } 1726495Sspeer 1736495Sspeer/*ARGSUSED*/ 1746495Sspeeruint64_t 1756495Sspeerhv_niu_rx_dma_assign(uint32_t cookie, uint64_t chidx, uint64_t *vchidx) 1766495Sspeer{ return (0); } 1776495Sspeer 1786495Sspeer/*ARGSUSED*/ 1796495Sspeeruint64_t 1806495Sspeerhv_niu_rx_dma_unassign(uint32_t cookie, uint64_t vchidx) 1816495Sspeer{ return (0); } 1826495Sspeer 1836495Sspeer/*ARGSUSED*/ 1846495Sspeeruint64_t 1856495Sspeerhv_niu_tx_dma_assign(uint32_t cookie, uint64_t chidx, uint64_t *vchidx) 1866495Sspeer{ return (0); } 1876495Sspeer 1886495Sspeer/*ARGSUSED*/ 1896495Sspeeruint64_t 1906495Sspeerhv_niu_tx_dma_unassign(uint32_t cookie, uint64_t chidx) 1916495Sspeer{ return (0); } 1926495Sspeer 1936495Sspeer/*ARGSUSED*/ 1946495Sspeeruint64_t 1956495Sspeerhv_niu_vrrx_logical_page_conf(uint32_t cookie, uint64_t chidx, uint64_t pgidx, 1966495Sspeer uint64_t raddr, uint64_t size) 1976495Sspeer{ return (0); } 1986495Sspeer 1996495Sspeer/*ARGSUSED*/ 2006495Sspeeruint64_t 2016495Sspeerhv_niu_vrrx_logical_page_info(uint32_t cookie, uint64_t chidx, uint64_t pgidx, 2026495Sspeer uint64_t *raddr, uint64_t *size) 2036495Sspeer{ return (0); } 2046495Sspeer 2056495Sspeer/*ARGSUSED*/ 2066495Sspeeruint64_t 2076495Sspeerhv_niu_vrtx_logical_page_conf(uint32_t cookie, uint64_t chidx, uint64_t pgidx, 2086495Sspeer uint64_t raddr, uint64_t size) 2096495Sspeer{ return (0); } 2106495Sspeer 2116495Sspeer/*ARGSUSED*/ 2126495Sspeeruint64_t 2136495Sspeerhv_niu_vrtx_logical_page_info(uint32_t cookie, uint64_t chidx, uint64_t pgidx, 2146495Sspeer uint64_t *raddr, uint64_t *size) 2156495Sspeer{ return (0); } 2166495Sspeer 2176495Sspeer/*ARGSUSED*/ 2186495Sspeeruint64_t 2196495Sspeerhv_niu_vrrx_param_get(uint32_t cookie, uint64_t vridx, uint64_t param, 2206495Sspeer uint64_t *value) 2216495Sspeer{ return (0); } 2226495Sspeer 2236495Sspeer/*ARGSUSED*/ 2246495Sspeeruint64_t 2256495Sspeerhv_niu_vrrx_param_set(uint32_t cookie, uint64_t vridx, uint64_t param, 2266495Sspeer uint64_t value) 2276495Sspeer{ return (0); } 2286495Sspeer 2296495Sspeer/*ARGSUSED*/ 2306495Sspeeruint64_t 2316495Sspeerhv_niu_vrtx_param_get(uint32_t cookie, uint64_t vridx, uint64_t param, 2326495Sspeer uint64_t *value) 2336495Sspeer{ return (0); } 2346495Sspeer 2356495Sspeer/*ARGSUSED*/ 2366495Sspeeruint64_t 2376495Sspeerhv_niu_vrtx_param_set(uint32_t cookie, uint64_t vridx, uint64_t param, 2386495Sspeer uint64_t value) 2396495Sspeer{ return (0); } 2406495Sspeer 2416495Sspeer/*ARGSUSED*/ 2426495Sspeeruint64_t 2436495Sspeerhv_niu_vrtx_getinfo(uint32_t cookie, uint64_t vridx, 2446495Sspeer uint64_t *group, uint64_t *logdev) 2456495Sspeer{ return (0); } 2466495Sspeer 2476495Sspeer/*ARGSUSED*/ 2486495Sspeeruint64_t 2496495Sspeerhv_niu_vrrx_getinfo(uint32_t cookie, uint64_t vridx, 2506495Sspeer uint64_t *group, uint64_t *logdev) 2516495Sspeer{ return (0); } 2526495Sspeer 2536495Sspeer/*ARGSUSED*/ 2546495Sspeeruint64_t 2556495Sspeerhv_niu_vrtx_set_ino(uint32_t cookie, uint64_t vridx, uint32_t ino) 2566495Sspeer{ return (0); } 2576495Sspeer 2586495Sspeer/*ARGSUSED*/ 2596495Sspeeruint64_t 2606495Sspeerhv_niu_vrrx_set_ino(uint32_t cookie, uint64_t vridx, uint32_t ino) 2616495Sspeer{ return (0); } 2626495Sspeer 2633859Sml29623#else /* lint || __lint */ 2643859Sml29623 2653859Sml29623 /* 2663859Sml29623 * hv_niu_rx_logical_page_conf(uint64_t chidx, uint64_t pgidx, 2673859Sml29623 * uint64_t raddr, uint64_t size) 2683859Sml29623 */ 2693859Sml29623 ENTRY(hv_niu_rx_logical_page_conf) 2703859Sml29623 mov N2NIU_RX_LP_CONF, %o5 2713859Sml29623 ta FAST_TRAP 2723859Sml29623 retl 2733859Sml29623 nop 2743859Sml29623 SET_SIZE(hv_niu_rx_logical_page_conf) 2753859Sml29623 2763859Sml29623 /* 2773859Sml29623 * hv_niu_rx_logical_page_info(uint64_t chidx, uint64_t pgidx, 2783859Sml29623 * uint64_t *raddr, uint64_t *size) 2793859Sml29623 */ 2803859Sml29623 ENTRY(hv_niu_rx_logical_page_info) 2813859Sml29623 mov %o2, %g1 2823859Sml29623 mov %o3, %g2 2833859Sml29623 mov N2NIU_RX_LP_INFO, %o5 2843859Sml29623 ta FAST_TRAP 2853859Sml29623 stx %o1, [%g1] 2863859Sml29623 retl 2873859Sml29623 stx %o2, [%g2] 2883859Sml29623 SET_SIZE(hv_niu_rx_logical_page_info) 2893859Sml29623 2903859Sml29623 /* 2913859Sml29623 * hv_niu_tx_logical_page_conf(uint64_t chidx, uint64_t pgidx, 2923859Sml29623 * uint64_t raddr, uint64_t size) 2933859Sml29623 */ 2943859Sml29623 ENTRY(hv_niu_tx_logical_page_conf) 2953859Sml29623 mov N2NIU_TX_LP_CONF, %o5 2963859Sml29623 ta FAST_TRAP 2973859Sml29623 retl 2983859Sml29623 nop 2993859Sml29623 SET_SIZE(hv_niu_tx_logical_page_conf) 3003859Sml29623 3013859Sml29623 /* 3023859Sml29623 * hv_niu_tx_logical_page_info(uint64_t chidx, uint64_t pgidx, 3033859Sml29623 * uint64_t *raddr, uint64_t *size) 3043859Sml29623 */ 3053859Sml29623 ENTRY(hv_niu_tx_logical_page_info) 3063859Sml29623 mov %o2, %g1 3073859Sml29623 mov %o3, %g2 3083859Sml29623 mov N2NIU_TX_LP_INFO, %o5 3093859Sml29623 ta FAST_TRAP 3103859Sml29623 stx %o1, [%g1] 3113859Sml29623 retl 3123859Sml29623 stx %o2, [%g2] 3133859Sml29623 SET_SIZE(hv_niu_tx_logical_page_info) 3143859Sml29623 3156495Sspeer /* 3166495Sspeer * hv_niu_vr_assign(uint64_t vridx, uint64_t ldc_id, 3176929Smisaki * uint32_t *cookie) 3186495Sspeer */ 3196495Sspeer ENTRY(hv_niu_vr_assign) 3206495Sspeer mov %o2, %g1 3216495Sspeer mov N2NIU_VR_ASSIGN, %o5 3226495Sspeer ta FAST_TRAP 3236495Sspeer retl 3246495Sspeer stw %o1, [%g1] 3256495Sspeer SET_SIZE(hv_niu_vr_assign) 3266495Sspeer 3276495Sspeer /* 3286495Sspeer * hv_niu_vr_unassign(uint32_t cookie) 3296495Sspeer */ 3306495Sspeer ENTRY(hv_niu_vr_unassign) 3316495Sspeer mov N2NIU_VR_UNASSIGN, %o5 3326495Sspeer ta FAST_TRAP 3336495Sspeer retl 3346495Sspeer nop 3356495Sspeer SET_SIZE(hv_niu_vr_unassign) 3366495Sspeer 3376495Sspeer /* 3386495Sspeer * hv_niu_vr_getinfo(uint32_t cookie, uint64_t &real_start, 3396929Smisaki * uint64_t &size) 3406495Sspeer */ 3416495Sspeer ENTRY(hv_niu_vr_getinfo) 3426495Sspeer mov %o1, %g1 3436495Sspeer mov %o2, %g2 3446495Sspeer mov N2NIU_VR_GETINFO, %o5 3456495Sspeer ta FAST_TRAP 3466495Sspeer stx %o1, [%g1] 3476495Sspeer retl 3486495Sspeer stx %o2, [%g2] 3496495Sspeer SET_SIZE(hv_niu_vr_getinfo) 3506495Sspeer 3516495Sspeer /* 3526495Sspeer * hv_niu_vr_get_rxmap(uint32_t cookie, uint64_t *dma_map) 3536495Sspeer */ 3546495Sspeer ENTRY(hv_niu_vr_get_rxmap) 3556495Sspeer mov %o1, %g1 3566495Sspeer mov N2NIU_VR_GET_RX_MAP, %o5 3576495Sspeer ta FAST_TRAP 3586495Sspeer retl 3596495Sspeer stx %o1, [%g1] 3606495Sspeer SET_SIZE(hv_niu_vr_get_rxmap) 3616495Sspeer 3626495Sspeer /* 3636495Sspeer * hv_niu_vr_get_txmap(uint32_t cookie, uint64_t *dma_map) 3646495Sspeer */ 3656495Sspeer ENTRY(hv_niu_vr_get_txmap) 3666495Sspeer mov %o1, %g1 3676495Sspeer mov N2NIU_VR_GET_TX_MAP, %o5 3686495Sspeer ta FAST_TRAP 3696495Sspeer retl 3706495Sspeer stx %o1, [%g1] 3716495Sspeer SET_SIZE(hv_niu_vr_get_txmap) 3726495Sspeer 3736495Sspeer /* 3746495Sspeer * hv_niu_rx_dma_assign(uint32_t cookie, uint64_t chidx, 3756929Smisaki * uint64_t *vchidx) 3766495Sspeer */ 3776495Sspeer ENTRY(hv_niu_rx_dma_assign) 3786495Sspeer mov %o2, %g1 3796495Sspeer mov N2NIU_VR_RX_DMA_ASSIGN, %o5 3806495Sspeer ta FAST_TRAP 3816495Sspeer retl 3826495Sspeer stx %o1, [%g1] 3836495Sspeer SET_SIZE(hv_niu_rx_dma_assign) 3846495Sspeer 3856495Sspeer /* 3866495Sspeer * hv_niu_rx_dma_unassign(uint32_t cookie, uint64_t vchidx) 3876495Sspeer */ 3886495Sspeer ENTRY(hv_niu_rx_dma_unassign) 3896495Sspeer mov N2NIU_VR_RX_DMA_UNASSIGN, %o5 3906495Sspeer ta FAST_TRAP 3916495Sspeer retl 3926495Sspeer nop 3936495Sspeer SET_SIZE(hv_niu_rx_dma_unassign) 3946495Sspeer 3956495Sspeer /* 3966495Sspeer * hv_niu_tx_dma_assign(uint32_t cookie, uint64_t chidx, 3976929Smisaki * uint64_t *vchidx) 3986495Sspeer */ 3996495Sspeer ENTRY(hv_niu_tx_dma_assign) 4006495Sspeer mov %o2, %g1 4016495Sspeer mov N2NIU_VR_TX_DMA_ASSIGN, %o5 4026495Sspeer ta FAST_TRAP 4036495Sspeer retl 4046495Sspeer stx %o1, [%g1] 4056495Sspeer SET_SIZE(hv_niu_tx_dma_assign) 4066495Sspeer 4076495Sspeer /* 4086495Sspeer * hv_niu_tx_dma_unassign(uint32_t cookie, uint64_t vchidx) 4096495Sspeer */ 4106495Sspeer ENTRY(hv_niu_tx_dma_unassign) 4116495Sspeer mov N2NIU_VR_TX_DMA_UNASSIGN, %o5 4126495Sspeer ta FAST_TRAP 4136495Sspeer retl 4146495Sspeer nop 4156495Sspeer SET_SIZE(hv_niu_tx_dma_unassign) 4166495Sspeer 4176495Sspeer /* 4186495Sspeer * hv_niu_vrrx_logical_page_conf(uint32_t cookie, uint64_t chidx, 4196929Smisaki * uint64_t pgidx, uint64_t raddr, uint64_t size) 4206495Sspeer */ 4216495Sspeer ENTRY(hv_niu_vrrx_logical_page_conf) 4226495Sspeer mov N2NIU_VRRX_LP_SET, %o5 4236495Sspeer ta FAST_TRAP 4246495Sspeer retl 4256495Sspeer nop 4266495Sspeer SET_SIZE(hv_niu_vrrx_logical_page_conf) 4276495Sspeer 4286495Sspeer /* 4296495Sspeer * hv_niu_vrrx_logical_page_info(uint32_t cookie, uint64_t chidx, 4306929Smisaki * uint64_t pgidx, uint64_t *raddr, uint64_t *size) 4316495Sspeer */ 4326495Sspeer ENTRY(hv_niu_vrrx_logical_page_info) 4336495Sspeer mov %o3, %g1 4346495Sspeer mov %o4, %g2 4356495Sspeer mov N2NIU_VRRX_LP_GET, %o5 4366495Sspeer ta FAST_TRAP 4376495Sspeer stx %o1, [%g1] 4386495Sspeer retl 4396495Sspeer stx %o2, [%g2] 4406495Sspeer SET_SIZE(hv_niu_vrrx_logical_page_info) 4416495Sspeer 4426495Sspeer /* 4436495Sspeer * hv_niu_vrtx_logical_page_conf(uint32_t cookie, uint64_t chidx, 4446929Smisaki * uint64_t pgidx, uint64_t raddr, uint64_t size) 4456495Sspeer */ 4466495Sspeer ENTRY(hv_niu_vrtx_logical_page_conf) 4476495Sspeer mov N2NIU_VRTX_LP_SET, %o5 4486495Sspeer ta FAST_TRAP 4496495Sspeer retl 4506495Sspeer nop 4516495Sspeer SET_SIZE(hv_niu_vrtx_logical_page_conf) 4526495Sspeer 4536495Sspeer /* 4546495Sspeer * hv_niu_vrtx_logical_page_info(uint32_t cookie, uint64_t chidx, 4556929Smisaki * uint64_t pgidx, uint64_t *raddr, uint64_t *size) 4566495Sspeer */ 4576495Sspeer ENTRY(hv_niu_vrtx_logical_page_info) 4586495Sspeer mov %o3, %g1 4596495Sspeer mov %o4, %g2 4606495Sspeer mov N2NIU_VRTX_LP_GET, %o5 4616495Sspeer ta FAST_TRAP 4626495Sspeer stx %o1, [%g1] 4636495Sspeer retl 4646495Sspeer stx %o2, [%g2] 4656495Sspeer SET_SIZE(hv_niu_vrtx_logical_page_info) 4666495Sspeer 4676495Sspeer /* 4686495Sspeer * hv_niu_vrrx_getinfo(uint32_t cookie, uint64_t vridx, 4696495Sspeer * uint64_t *group, uint64_t *logdev) 4706495Sspeer */ 4716495Sspeer ENTRY(hv_niu_vrrx_getinfo) 4726495Sspeer mov %o2, %g1 4736495Sspeer mov %o3, %g2 4746495Sspeer mov N2NIU_VRRX_GET_INFO, %o5 4756495Sspeer ta FAST_TRAP 4766495Sspeer stx %o2, [%g2] 4776495Sspeer retl 4786495Sspeer stx %o1, [%g1] 4796495Sspeer SET_SIZE(hv_niu_vrrx_getinfo) 4806495Sspeer 4816495Sspeer /* 4826495Sspeer * hv_niu_vrtx_getinfo(uint32_t cookie, uint64_t vridx, 4836495Sspeer * uint64_t *group, uint64_t *logdev) 4846495Sspeer */ 4856495Sspeer ENTRY(hv_niu_vrtx_getinfo) 4866495Sspeer mov %o2, %g1 4876495Sspeer mov %o3, %g2 4886495Sspeer mov N2NIU_VRTX_GET_INFO, %o5 4896495Sspeer ta FAST_TRAP 4906495Sspeer stx %o2, [%g2] 4916495Sspeer retl 4926495Sspeer stx %o1, [%g1] 4936495Sspeer SET_SIZE(hv_niu_vrtx_getinfo) 4946495Sspeer 4956495Sspeer /* 4966495Sspeer * hv_niu_vrrx_set_ino(uint32_t cookie, uint64_t vridx, uint32_t ino) 4976495Sspeer */ 4986495Sspeer ENTRY(hv_niu_vrrx_set_ino) 4996495Sspeer mov N2NIU_VRRX_SET_INO, %o5 5006495Sspeer ta FAST_TRAP 5016495Sspeer retl 5026495Sspeer nop 5036495Sspeer SET_SIZE(hv_niu_vrrx_set_ino) 5046495Sspeer 5056495Sspeer /* 5066495Sspeer * hv_niu_vrtx_set_ino(uint32_t cookie, uint64_t vridx, uint32_t ino) 5076495Sspeer */ 5086495Sspeer ENTRY(hv_niu_vrtx_set_ino) 5096495Sspeer mov N2NIU_VRTX_SET_INO, %o5 5106495Sspeer ta FAST_TRAP 5116495Sspeer retl 5126495Sspeer nop 5136495Sspeer SET_SIZE(hv_niu_vrtx_set_ino) 5146495Sspeer 5156495Sspeer /* 5166929Smisaki * hv_niu_vrrx_param_get(uint32_t cookie, uint64_t vridx, 5176929Smisaki * uint64_t param, uint64_t *value) 5186495Sspeer * 5196495Sspeer */ 5206495Sspeer ENTRY(hv_niu_vrrx_param_get) 5216495Sspeer mov %o3, %g1 5226495Sspeer mov N2NIU_VRRX_PARAM_GET, %o5 5236495Sspeer ta FAST_TRAP 5246495Sspeer retl 5256495Sspeer stx %o1, [%g1] 5266495Sspeer SET_SIZE(hv_niu_vrrx_param_get) 5276495Sspeer 5286495Sspeer /* 5296929Smisaki * hv_niu_vrrx_param_set(uint32_t cookie, uint64_t vridx, 5306929Smisaki * uint64_t param, uint64_t value) 5316495Sspeer * 5326495Sspeer */ 5336495Sspeer ENTRY(hv_niu_vrrx_param_set) 5346495Sspeer mov N2NIU_VRRX_PARAM_SET, %o5 5356495Sspeer ta FAST_TRAP 5366495Sspeer retl 5376495Sspeer nop 5386495Sspeer SET_SIZE(hv_niu_vrrx_param_set) 5396495Sspeer 5406495Sspeer /* 5416929Smisaki * hv_niu_vrtx_param_get(uint32_t cookie, uint64_t vridx, 5426929Smisaki * uint64_t param, uint64_t *value) 5436495Sspeer * 5446495Sspeer */ 5456495Sspeer ENTRY(hv_niu_vrtx_param_get) 5466495Sspeer mov %o3, %g1 5476495Sspeer mov N2NIU_VRTX_PARAM_GET, %o5 5486495Sspeer ta FAST_TRAP 5496495Sspeer retl 5506495Sspeer stx %o1, [%g1] 5516495Sspeer SET_SIZE(hv_niu_vrtx_param_get) 5526495Sspeer 5536495Sspeer /* 5546929Smisaki * hv_niu_vrtx_param_set(uint32_t cookie, uint64_t vridx, 5556929Smisaki * uint64_t param, uint64_t value) 5566495Sspeer * 5576495Sspeer */ 5586495Sspeer ENTRY(hv_niu_vrtx_param_set) 5596495Sspeer mov N2NIU_VRTX_PARAM_SET, %o5 5606495Sspeer ta FAST_TRAP 5616495Sspeer retl 5626495Sspeer nop 5636495Sspeer SET_SIZE(hv_niu_vrtx_param_set) 5646495Sspeer 565*11304SJanie.Lu@Sun.COM /* 566*11304SJanie.Lu@Sun.COM * Interfaces functions which require the configuration handle. 567*11304SJanie.Lu@Sun.COM */ 568*11304SJanie.Lu@Sun.COM /* 569*11304SJanie.Lu@Sun.COM * hv_niu__cfgh_rx_logical_page_conf(uint64_t cfgh, uint64_t chidx, 570*11304SJanie.Lu@Sun.COM * uint64_t pgidx, uint64_t raddr, uint64_t size) 571*11304SJanie.Lu@Sun.COM */ 572*11304SJanie.Lu@Sun.COM ENTRY(hv_niu_cfgh_rx_logical_page_conf) 573*11304SJanie.Lu@Sun.COM mov N2NIU_RX_LP_CONF, %o5 574*11304SJanie.Lu@Sun.COM ta FAST_TRAP 575*11304SJanie.Lu@Sun.COM retl 576*11304SJanie.Lu@Sun.COM nop 577*11304SJanie.Lu@Sun.COM SET_SIZE(hv_niu_cfgh_rx_logical_page_conf) 578*11304SJanie.Lu@Sun.COM 579*11304SJanie.Lu@Sun.COM /* 580*11304SJanie.Lu@Sun.COM * hv_niu__cfgh_rx_logical_page_info(uint64_t cfgh, uint64_t chidx, 581*11304SJanie.Lu@Sun.COM * uint64_t pgidx, uint64_t *raddr, uint64_t *size) 582*11304SJanie.Lu@Sun.COM */ 583*11304SJanie.Lu@Sun.COM ENTRY(hv_niu_cfgh_rx_logical_page_info) 584*11304SJanie.Lu@Sun.COM mov %o3, %g1 585*11304SJanie.Lu@Sun.COM mov %o4, %g2 586*11304SJanie.Lu@Sun.COM mov N2NIU_RX_LP_INFO, %o5 587*11304SJanie.Lu@Sun.COM ta FAST_TRAP 588*11304SJanie.Lu@Sun.COM stx %o1, [%g1] 589*11304SJanie.Lu@Sun.COM retl 590*11304SJanie.Lu@Sun.COM stx %o2, [%g2] 591*11304SJanie.Lu@Sun.COM SET_SIZE(hv_niu_cfgh_rx_logical_page_info) 592*11304SJanie.Lu@Sun.COM 593*11304SJanie.Lu@Sun.COM /* 594*11304SJanie.Lu@Sun.COM * hv_niu_cfgh_tx_logical_page_conf(uint64_t cfgh, uint64_t chidx, 595*11304SJanie.Lu@Sun.COM * uint64_t pgidx, uint64_t raddr, uint64_t size) 596*11304SJanie.Lu@Sun.COM */ 597*11304SJanie.Lu@Sun.COM ENTRY(hv_niu_cfgh_tx_logical_page_conf) 598*11304SJanie.Lu@Sun.COM mov N2NIU_TX_LP_CONF, %o5 599*11304SJanie.Lu@Sun.COM ta FAST_TRAP 600*11304SJanie.Lu@Sun.COM retl 601*11304SJanie.Lu@Sun.COM nop 602*11304SJanie.Lu@Sun.COM SET_SIZE(hv_niu_cfgh_tx_logical_page_conf) 603*11304SJanie.Lu@Sun.COM 604*11304SJanie.Lu@Sun.COM /* 605*11304SJanie.Lu@Sun.COM * hv_niu_cfgh_tx_logical_page_info(uint64_t cfgh, uint64_t chidx, 606*11304SJanie.Lu@Sun.COM * uint64_t pgidx, uint64_t *raddr, uint64_t *size) 607*11304SJanie.Lu@Sun.COM */ 608*11304SJanie.Lu@Sun.COM ENTRY(hv_niu_cfgh_tx_logical_page_info) 609*11304SJanie.Lu@Sun.COM mov %o3, %g1 610*11304SJanie.Lu@Sun.COM mov %o4, %g2 611*11304SJanie.Lu@Sun.COM mov N2NIU_TX_LP_INFO, %o5 612*11304SJanie.Lu@Sun.COM ta FAST_TRAP 613*11304SJanie.Lu@Sun.COM stx %o1, [%g1] 614*11304SJanie.Lu@Sun.COM retl 615*11304SJanie.Lu@Sun.COM stx %o2, [%g2] 616*11304SJanie.Lu@Sun.COM SET_SIZE(hv_niu_cfgh_tx_logical_page_info) 617*11304SJanie.Lu@Sun.COM 618*11304SJanie.Lu@Sun.COM /* 619*11304SJanie.Lu@Sun.COM * hv_niu_cfgh_vr_assign(uint64_t cfgh, uint64_t vridx, uint64_t ldc_id, 620*11304SJanie.Lu@Sun.COM * uint32_t *cookie) 621*11304SJanie.Lu@Sun.COM */ 622*11304SJanie.Lu@Sun.COM ENTRY(hv_niu_cfgh_vr_assign) 623*11304SJanie.Lu@Sun.COM mov %o3, %g1 624*11304SJanie.Lu@Sun.COM mov N2NIU_VR_ASSIGN, %o5 625*11304SJanie.Lu@Sun.COM ta FAST_TRAP 626*11304SJanie.Lu@Sun.COM retl 627*11304SJanie.Lu@Sun.COM stw %o1, [%g1] 628*11304SJanie.Lu@Sun.COM SET_SIZE(hv_niu_cfgh_vr_assign) 629*11304SJanie.Lu@Sun.COM 6303859Sml29623#endif /* lint || __lint */ 6318275SEric Cheng 6328275SEric Cheng#endif /*defined(sun4v)*/ 633