1678453a8Sspeer /* 2678453a8Sspeer * CDDL HEADER START 3678453a8Sspeer * 4678453a8Sspeer * The contents of this file are subject to the terms of the 5678453a8Sspeer * Common Development and Distribution License (the "License"). 6678453a8Sspeer * You may not use this file except in compliance with the License. 7678453a8Sspeer * 8678453a8Sspeer * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9678453a8Sspeer * or http://www.opensolaris.org/os/licensing. 10678453a8Sspeer * See the License for the specific language governing permissions 11678453a8Sspeer * and limitations under the License. 12678453a8Sspeer * 13678453a8Sspeer * When distributing Covered Code, include this CDDL HEADER in each 14678453a8Sspeer * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15678453a8Sspeer * If applicable, add the following below this CDDL HEADER, with the 16678453a8Sspeer * fields enclosed by brackets "[]" replaced with your own identifying 17678453a8Sspeer * information: Portions Copyright [yyyy] [name of copyright owner] 18678453a8Sspeer * 19678453a8Sspeer * CDDL HEADER END 20678453a8Sspeer */ 21678453a8Sspeer 22678453a8Sspeer /* 23678453a8Sspeer * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24678453a8Sspeer * Use is subject to license terms. 25678453a8Sspeer */ 26678453a8Sspeer 27678453a8Sspeer /* 28678453a8Sspeer * nxge_hv.c 29678453a8Sspeer * 30678453a8Sspeer * This file is Sun4v specific. It is the NXGE interface to the 31678453a8Sspeer * Sun4v Hypervisor. 32678453a8Sspeer * 33678453a8Sspeer */ 34678453a8Sspeer 35678453a8Sspeer #include <sys/nxge/nxge_impl.h> 36678453a8Sspeer #include <sys/nxge/nxge_hio.h> 37678453a8Sspeer 38*da14cebeSEric Cheng #if defined(sun4v) 39*da14cebeSEric Cheng 40678453a8Sspeer void 41678453a8Sspeer nxge_hio_hv_init(nxge_t *nxge) 42678453a8Sspeer { 43678453a8Sspeer nxge_hio_data_t *nhd = (nxge_hio_data_t *)nxge->nxge_hw_p->hio; 44678453a8Sspeer 45678453a8Sspeer nxhv_vr_fp_t *vr; 46678453a8Sspeer nxhv_dc_fp_t *tx; 47678453a8Sspeer nxhv_dc_fp_t *rx; 48678453a8Sspeer 49678453a8Sspeer /* First, the HV VR functions. */ 50678453a8Sspeer vr = &nhd->hio.vr; 51678453a8Sspeer 52678453a8Sspeer vr->assign = &hv_niu_vr_assign; 53678453a8Sspeer vr->unassign = &hv_niu_vr_unassign; 54678453a8Sspeer vr->getinfo = &hv_niu_vr_getinfo; 55678453a8Sspeer 56678453a8Sspeer // ------------------------------------------------------------- 57678453a8Sspeer /* Find the transmit functions. */ 58678453a8Sspeer tx = &nhd->hio.tx; 59678453a8Sspeer 60678453a8Sspeer tx->assign = &hv_niu_tx_dma_assign; 61678453a8Sspeer tx->unassign = &hv_niu_tx_dma_unassign; 62678453a8Sspeer tx->get_map = &hv_niu_vr_get_txmap; 63678453a8Sspeer 64678453a8Sspeer tx->lp_conf = &hv_niu_tx_logical_page_conf; 65678453a8Sspeer tx->lp_info = &hv_niu_tx_logical_page_info; 66678453a8Sspeer 67678453a8Sspeer tx->getinfo = &hv_niu_vrtx_getinfo; 68678453a8Sspeer 69678453a8Sspeer // ------------------------------------------------------------- 70678453a8Sspeer /* Now find the Receive functions. */ 71678453a8Sspeer rx = &nhd->hio.rx; 72678453a8Sspeer 73678453a8Sspeer rx->assign = &hv_niu_rx_dma_assign; 74678453a8Sspeer rx->unassign = &hv_niu_rx_dma_unassign; 75678453a8Sspeer rx->get_map = &hv_niu_vr_get_rxmap; 76678453a8Sspeer 77678453a8Sspeer rx->lp_conf = &hv_niu_rx_logical_page_conf; 78678453a8Sspeer rx->lp_info = &hv_niu_rx_logical_page_info; 79678453a8Sspeer 80678453a8Sspeer rx->getinfo = &hv_niu_vrrx_getinfo; 81678453a8Sspeer } 82*da14cebeSEric Cheng 83*da14cebeSEric Cheng #endif /* defined(sun4v) */ 84