/illumos-gate/usr/src/uts/sun4u/sys/pci/ |
H A D | pci_iommu.h | 208 #define IOMMU_PAGE_INDEX(iommu_p, dvma_pg) ((dvma_pg) - (iommu_p)->dvma_base_pg) argument 209 #define IOMMU_PAGE_FLUSH(iommu_p, dvma_pg) \ argument 210 *(iommu_p)->iommu_flush_page_reg = IOMMU_PTOB(dvma_pg) 213 #define IOMMU_PAGE_TTEPA(iommu_p, dvma_pg) \ argument 214 ((iommu_p)->iommu_tsb_paddr + (IOMMU_PAGE_INDEX(iommu_p, dvma_pg) << 3)) 238 dvma_addr_t dvma_pg, size_t npages, size_t pfn_index); 239 extern void iommu_unmap_pages(iommu_t *iommu_p, dvma_addr_t dvma_pg, 242 dvma_addr_t dvma_pg, size_t npages, size_t pfn_index);
|
/illumos-gate/usr/src/uts/sun4u/io/pci/ |
H A D | pci_iommu.c | 263 dvma_addr_t dvma_pg, size_t npages, size_t pfn_index) in iommu_map_pages() argument 266 dvma_addr_t pg_index = dvma_pg - iommu_p->dvma_base_pg; in iommu_map_pages() 278 (uint_t)iommu_p->dvma_base_pg, (uint_t)pg_index, dvma_pg, in iommu_map_pages() 328 dvma_addr_t dvma_pg = IOMMU_BTOP(mp->dmai_mapping); in iommu_map_window() local 337 mp->dmai_mapping = IOMMU_PTOB(dvma_pg) | win_pg0_off; in iommu_map_window() 341 iommu_map_pages(iommu_p, mp, dvma_pg, IOMMU_BTOPR(win_size), pfn_index); in iommu_map_window() 345 iommu_unmap_pages(iommu_t *iommu_p, dvma_addr_t dvma_pg, uint_t npages) in iommu_unmap_pages() argument 347 dvma_addr_t pg_index = IOMMU_PAGE_INDEX(iommu_p, dvma_pg); in iommu_unmap_pages() 349 for (; npages; npages--, dvma_pg++, pg_index++) { in iommu_unmap_pages() 350 DEBUG1(DBG_UNMAP_WIN|DBG_CONT, 0, " %x", dvma_pg); in iommu_unmap_pages() [all …]
|
H A D | pci_fdvma.c | 57 dvma_addr_t dvma_addr, dvma_pg; in pci_fdvma_load() local 85 dvma_pg = IOMMU_BTOP(dvma_addr); in pci_fdvma_load() 86 pg_index = dvma_pg - iommu_p->dvma_base_pg; in pci_fdvma_load() 113 IOMMU_PAGE_FLUSH(iommu_p, (dvma_pg + i)); in pci_fdvma_load() 135 dvma_addr_t dvma_pg = IOMMU_BTOP(mp->dmai_mapping + IOMMU_PTOB(index)); in pci_fdvma_unload() local 146 iommu_unmap_pages(pci_p->pci_iommu_p, dvma_pg, npg); in pci_fdvma_unload() 156 iommu_unmap_pages(pci_p->pci_iommu_p, dvma_pg, npg); in pci_fdvma_unload() 182 dvma_addr_t dvma_pg; in pci_fdvma_reserve() local 224 dvma_pg = IOMMU_BTOP((ulong_t)vmem_xalloc(iommu_p->iommu_dvma_map, in pci_fdvma_reserve() 228 if (dvma_pg == 0) { in pci_fdvma_reserve() [all …]
|
H A D | pci_reloc.c | 195 dvma_addr_t dvma_pg; in pci_dvma_remap() local 199 dvma_pg = IOMMU_BTOP(mp->dmai_mapping); in pci_dvma_remap() 201 dvma_pg += idx; in pci_dvma_remap() 206 dvma_pg, length, idx); in pci_dvma_remap() 209 iommu_remap_pages(iommu_p, mp, dvma_pg, npgs, idx); in pci_dvma_remap() 215 pci_fdvma_remap(ddi_dma_impl_t *mp, caddr_t kvaddr, dvma_addr_t dvma_pg, in pci_fdvma_remap() argument 223 dvma_addr_t pg_index = dvma_pg - iommu_p->dvma_base_pg; in pci_fdvma_remap() 240 " old tte 0x%llx\n", dvma_pg + i, pfn, in pci_fdvma_remap() 251 IOMMU_PAGE_FLUSH(iommu_p, (dvma_pg + i)); in pci_fdvma_remap() 288 dvma_addr_t dvma_pg; in pci_fdvma_postrelocator() local [all …]
|
H A D | pci_dma.c | 920 dvma_addr_t dvma_pg; in pci_dvma_map_fast() local 952 dvma_pg = iommu_p->dvma_base_pg + i; in pci_dvma_map_fast() 959 dvma_pg, tte_addr, HI32(*tte_addr), LO32(*tte_addr)); in pci_dvma_map_fast() 972 mp->dmai_mapping = mp->dmai_roffset | IOMMU_PTOB(dvma_pg); in pci_dvma_map_fast() 990 dvma_addr_t dvma_pg, dvma_pg_index; in pci_dvma_map() local 1023 dvma_pg = IOMMU_BTOP((ulong_t)dvma_addr); in pci_dvma_map() 1024 dvma_pg_index = dvma_pg - iommu_p->dvma_base_pg; in pci_dvma_map() 1026 dvma_pg, dvma_pg_index); in pci_dvma_map() 1027 if (dvma_pg == 0) in pci_dvma_map() 1038 mp->dmai_mapping = mp->dmai_roffset | IOMMU_PTOB(dvma_pg); in pci_dvma_map() [all …]
|
H A D | pcisch.c | 80 dvma_addr_t dvma_pg, int npages); 3579 tm_vmem_free(ddi_dma_impl_t *mp, iommu_t *iommu_p, dvma_addr_t dvma_pg, in tm_vmem_free() argument 3595 req_max_p->dur_base = dvma_pg; in tm_vmem_free()
|
/illumos-gate/usr/src/uts/sun4/io/px/ |
H A D | px_mmu.c | 177 px_mmu_map_pages(px_mmu_t *mmu_p, ddi_dma_impl_t *mp, px_dvma_addr_t dvma_pg, in px_mmu_map_pages() argument 181 px_dvma_addr_t pg_index = MMU_PAGE_INDEX(mmu_p, dvma_pg); in px_mmu_map_pages() 187 (uint_t)pg_index, dvma_pg, (uint_t)npages, (uint_t)pfn_index); in px_mmu_map_pages() 228 px_mmu_unmap_pages(px_mmu_t *mmu_p, ddi_dma_impl_t *mp, px_dvma_addr_t dvma_pg, in px_mmu_unmap_pages() argument 231 px_dvma_addr_t pg_index = MMU_PAGE_INDEX(mmu_p, dvma_pg); in px_mmu_unmap_pages() 235 (uint_t)mmu_p->dvma_base_pg, (uint_t)pg_index, dvma_pg, in px_mmu_unmap_pages() 273 px_dvma_addr_t dvma_pg = MMU_BTOP(mp->dmai_mapping); in px_mmu_map_window() local 283 mp->dmai_mapping = MMU_PTOB(dvma_pg) | win_pg0_off; in px_mmu_map_window() 287 ret = px_mmu_map_pages(mmu_p, mp, dvma_pg, MMU_BTOPR(win_size), in px_mmu_map_window() 305 px_dvma_addr_t dvma_pg = MMU_BTOP(mp->dmai_mapping); in px_mmu_unmap_window() local [all …]
|
H A D | px_fdvma.c | 57 px_dvma_addr_t dvma_addr, dvma_pg; in px_fdvma_load() local 79 dvma_pg = MMU_BTOP(dvma_addr); in px_fdvma_load() 80 pg_index = dvma_pg - mmu_p->dvma_base_pg; in px_fdvma_load() 106 px_dvma_addr_t dvma_pg = MMU_BTOP(mp->dmai_mapping + MMU_PTOB(index)); in px_fdvma_unload() local 112 px_mmu_unmap_pages(px_p->px_mmu_p, mp, dvma_pg, npages); in px_fdvma_unload() 135 px_dvma_addr_t dvma_pg; in px_fdvma_reserve() local 176 dvma_pg = MMU_BTOP((ulong_t)vmem_xalloc(mmu_p->mmu_dvma_map, in px_fdvma_reserve() 180 if (dvma_pg == 0) { in px_fdvma_reserve() 201 mp->dmai_mapping = MMU_PTOB(dvma_pg); in px_fdvma_reserve()
|
H A D | px_mmu.h | 103 #define MMU_PAGE_INDEX(mmu_p, dvma_pg) ((dvma_pg) - (mmu_p)->dvma_base_pg) argument 119 px_dvma_addr_t dvma_pg, size_t npages, size_t pfn_index); 123 px_dvma_addr_t dvma_pg, uint_t npages);
|
H A D | px_dma.c | 710 px_dvma_addr_t dvma_pg; in px_dvma_map_fast() local 735 dvma_pg = mmu_p->dvma_base_pg + i; in px_dvma_map_fast() 766 mp->dmai_mapping = mp->dmai_roffset | MMU_PTOB(dvma_pg); in px_dvma_map_fast() 784 px_dvma_addr_t dvma_pg, dvma_pg_index; in px_dvma_map() local 818 dvma_pg = MMU_BTOP((ulong_t)dvma_addr); in px_dvma_map() 819 dvma_pg_index = dvma_pg - mmu_p->dvma_base_pg; in px_dvma_map() 821 dvma_pg, dvma_pg_index); in px_dvma_map() 822 if (dvma_pg == 0) in px_dvma_map() 825 mp->dmai_mapping = mp->dmai_roffset | MMU_PTOB(dvma_pg); in px_dvma_map() 830 mp, dvma_pg, npages, 0)) != DDI_SUCCESS) { in px_dvma_map() [all …]
|