/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_PCI_IOMMU_H
#define _SYS_PCI_IOMMU_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* The following typedef's represents the types for DMA transactions
*/
/*
* The following macros define the iommu page size and related operations.
*/
/*
* control register decoding
*/
/* tsb size: 0=1k 1=2k 2=4k 3=8k 4=16k 5=32k 6=64k 7=128k */
/*
* boiler plate for tte (everything except the pfn)
*/
/*
* The following macros define the address ranges supported for DVMA
* and iommu bypass transfers.
*/
/*
* The IOMMU_BYPASS_END is ASIC dependent and so defined in the appropriate
* header file.
*/
/*
* For iommu bypass addresses, bit 43 specifies cacheability.
*/
/*
* Generic iommu definitions and types:
*/
/*
* The following macros are for loading and unloading iotte
* entries.
*/
/*
* Tomatillo's micro TLB bug. errata #82
*/
typedef struct dvma_unbind_req {
/*
* iommu block soft state structure:
*
* Each pci node may share an iommu block structure with its peer
* node of have its own private iommu block structure.
*/
struct iommu {
/*
* virtual and physical addresses and size of the iommu tsb:
*/
/*
* address ranges of dvma space:
*/
/*
* address ranges of dma bypass space:
*/
/*
* virtual memory map and callback id for dvma space:
*/
/*
* fields for fast dvma interfaces:
*/
/*
* dvma fast track page cache byte map
*/
/*
* dvma context bitmap
*/
/*
* dvma debug
*/
/*
* tomatillo's micro TLB bug. errata #82
*/
};
typedef struct pci_dvma_range_prop {
/* dvma debug */
ddi_dma_impl_t *mp);
ddi_dma_impl_t *mp);
/* dvma routines */
/* iommu initialization routines */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PCI_IOMMU_H */