1*6495Sspeer /* 2*6495Sspeer * CDDL HEADER START 3*6495Sspeer * 4*6495Sspeer * The contents of this file are subject to the terms of the 5*6495Sspeer * Common Development and Distribution License (the "License"). 6*6495Sspeer * You may not use this file except in compliance with the License. 7*6495Sspeer * 8*6495Sspeer * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*6495Sspeer * or http://www.opensolaris.org/os/licensing. 10*6495Sspeer * See the License for the specific language governing permissions 11*6495Sspeer * and limitations under the License. 12*6495Sspeer * 13*6495Sspeer * When distributing Covered Code, include this CDDL HEADER in each 14*6495Sspeer * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*6495Sspeer * If applicable, add the following below this CDDL HEADER, with the 16*6495Sspeer * fields enclosed by brackets "[]" replaced with your own identifying 17*6495Sspeer * information: Portions Copyright [yyyy] [name of copyright owner] 18*6495Sspeer * 19*6495Sspeer * CDDL HEADER END 20*6495Sspeer */ 21*6495Sspeer 22*6495Sspeer /* 23*6495Sspeer * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24*6495Sspeer * Use is subject to license terms. 25*6495Sspeer */ 26*6495Sspeer 27*6495Sspeer #pragma ident "%Z%%M% %I% %E% SMI" 28*6495Sspeer 29*6495Sspeer /* 30*6495Sspeer * nxge_hv.c 31*6495Sspeer * 32*6495Sspeer * This file is Sun4v specific. It is the NXGE interface to the 33*6495Sspeer * Sun4v Hypervisor. 34*6495Sspeer * 35*6495Sspeer */ 36*6495Sspeer 37*6495Sspeer #include <sys/nxge/nxge_impl.h> 38*6495Sspeer #include <sys/nxge/nxge_hio.h> 39*6495Sspeer 40*6495Sspeer void 41*6495Sspeer nxge_hio_hv_init(nxge_t *nxge) 42*6495Sspeer { 43*6495Sspeer nxge_hio_data_t *nhd = (nxge_hio_data_t *)nxge->nxge_hw_p->hio; 44*6495Sspeer 45*6495Sspeer nxhv_vr_fp_t *vr; 46*6495Sspeer nxhv_dc_fp_t *tx; 47*6495Sspeer nxhv_dc_fp_t *rx; 48*6495Sspeer 49*6495Sspeer /* First, the HV VR functions. */ 50*6495Sspeer vr = &nhd->hio.vr; 51*6495Sspeer 52*6495Sspeer vr->assign = &hv_niu_vr_assign; 53*6495Sspeer vr->unassign = &hv_niu_vr_unassign; 54*6495Sspeer vr->getinfo = &hv_niu_vr_getinfo; 55*6495Sspeer 56*6495Sspeer // ------------------------------------------------------------- 57*6495Sspeer /* Find the transmit functions. */ 58*6495Sspeer tx = &nhd->hio.tx; 59*6495Sspeer 60*6495Sspeer tx->assign = &hv_niu_tx_dma_assign; 61*6495Sspeer tx->unassign = &hv_niu_tx_dma_unassign; 62*6495Sspeer tx->get_map = &hv_niu_vr_get_txmap; 63*6495Sspeer 64*6495Sspeer tx->lp_conf = &hv_niu_tx_logical_page_conf; 65*6495Sspeer tx->lp_info = &hv_niu_tx_logical_page_info; 66*6495Sspeer 67*6495Sspeer tx->getinfo = &hv_niu_vrtx_getinfo; 68*6495Sspeer 69*6495Sspeer // ------------------------------------------------------------- 70*6495Sspeer /* Now find the Receive functions. */ 71*6495Sspeer rx = &nhd->hio.rx; 72*6495Sspeer 73*6495Sspeer rx->assign = &hv_niu_rx_dma_assign; 74*6495Sspeer rx->unassign = &hv_niu_rx_dma_unassign; 75*6495Sspeer rx->get_map = &hv_niu_vr_get_rxmap; 76*6495Sspeer 77*6495Sspeer rx->lp_conf = &hv_niu_rx_logical_page_conf; 78*6495Sspeer rx->lp_info = &hv_niu_rx_logical_page_info; 79*6495Sspeer 80*6495Sspeer rx->getinfo = &hv_niu_vrrx_getinfo; 81*6495Sspeer } 82