Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
dmar.c File Reference
#include <linux/pci.h>
#include <linux/dmar.h>
#include <linux/iova.h>
#include <linux/intel-iommu.h>
#include <linux/timer.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/tboot.h>
#include <linux/dmi.h>
#include <linux/slab.h>
#include <asm/irq_remapping.h>
#include <asm/iommu_table.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt /* has to precede printk.h */
 
#define MAX_FAULT_REASON_IDX   (ARRAY_SIZE(fault_reason_strings) - 1)
 
#define PRIMARY_FAULT_REG_LEN   (16)
 

Enumerations

enum  faulttype { DMA_REMAP, INTR_REMAP, UNKNOWN }
 

Functions

 LIST_HEAD (dmar_drhd_units)
 
int __init dmar_parse_dev_scope (void *start, void *end, int *cnt, struct pci_dev ***devices, u16 segment)
 
struct dmar_drhd_unit * dmar_find_matched_drhd_unit (struct pci_dev *dev)
 
int __init dmar_dev_scope_init (void)
 
int __init dmar_table_init (void)
 
int __init check_zero_address (void)
 
int __init detect_intel_iommu (void)
 
int alloc_iommu (struct dmar_drhd_unit *drhd)
 
void free_iommu (struct intel_iommu *iommu)
 
int qi_submit_sync (struct qi_desc *desc, struct intel_iommu *iommu)
 
void qi_global_iec (struct intel_iommu *iommu)
 
void qi_flush_context (struct intel_iommu *iommu, u16 did, u16 sid, u8 fm, u64 type)
 
void qi_flush_iotlb (struct intel_iommu *iommu, u16 did, u64 addr, unsigned int size_order, u64 type)
 
void qi_flush_dev_iotlb (struct intel_iommu *iommu, u16 sid, u16 qdep, u64 addr, unsigned mask)
 
void dmar_disable_qi (struct intel_iommu *iommu)
 
int dmar_enable_qi (struct intel_iommu *iommu)
 
const chardmar_get_fault_reason (u8 fault_reason, int *fault_type)
 
void dmar_msi_unmask (struct irq_data *data)
 
void dmar_msi_mask (struct irq_data *data)
 
void dmar_msi_write (int irq, struct msi_msg *msg)
 
void dmar_msi_read (int irq, struct msi_msg *msg)
 
irqreturn_t dmar_fault (int irq, void *dev_id)
 
int dmar_set_interrupt (struct intel_iommu *iommu)
 
int __init enable_drhd_fault_handling (void)
 
int dmar_reenable_qi (struct intel_iommu *iommu)
 
int __init dmar_ir_support (void)
 
 IOMMU_INIT_POST (detect_intel_iommu)
 

Variables

struct acpi_table_header
*__initdata 
dmar_tbl
 

Macro Definition Documentation

#define MAX_FAULT_REASON_IDX   (ARRAY_SIZE(fault_reason_strings) - 1)

Definition at line 1097 of file dmar.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt /* has to precede printk.h */

Definition at line 29 of file dmar.c.

#define PRIMARY_FAULT_REG_LEN   (16)

Definition at line 1189 of file dmar.c.

Enumeration Type Documentation

enum faulttype
Enumerator:
DMA_REMAP 
INTR_REMAP 
UNKNOWN 

Definition at line 1063 of file dmar.c.

Function Documentation

int alloc_iommu ( struct dmar_drhd_unit *  drhd)

Definition at line 643 of file dmar.c.

int __init check_zero_address ( void  )

Definition at line 484 of file dmar.c.

int __init detect_intel_iommu ( void  )

Definition at line 534 of file dmar.c.

int __init dmar_dev_scope_init ( void  )

Definition at line 416 of file dmar.c.

void dmar_disable_qi ( struct intel_iommu iommu)

Definition at line 948 of file dmar.c.

int dmar_enable_qi ( struct intel_iommu iommu)

Definition at line 1013 of file dmar.c.

irqreturn_t dmar_fault ( int  irq,
void dev_id 
)

Definition at line 1190 of file dmar.c.

struct dmar_drhd_unit* dmar_find_matched_drhd_unit ( struct pci_dev dev)
read

Definition at line 392 of file dmar.c.

const char* dmar_get_fault_reason ( u8  fault_reason,
int fault_type 
)

Definition at line 1099 of file dmar.c.

int __init dmar_ir_support ( void  )

Definition at line 1342 of file dmar.c.

void dmar_msi_mask ( struct irq_data data)

Definition at line 1127 of file dmar.c.

void dmar_msi_read ( int  irq,
struct msi_msg msg 
)

Definition at line 1152 of file dmar.c.

void dmar_msi_unmask ( struct irq_data data)

Definition at line 1114 of file dmar.c.

void dmar_msi_write ( int  irq,
struct msi_msg msg 
)

Definition at line 1140 of file dmar.c.

int __init dmar_parse_dev_scope ( void start,
void end,
int cnt,
struct pci_dev ***  devices,
u16  segment 
)

Definition at line 116 of file dmar.c.

int dmar_reenable_qi ( struct intel_iommu iommu)

Definition at line 1317 of file dmar.c.

int dmar_set_interrupt ( struct intel_iommu iommu)

Definition at line 1254 of file dmar.c.

int __init dmar_table_init ( void  )

Definition at line 447 of file dmar.c.

int __init enable_drhd_fault_handling ( void  )

Definition at line 1287 of file dmar.c.

void free_iommu ( struct intel_iommu iommu)

Definition at line 708 of file dmar.c.

IOMMU_INIT_POST ( detect_intel_iommu  )
LIST_HEAD ( dmar_drhd_units  )
void qi_flush_context ( struct intel_iommu iommu,
u16  did,
u16  sid,
u8  fm,
u64  type 
)

Definition at line 890 of file dmar.c.

void qi_flush_dev_iotlb ( struct intel_iommu iommu,
u16  sid,
u16  qdep,
u64  addr,
unsigned  mask 
)

Definition at line 924 of file dmar.c.

void qi_flush_iotlb ( struct intel_iommu iommu,
u16  did,
u64  addr,
unsigned int  size_order,
u64  type 
)

Definition at line 902 of file dmar.c.

void qi_global_iec ( struct intel_iommu iommu)

Definition at line 879 of file dmar.c.

int qi_submit_sync ( struct qi_desc desc,
struct intel_iommu iommu 
)

Definition at line 800 of file dmar.c.

Variable Documentation

Definition at line 50 of file dmar.c.