Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
iommu.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/notifier.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/slab.h>
#include <linux/memblock.h>
#include <asm/prom.h>
#include <asm/iommu.h>
#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include <asm/udbg.h>
#include <asm/firmware.h>
#include <asm/cell-regs.h>
#include "interrupt.h"

Go to the source code of this file.

Data Structures

struct  iommu_window
 
struct  cbe_iommu
 

Macros

#define CELL_IOMMU_REAL_UNMAP
 
#define CELL_IOMMU_STRICT_PROTECTION
 
#define NR_IOMMUS   2
 
#define IOC_Reg_Size   0x2000
 
#define IOC_IOPT_CacheInvd   0x908
 
#define IOC_IOPT_CacheInvd_NE_Mask   0xffe0000000000000ul
 
#define IOC_IOPT_CacheInvd_IOPTE_Mask   0x000003fffffffff8ul
 
#define IOC_IOPT_CacheInvd_Busy   0x0000000000000001ul
 
#define IOC_IOST_Origin   0x918
 
#define IOC_IOST_Origin_E   0x8000000000000000ul
 
#define IOC_IOST_Origin_HW   0x0000000000000800ul
 
#define IOC_IOST_Origin_HL   0x0000000000000400ul
 
#define IOC_IO_ExcpStat   0x920
 
#define IOC_IO_ExcpStat_V   0x8000000000000000ul
 
#define IOC_IO_ExcpStat_SPF_Mask   0x6000000000000000ul
 
#define IOC_IO_ExcpStat_SPF_S   0x6000000000000000ul
 
#define IOC_IO_ExcpStat_SPF_P   0x2000000000000000ul
 
#define IOC_IO_ExcpStat_ADDR_Mask   0x00000007fffff000ul
 
#define IOC_IO_ExcpStat_RW_Mask   0x0000000000000800ul
 
#define IOC_IO_ExcpStat_IOID_Mask   0x00000000000007fful
 
#define IOC_IO_ExcpMask   0x928
 
#define IOC_IO_ExcpMask_SFE   0x4000000000000000ul
 
#define IOC_IO_ExcpMask_PFE   0x2000000000000000ul
 
#define IOC_IOCmd_Offset   0x1000
 
#define IOC_IOCmd_Cfg   0xc00
 
#define IOC_IOCmd_Cfg_TE   0x0000800000000000ul
 
#define IOSTE_V   0x8000000000000000ul /* valid */
 
#define IOSTE_H   0x4000000000000000ul /* cache hint */
 
#define IOSTE_PT_Base_RPN_Mask   0x3ffffffffffff000ul /* base RPN of IOPT */
 
#define IOSTE_NPPT_Mask   0x0000000000000fe0ul /* no. pages in IOPT */
 
#define IOSTE_PS_Mask   0x0000000000000007ul /* page size */
 
#define IOSTE_PS_4K   0x0000000000000001ul /* - 4kB */
 
#define IOSTE_PS_64K   0x0000000000000003ul /* - 64kB */
 
#define IOSTE_PS_1M   0x0000000000000005ul /* - 1MB */
 
#define IOSTE_PS_16M   0x0000000000000007ul /* - 16MB */
 
#define IO_SEGMENT_SHIFT   28
 
#define IO_PAGENO_BITS(shift)   (IO_SEGMENT_SHIFT - (shift))
 
#define SPIDER_DMA_OFFSET   0x80000000ul
 
#define NAMESIZE   8
 

Functions

 __setup ("iommu_fixed=", setup_iommu_fixed)
 
 machine_arch_initcall (cell, cell_iommu_init)
 
 machine_arch_initcall (celleb_native, cell_iommu_init)
 

Variables

struct dma_map_ops dma_iommu_fixed_ops
 

Macro Definition Documentation

#define CELL_IOMMU_REAL_UNMAP

Definition at line 49 of file iommu.c.

#define CELL_IOMMU_STRICT_PROTECTION

Definition at line 56 of file iommu.c.

#define IO_PAGENO_BITS (   shift)    (IO_SEGMENT_SHIFT - (shift))

Definition at line 107 of file iommu.c.

#define IO_SEGMENT_SHIFT   28

Definition at line 106 of file iommu.c.

#define IOC_IO_ExcpMask   0x928

Definition at line 83 of file iommu.c.

#define IOC_IO_ExcpMask_PFE   0x2000000000000000ul

Definition at line 85 of file iommu.c.

#define IOC_IO_ExcpMask_SFE   0x4000000000000000ul

