Mercurial > illumos > illumos-gate
changeset 2050:6648ed7f9bd5
6345179 pci nexus does not use full bus width on safari with iommu bypass
author | suha |
---|---|
date | Wed, 24 May 2006 11:43:15 -0700 |
parents | b26d273ea4de |
children | 50a87bae0c3a |
files | usr/src/uts/sun4u/io/pci/pci_iommu.c usr/src/uts/sun4u/io/pci/pcipsy.c usr/src/uts/sun4u/io/pci/pcisch.c usr/src/uts/sun4u/sys/pci/pci_chip.h usr/src/uts/sun4u/sys/pci/pci_iommu.h usr/src/uts/sun4u/sys/pci/pcipsy.h usr/src/uts/sun4u/sys/pci/pcisch.h |
diffstat | 7 files changed, 64 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/sun4u/io/pci/pci_iommu.c Wed May 24 11:05:22 2006 -0700 +++ b/usr/src/uts/sun4u/io/pci/pci_iommu.c Wed May 24 11:43:15 2006 -0700 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * 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 * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -103,7 +102,7 @@ iommu_p->iommu_dvma_reserve = tsb_entries >> 1; iommu_p->dvma_end_pg = IOMMU_BTOP(iommu_p->iommu_dvma_end); iommu_p->iommu_dma_bypass_base = COMMON_IOMMU_BYPASS_BASE; - iommu_p->iommu_dma_bypass_end = COMMON_IOMMU_BYPASS_END; + iommu_p->iommu_dma_bypass_end = pci_iommu_bypass_end_configure(); /* * export "virtual-dma" software property to support
--- a/usr/src/uts/sun4u/io/pci/pcipsy.c Wed May 24 11:05:22 2006 -0700 +++ b/usr/src/uts/sun4u/io/pci/pcipsy.c Wed May 24 11:43:15 2006 -0700 @@ -2016,3 +2016,16 @@ rem_ivintr(pci_mondo, NULL); } } + +/* + * pci_iommu_bypass_end_configure + * + * Support for 40-bit bus width to UPA in DVMA and iommu bypass transfers: + */ + +dma_bypass_addr_t +pci_iommu_bypass_end_configure(void) +{ + + return ((dma_bypass_addr_t)UPA_IOMMU_BYPASS_END); +}
--- a/usr/src/uts/sun4u/io/pci/pcisch.c Wed May 24 11:05:22 2006 -0700 +++ b/usr/src/uts/sun4u/io/pci/pcisch.c Wed May 24 11:43:15 2006 -0700 @@ -3592,3 +3592,17 @@ pci_vmem_do_free(iommu_p, dvma_addr, npages, (mp->dmai_flags & DMAI_FLAGS_VMEMCACHE)); } + +/* + * pci_iommu_bypass_end_configure + * + * Support for 42-bit bus width to SAFARI and JBUS in DVMA and + * iommu bypass transfers: + */ + +dma_bypass_addr_t +pci_iommu_bypass_end_configure(void) +{ + + return ((dma_bypass_addr_t)SAFARI_JBUS_IOMMU_BYPASS_END); +}
--- a/usr/src/uts/sun4u/sys/pci/pci_chip.h Wed May 24 11:05:22 2006 -0700 +++ b/usr/src/uts/sun4u/sys/pci/pci_chip.h Wed May 24 11:43:15 2006 -0700 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * 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 * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -117,6 +116,8 @@ extern void pci_vmem_free(iommu_t *iommu_p, ddi_dma_impl_t *mp, void *dvma_addr, size_t npages); +extern dma_bypass_addr_t pci_iommu_bypass_end_configure(void); + #ifdef __cplusplus } #endif
--- a/usr/src/uts/sun4u/sys/pci/pci_iommu.h Wed May 24 11:05:22 2006 -0700 +++ b/usr/src/uts/sun4u/sys/pci/pci_iommu.h Wed May 24 11:43:15 2006 -0700 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * 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 * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -80,7 +79,11 @@ * and iommu bypass transfers. */ #define COMMON_IOMMU_BYPASS_BASE 0xFFFC000000000000ull -#define COMMON_IOMMU_BYPASS_END 0xFFFC00FFFFFFFFFFull + +/* + * The IOMMU_BYPASS_END is ASIC dependent and so defined in the appropriate + * header file. + */ /* * For iommu bypass addresses, bit 43 specifies cacheability.
--- a/usr/src/uts/sun4u/sys/pci/pcipsy.h Wed May 24 11:05:22 2006 -0700 +++ b/usr/src/uts/sun4u/sys/pci/pcipsy.h Wed May 24 11:43:15 2006 -0700 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * 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 * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -174,6 +173,14 @@ extern uint_t cb_thermal_intr(caddr_t a); #define PCI_ID_TO_IGN(pci_id) ((pci_ign_t)UPAID_TO_IGN(pci_id)) + +/* + * The following macro defines the 40-bit bus width support for UPA bus + * in DVMA and iommu bypass transfers: + */ + +#define UPA_IOMMU_BYPASS_END 0xFFFC00FFFFFFFFFFull + #ifdef __cplusplus } #endif
--- a/usr/src/uts/sun4u/sys/pci/pcisch.h Wed May 24 11:05:22 2006 -0700 +++ b/usr/src/uts/sun4u/sys/pci/pcisch.h Wed May 24 11:43:15 2006 -0700 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * 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 * or http://www.opensolaris.org/os/licensing. @@ -547,6 +546,13 @@ */ #define PBM_CTRL_OFFSET 0x410000ull +/* + * The following macro defines the 42-bit bus width support for SAFARI bus + * and JBUS in DVMA and iommu bypass transfers: + */ + +#define SAFARI_JBUS_IOMMU_BYPASS_END 0xFFFC03FFFFFFFFFFull + #ifdef __cplusplus } #endif