/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_NXGE_NXGE_HIO_H
#define _SYS_NXGE_NXGE_HIO_H
#ifdef __cplusplus
extern "C" {
#endif
#include <nxge_mac.h>
#include <nxge_ipp.h>
#include <nxge_fflp.h>
#include <sys/mac_provider.h>
/* ------------------------------------------------------------------ */
/* HV 2.0 API group functions */
uint64_t);
uint64_t *);
typedef struct {
} nxhv_vr_fp_t;
typedef struct {
} nxhv_dc_fp_t;
typedef struct {
} nxhv_fp_t;
/* ------------------------------------------------------------------ */
typedef enum {
typedef enum {
typedef enum { /* 0-8 */
} vr_region_t;
typedef enum {
} vp_channel_t;
typedef enum {
} vpc_type_t;
typedef enum {
RXDMA_CFIG1 = 0,
typedef enum {
Tx_RNG_CFIG = 0,
/*
* -------------------------------------------------------------
* These definitions are used to handle the virtual PIO_LDSV
* space of a VR.
* -------------------------------------------------------------
*/
typedef enum {
} pio_ld_op_t;
/* ------------------------------------------------------------------ */
typedef struct {
const char *name;
int offset;
typedef struct {
} nx_rdc_tbl_t;
typedef struct nxge_hio_vr {
typedef struct {
} hio_ldg_t;
/*
* -------------------------------------------------------------
* The service domain driver makes use of both <index>, the index
* into a VR's virtual page, and <channel>, the absolute channel
* number, what we will call here the physical channel number.
*
* The guest domain will set both fields to the same value, since
* it doesn't know any better. And if a service domain owns a
* DMA channel, it will also set both fields to the same value,
* since it is not using a VR per se.
* -------------------------------------------------------------
*/
typedef struct nx_dc {
/*
* <channel> has its normal meaning. <page> refers to the
* virtual page of the VR that <channel> has been bound to.
* Therefore, in the service domain, <page> & <channel>
* are almost always different. While in a guest domain,
* they are always the same.
*/
typedef struct {
int vrs;
unsigned sequence;
/* vr[0] is reserved for the service domain. */
/*
* -------------------------------------------------------------
* prototypes
* -------------------------------------------------------------
*/
extern void nxge_get_environs(nxge_t *);
extern int nxge_hio_init(nxge_t *);
extern void nxge_hio_uninit(nxge_t *);
/*
* ---------------------------------------------------------------------
* These are the general-purpose DMA channel group functions. That is,
* these functions are used to manage groups of TDCs or RDCs in an HIO
* environment.
*
* But is also expected that in the future they will be able to manage
* Crossbow groups.
* ---------------------------------------------------------------------
*/
extern void nxge_delay(int);
extern const char *nxge_ddi_perror(int);
/*
* ---------------------------------------------------------------------
* These are the Sun4v HIO function prototypes.
* ---------------------------------------------------------------------
*/
extern int nxge_hio_share_add_group(mac_share_handle_t,
extern int nxge_hio_share_rem_group(mac_share_handle_t,
extern void nxge_hio_share_unbind(mac_share_handle_t);
/* nxge_hio_guest.c */
extern void nxge_hio_unregister(nxge_t *);
extern int nxge_guest_regs_map(nxge_t *);
extern void nxge_guest_regs_map_free(nxge_t *);
extern void nxge_hio_start_timer(nxge_t *);
/* nxge_intr.c */
extern void nxge_hio_intr_uninit(nxge_t *);
/* nxge_hv.c */
extern void nxge_hio_hv_init(nxge_t *);
/* nxge_mac.c */
extern int nxge_hio_hostinfo_get_rdc_table(p_nxge_t);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_NXGE_NXGE_HIO_H */