Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
hw_mmu.c File Reference
#include <linux/io.h>
#include "MMURegAcM.h"
#include <hw_defs.h>
#include <hw_mmu.h>
#include <linux/types.h>
#include <linux/err.h>

Go to the source code of this file.

Macros

#define MMU_BASE_VAL_MASK   0xFC00
 
#define MMU_PAGE_MAX   3
 
#define MMU_ELEMENTSIZE_MAX   3
 
#define MMU_ADDR_MASK   0xFFFFF000
 
#define MMU_TTB_MASK   0xFFFFC000
 
#define MMU_SECTION_ADDR_MASK   0xFFF00000
 
#define MMU_SSECTION_ADDR_MASK   0xFF000000
 
#define MMU_PAGE_TABLE_MASK   0xFFFFFC00
 
#define MMU_LARGE_PAGE_MASK   0xFFFF0000
 
#define MMU_SMALL_PAGE_MASK   0xFFFFF000
 
#define MMU_LOAD_TLB   0x00000001
 
#define MMU_GFLUSH   0x60
 

Enumerations

enum  hw_mmu_page_size_t { HW_MMU_SECTION, HW_MMU_LARGE_PAGE, HW_MMU_SMALL_PAGE, HW_MMU_SUPERSECTION }
 

Functions

hw_status hw_mmu_enable (void __iomem *base_address)
 
hw_status hw_mmu_disable (void __iomem *base_address)
 
hw_status hw_mmu_num_locked_set (void __iomem *base_address, u32 num_locked_entries)
 
hw_status hw_mmu_victim_num_set (void __iomem *base_address, u32 victim_entry_num)
 
hw_status hw_mmu_event_ack (void __iomem *base_address, u32 irq_mask)
 
hw_status hw_mmu_event_disable (void __iomem *base_address, u32 irq_mask)
 
hw_status hw_mmu_event_enable (void __iomem *base_address, u32 irq_mask)
 
hw_status hw_mmu_event_status (void __iomem *base_address, u32 *irq_mask)
 
hw_status hw_mmu_fault_addr_read (void __iomem *base_address, u32 *addr)
 
hw_status hw_mmu_ttb_set (void __iomem *base_address, u32 ttb_phys_addr)
 
hw_status hw_mmu_twl_enable (void __iomem *base_address)
 
hw_status hw_mmu_twl_disable (void __iomem *base_address)
 
hw_status hw_mmu_tlb_add (void __iomem *base_address, u32 physical_addr, u32 virtual_addr, u32 page_sz, u32 entry_num, struct hw_mmu_map_attrs_t *map_attrs, s8 preserved_bit, s8 valid_bit)
 
hw_status hw_mmu_pte_set (const u32 pg_tbl_va, u32 physical_addr, u32 virtual_addr, u32 page_sz, struct hw_mmu_map_attrs_t *map_attrs)
 
hw_status hw_mmu_pte_clear (const u32 pg_tbl_va, u32 virtual_addr, u32 page_size)
 
void hw_mmu_tlb_flush_all (void __iomem *base)
 

Macro Definition Documentation

#define MMU_ADDR_MASK   0xFFFFF000

Definition at line 29 of file hw_mmu.c.

#define MMU_BASE_VAL_MASK   0xFC00

Definition at line 26 of file hw_mmu.c.

#define MMU_ELEMENTSIZE_MAX   3

Definition at line 28 of file hw_mmu.c.

#define MMU_GFLUSH   0x60

Definition at line 38 of file hw_mmu.c.

#define MMU_LARGE_PAGE_MASK   0xFFFF0000

Definition at line 34 of file hw_mmu.c.

#define MMU_LOAD_TLB   0x00000001

Definition at line 37 of file hw_mmu.c.

#define MMU_PAGE_MAX   3

Definition at line 27 of file hw_mmu.c.

#define MMU_PAGE_TABLE_MASK   0xFFFFFC00

Definition at line 33 of file hw_mmu.c.

#define MMU_SECTION_ADDR_MASK   0xFFF00000

Definition at line 31 of file hw_mmu.c.

#define MMU_SMALL_PAGE_MASK   0xFFFFF000

Definition at line 35 of file hw_mmu.c.

#define MMU_SSECTION_ADDR_MASK   0xFF000000

Definition at line 32 of file hw_mmu.c.

#define MMU_TTB_MASK   0xFFFFC000

Definition at line 30 of file hw_mmu.c.

Enumeration Type Documentation

Enumerator:
HW_MMU_SECTION 
HW_MMU_LARGE_PAGE 
HW_MMU_SMALL_PAGE 
HW_MMU_SUPERSECTION 

Definition at line 43 of file hw_mmu.c.

Function Documentation

hw_status hw_mmu_disable ( void __iomem base_address)

Definition at line 152 of file hw_mmu.c.

hw_status hw_mmu_enable ( void __iomem base_address)

Definition at line 143 of file hw_mmu.c.

hw_status hw_mmu_event_ack ( void __iomem base_address,
u32  irq_mask 
)

Definition at line 181 of file hw_mmu.c.

hw_status hw_mmu_event_disable ( void __iomem base_address,
u32  irq_mask 
)

Definition at line 190 of file hw_mmu.c.

hw_status hw_mmu_event_enable ( void __iomem base_address,
u32  irq_mask 
)

Definition at line 202 of file hw_mmu.c.

hw_status hw_mmu_event_status ( void __iomem base_address,
u32 irq_mask 
)

Definition at line 214 of file hw_mmu.c.

hw_status hw_mmu_fault_addr_read ( void __iomem base_address,
u32 addr 
)

Definition at line 223 of file hw_mmu.c.

hw_status hw_mmu_num_locked_set ( void __iomem base_address,
u32  num_locked_entries 
)

Definition at line 161 of file hw_mmu.c.

hw_status hw_mmu_pte_clear ( const u32  pg_tbl_va,
u32  virtual_addr,
u32  page_size 
)

Definition at line 399 of file hw_mmu.c.

hw_status hw_mmu_pte_set ( const u32  pg_tbl_va,
u32  physical_addr,
u32  virtual_addr,
u32  page_sz,
struct hw_mmu_map_attrs_t map_attrs 
)

Definition at line 325 of file hw_mmu.c.

hw_status hw_mmu_tlb_add ( void __iomem base_address,
u32  physical_addr,
u32  virtual_addr,
u32  page_sz,
u32  entry_num,
struct hw_mmu_map_attrs_t map_attrs,
s8  preserved_bit,
s8  valid_bit 
)

Definition at line 263 of file hw_mmu.c.

void hw_mmu_tlb_flush_all ( void __iomem base)

Definition at line 484 of file hw_mmu.c.

hw_status hw_mmu_ttb_set ( void __iomem base_address,
u32  ttb_phys_addr 
)

Definition at line 233 of file hw_mmu.c.

hw_status hw_mmu_twl_disable ( void __iomem base_address)

Definition at line 254 of file hw_mmu.c.

hw_status hw_mmu_twl_enable ( void __iomem base_address)

Definition at line 245 of file hw_mmu.c.

hw_status hw_mmu_victim_num_set ( void __iomem base_address,
u32  victim_entry_num 
)

Definition at line 171 of file hw_mmu.c.