Definition at line 84 of file iommu.c.

#define IOC_IO_ExcpStat   0x920

Definition at line 74 of file iommu.c.

#define IOC_IO_ExcpStat_ADDR_Mask   0x00000007fffff000ul

Definition at line 79 of file iommu.c.

#define IOC_IO_ExcpStat_IOID_Mask   0x00000000000007fful

Definition at line 81 of file iommu.c.

#define IOC_IO_ExcpStat_RW_Mask   0x0000000000000800ul

Definition at line 80 of file iommu.c.

#define IOC_IO_ExcpStat_SPF_Mask   0x6000000000000000ul

Definition at line 76 of file iommu.c.

#define IOC_IO_ExcpStat_SPF_P   0x2000000000000000ul

Definition at line 78 of file iommu.c.

#define IOC_IO_ExcpStat_SPF_S   0x6000000000000000ul

Definition at line 77 of file iommu.c.

#define IOC_IO_ExcpStat_V   0x8000000000000000ul

Definition at line 75 of file iommu.c.

#define IOC_IOCmd_Cfg   0xc00

Definition at line 89 of file iommu.c.

#define IOC_IOCmd_Cfg_TE   0x0000800000000000ul

Definition at line 90 of file iommu.c.

#define IOC_IOCmd_Offset   0x1000

Definition at line 87 of file iommu.c.

#define IOC_IOPT_CacheInvd   0x908

Definition at line 64 of file iommu.c.

#define IOC_IOPT_CacheInvd_Busy   0x0000000000000001ul

Definition at line 67 of file iommu.c.

#define IOC_IOPT_CacheInvd_IOPTE_Mask   0x000003fffffffff8ul

Definition at line 66 of file iommu.c.

#define IOC_IOPT_CacheInvd_NE_Mask   0xffe0000000000000ul

Definition at line 65 of file iommu.c.

#define IOC_IOST_Origin   0x918

Definition at line 69 of file iommu.c.

#define IOC_IOST_Origin_E   0x8000000000000000ul

Definition at line 70 of file iommu.c.

#define IOC_IOST_Origin_HL   0x0000000000000400ul

Definition at line 72 of file iommu.c.

#define IOC_IOST_Origin_HW   0x0000000000000800ul

Definition at line 71 of file iommu.c.

#define IOC_Reg_Size   0x2000

Definition at line 62 of file iommu.c.

#define IOSTE_H   0x4000000000000000ul /* cache hint */

Definition at line 95 of file iommu.c.

#define IOSTE_NPPT_Mask   0x0000000000000fe0ul /* no. pages in IOPT */

Definition at line 97 of file iommu.c.

#define IOSTE_PS_16M   0x0000000000000007ul /* - 16MB */

Definition at line 102 of file iommu.c.

#define IOSTE_PS_1M   0x0000000000000005ul /* - 1MB */

Definition at line 101 of file iommu.c.

#define IOSTE_PS_4K   0x0000000000000001ul /* - 4kB */

Definition at line 99 of file iommu.c.

#define IOSTE_PS_64K   0x0000000000000003ul /* - 64kB */

Definition at line 100 of file iommu.c.

#define IOSTE_PS_Mask   0x0000000000000007ul /* page size */

Definition at line 98 of file iommu.c.

#define IOSTE_PT_Base_RPN_Mask   0x3ffffffffffff000ul /* base RPN of IOPT */

Definition at line 96 of file iommu.c.

#define IOSTE_V   0x8000000000000000ul /* valid */

Definition at line 94 of file iommu.c.

#define NAMESIZE   8

Definition at line 121 of file iommu.c.

#define NR_IOMMUS   2

Definition at line 59 of file iommu.c.

#define SPIDER_DMA_OFFSET   0x80000000ul

Definition at line 110 of file iommu.c.

Function Documentation

__setup ( )
machine_arch_initcall ( cell  ,
cell_iommu_init   
)
machine_arch_initcall ( celleb_native  ,
cell_iommu_init   
)

Variable Documentation

struct dma_map_ops dma_iommu_fixed_ops
Initial value:
= {
.alloc = dma_fixed_alloc_coherent,
.free = dma_fixed_free_coherent,
.map_sg = dma_fixed_map_sg,
.unmap_sg = dma_fixed_unmap_sg,
.dma_supported = dma_fixed_dma_supported,
.set_dma_mask = dma_set_mask_and_switch,
.map_page = dma_fixed_map_page,
.unmap_page = dma_fixed_unmap_page,
}

Definition at line 644 of file iommu.c.