px_lib4v.h revision 3d78e6ab42c6ffc02ee9dbd101ff2551b77cb45f
/*
* 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
*/
/*
*/
#ifndef _SYS_PX_LIB4V_H
#define _SYS_PX_LIB4V_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Fasttrap numbers for VPCI hypervisor functions.
*/
#define HVIO_IOMMU_MAP 0xb0
#define HVIO_IOMMU_DEMAP 0xb1
#define HVIO_IOMMU_GETMAP 0xb2
#define HVIO_IOMMU_GETBYPASS 0xb3
#define HVIO_CONFIG_GET 0xb4
#define HVIO_CONFIG_PUT 0xb5
#define HVIO_PEEK 0xb6
#define HVIO_POKE 0xb7
#define HVIO_DMA_SYNC 0xb8
#define HVIO_MSIQ_CONF 0xc0
#define HVIO_MSIQ_INFO 0xc1
#define HVIO_MSIQ_GETVALID 0xc2
#define HVIO_MSIQ_SETVALID 0xc3
#define HVIO_MSIQ_GETSTATE 0xc4
#define HVIO_MSIQ_SETSTATE 0xc5
#define HVIO_MSIQ_GETHEAD 0xc6
#define HVIO_MSIQ_SETHEAD 0xc7
#define HVIO_MSIQ_GETTAIL 0xc8
#define HVIO_MSI_GETVALID 0xc9
#define HVIO_MSI_SETVALID 0xca
#define HVIO_MSI_GETMSIQ 0xcb
#define HVIO_MSI_SETMSIQ 0xcc
#define HVIO_MSI_GETSTATE 0xcd
#define HVIO_MSI_SETSTATE 0xce
#define HVIO_MSG_GETMSIQ 0xd0
#define HVIO_MSG_SETMSIQ 0xd1
#define HVIO_MSG_GETVALID 0xd2
#define HVIO_MSG_SETVALID 0xd3
/*
* Fasttrap numbers for SDIO hypervisor functions.
*/
#define PCI_IOV_ROOT_CONFIGURED 0xf8
/*
* Fasttrap numbers for SDIO ERR hypervisor functions.
*/
#define PCI_ERROR_SEND 0xff
#ifndef _ASM
/*
* The device handle uniquely identifies a SUN4V device.
* It consists of the lower 28-bits of the hi-cell of the
* first entry of the SUN4V device's "reg" property as
* defined by the SUN4V Bus Binding to Open Firmware.
*/
#define DEVHDLE_MASK 0xFFFFFFF
((flags & MMU_MAP_PFN) ? \
/*
* Hypercall service versioning
*/
#define PX_HSVC_MAJOR_VER_1 0x1ull
#define PX_HSVC_MAJOR_VER_2 0x2ull
#define PX_HSVC_MINOR_VER_0 0x0ull
#define PX_HSVC_MINOR_VER_1 0x1ull
#define PX_HSVC_MINOR_VER_2 0x2ull
/*
* VPCI API versioning.
* Currently PX nexus driver supports VPCI API version 2.0
* 1.0 - Negotiated/supported.
* 1.1/1.2 - Deprecated.
* 2.0 - Negotiated/supported.
*/
#define PX_VPCI_MAJOR_VER PX_HSVC_MAJOR_VER_2
#define PX_VPCI_MINOR_VER PX_HSVC_MINOR_VER_0
/*
* SDIO API versioning.
* Currently PX nexus driver supports SDIO API version 1.0
*/
#define PX_SDIO_MAJOR_VER PX_HSVC_MAJOR_VER_1
#define PX_SDIO_MINOR_VER PX_HSVC_MINOR_VER_0
/*
* SDIO ERR API versioning.
* Currently PX nexus driver supports SDIO ERR API version 1.0
*/
/*
* MSIQ Functions:
*/
/*
* MSI Functions:
*/
/*
* MSG Functions:
*/
typedef struct px_config_acc_pvt {
/*
*/
/*
* Priviledged physical access:
*/
/*
* PCI IOV SDIO Funcitons:
*/
#endif /* _ASM */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PX_LIB4V_H */