Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pgtsrmmu.h File Reference
#include <asm/page.h>

Go to the source code of this file.

Macros

#define SRMMU_MAX_CONTEXTS   65536
 
#define SRMMU_REAL_PMD_SHIFT   18
 
#define SRMMU_REAL_PMD_SIZE   (1UL << SRMMU_REAL_PMD_SHIFT)
 
#define SRMMU_REAL_PMD_MASK   (~(SRMMU_REAL_PMD_SIZE-1))
 
#define SRMMU_REAL_PMD_ALIGN(__addr)   (((__addr)+SRMMU_REAL_PMD_SIZE-1)&SRMMU_REAL_PMD_MASK)
 
#define SRMMU_PGDIR_SHIFT   24
 
#define SRMMU_PGDIR_SIZE   (1UL << SRMMU_PGDIR_SHIFT)
 
#define SRMMU_PGDIR_MASK   (~(SRMMU_PGDIR_SIZE-1))
 
#define SRMMU_PGDIR_ALIGN(addr)   (((addr)+SRMMU_PGDIR_SIZE-1)&SRMMU_PGDIR_MASK)
 
#define SRMMU_REAL_PTRS_PER_PTE   64
 
#define SRMMU_REAL_PTRS_PER_PMD   64
 
#define SRMMU_PTRS_PER_PGD   256
 
#define SRMMU_REAL_PTE_TABLE_SIZE   (SRMMU_REAL_PTRS_PER_PTE*4)
 
#define SRMMU_PMD_TABLE_SIZE   (SRMMU_REAL_PTRS_PER_PMD*4)
 
#define SRMMU_PGD_TABLE_SIZE   (SRMMU_PTRS_PER_PGD*4)
 
#define SRMMU_PTRS_PER_PMD   4
 
#define SRMMU_ET_MASK   0x3
 
#define SRMMU_ET_INVALID   0x0
 
#define SRMMU_ET_PTD   0x1
 
#define SRMMU_ET_PTE   0x2
 
#define SRMMU_ET_REPTE   0x3 /* AIEEE, SuperSparc II reverse endian page! */
 
#define SRMMU_CTX_PMASK   0xfffffff0
 
#define SRMMU_PTD_PMASK   0xfffffff0
 
#define SRMMU_PTE_PMASK   0xffffff00
 
#define SRMMU_CACHE   0x80
 
#define SRMMU_DIRTY   0x40
 
#define SRMMU_REF   0x20
 
#define SRMMU_NOREAD   0x10
 
#define SRMMU_EXEC   0x08
 
#define SRMMU_WRITE   0x04
 
#define SRMMU_VALID   0x02 /* SRMMU_ET_PTE */
 
#define SRMMU_PRIV   0x1c
 
#define SRMMU_PRIV_RDONLY   0x18
 
#define SRMMU_FILE   0x40 /* Implemented in software */
 
#define SRMMU_PTE_FILE_SHIFT   8 /* == 32-PTE_FILE_MAX_BITS */
 
#define SRMMU_CHG_MASK   (0xffffff00 | SRMMU_REF | SRMMU_DIRTY)
 
#define SRMMU_SWP_TYPE_MASK   0x1f
 
#define SRMMU_SWP_TYPE_SHIFT   SRMMU_PTE_FILE_SHIFT
 
#define SRMMU_SWP_OFF_MASK   0x7ffff
 
#define SRMMU_SWP_OFF_SHIFT   (SRMMU_PTE_FILE_SHIFT + 5)
 
#define SRMMU_PAGE_NONE
 
#define SRMMU_PAGE_SHARED
 
#define SRMMU_PAGE_COPY
 
#define SRMMU_PAGE_RDONLY
 
#define SRMMU_PAGE_KERNEL
 
#define SRMMU_CTRL_REG   0x00000000
 
#define SRMMU_CTXTBL_PTR   0x00000100
 
#define SRMMU_CTX_REG   0x00000200
 
#define SRMMU_FAULT_STATUS   0x00000300
 
#define SRMMU_FAULT_ADDR   0x00000400
 
#define WINDOW_FLUSH(tmp1, tmp2)
 
#define __nocache_pa(VADDR)   (((unsigned long)VADDR) - SRMMU_NOCACHE_VADDR + __pa((unsigned long)srmmu_nocache_pool))
 
#define __nocache_va(PADDR)   (__va((unsigned long)PADDR) - (unsigned long)srmmu_nocache_pool + SRMMU_NOCACHE_VADDR)
 
#define __nocache_fix(VADDR)   __va(__nocache_pa(VADDR))
 

Functions

unsigned int srmmu_get_mmureg (void)
 
void srmmu_set_mmureg (unsigned long regval)
 
void srmmu_set_ctable_ptr (unsigned long paddr)
 
void srmmu_set_context (int context)
 
int srmmu_get_context (void)
 
unsigned int srmmu_get_fstatus (void)
 
unsigned int srmmu_get_faddr (void)
 

Variables

unsigned long last_valid_pfn
 
voidsrmmu_nocache_pool
 

Macro Definition Documentation

#define __nocache_fix (   VADDR)    __va(__nocache_pa(VADDR))

Definition at line 149 of file pgtsrmmu.h.

#define __nocache_pa (   VADDR)    (((unsigned long)VADDR) - SRMMU_NOCACHE_VADDR + __pa((unsigned long)srmmu_nocache_pool))

Definition at line 147 of file pgtsrmmu.h.

#define __nocache_va (   PADDR)    (__va((unsigned long)PADDR) - (unsigned long)srmmu_nocache_pool + SRMMU_NOCACHE_VADDR)

Definition at line 148 of file pgtsrmmu.h.

#define SRMMU_CACHE   0x80

Definition at line 73 of file pgtsrmmu.h.

#define SRMMU_CHG_MASK   (0xffffff00 | SRMMU_REF | SRMMU_DIRTY)

Definition at line 87 of file pgtsrmmu.h.

#define SRMMU_CTRL_REG   0x00000000

Definition at line 124 of file pgtsrmmu.h.

#define SRMMU_CTX_PMASK   0xfffffff0

Definition at line 61 of file pgtsrmmu.h.

#define SRMMU_CTX_REG   0x00000200

Definition at line 126 of file pgtsrmmu.h.

#define SRMMU_CTXTBL_PTR   0x00000100

Definition at line 125 of file pgtsrmmu.h.

#define SRMMU_DIRTY   0x40

Definition at line 74 of file pgtsrmmu.h.

#define SRMMU_ET_INVALID   0x0

Definition at line 55 of file pgtsrmmu.h.

#define SRMMU_ET_MASK   0x3

Definition at line 54 of file pgtsrmmu.h.

#define SRMMU_ET_PTD   0x1

Definition at line 56 of file pgtsrmmu.h.

#define SRMMU_ET_PTE   0x2

Definition at line 57 of file pgtsrmmu.h.

#define SRMMU_ET_REPTE   0x3 /* AIEEE, SuperSparc II reverse endian page! */

Definition at line 58 of file pgtsrmmu.h.

#define SRMMU_EXEC   0x08

Definition at line 77 of file pgtsrmmu.h.

#define SRMMU_FAULT_ADDR   0x00000400

Definition at line 128 of file pgtsrmmu.h.

#define SRMMU_FAULT_STATUS   0x00000300

Definition at line 127 of file pgtsrmmu.h.

#define SRMMU_FILE   0x40 /* Implemented in software */

Definition at line 83 of file pgtsrmmu.h.

#define SRMMU_MAX_CONTEXTS   65536

Definition at line 17 of file pgtsrmmu.h.

#define SRMMU_NOREAD   0x10

Definition at line 76 of file pgtsrmmu.h.

#define SRMMU_PAGE_COPY
Value:

Definition at line 114 of file pgtsrmmu.h.

#define SRMMU_PAGE_KERNEL
Value:

Definition at line 118 of file pgtsrmmu.h.

#define SRMMU_PAGE_NONE
Value:

Definition at line 110 of file pgtsrmmu.h.

#define SRMMU_PAGE_RDONLY
Value:

Definition at line 116 of file pgtsrmmu.h.

#define SRMMU_PAGE_SHARED
Value:

Definition at line 112 of file pgtsrmmu.h.

#define SRMMU_PGD_TABLE_SIZE   (SRMMU_PTRS_PER_PGD*4)

Definition at line 37 of file pgtsrmmu.h.

#define SRMMU_PGDIR_ALIGN (   addr)    (((addr)+SRMMU_PGDIR_SIZE-1)&SRMMU_PGDIR_MASK)

Definition at line 29 of file pgtsrmmu.h.

#define SRMMU_PGDIR_MASK   (~(SRMMU_PGDIR_SIZE-1))

Definition at line 28 of file pgtsrmmu.h.

#define SRMMU_PGDIR_SHIFT   24

Definition at line 26 of file pgtsrmmu.h.

#define SRMMU_PGDIR_SIZE   (1UL << SRMMU_PGDIR_SHIFT)

Definition at line 27 of file pgtsrmmu.h.

#define SRMMU_PMD_TABLE_SIZE   (SRMMU_REAL_PTRS_PER_PMD*4)

Definition at line 36 of file pgtsrmmu.h.

#define SRMMU_PRIV   0x1c

Definition at line 80 of file pgtsrmmu.h.

#define SRMMU_PRIV_RDONLY   0x18

Definition at line 81 of file pgtsrmmu.h.

#define SRMMU_PTD_PMASK   0xfffffff0

Definition at line 62 of file pgtsrmmu.h.

#define SRMMU_PTE_FILE_SHIFT   8 /* == 32-PTE_FILE_MAX_BITS */

Definition at line 85 of file pgtsrmmu.h.

#define SRMMU_PTE_PMASK   0xffffff00

Definition at line 63 of file pgtsrmmu.h.

#define SRMMU_PTRS_PER_PGD   256

Definition at line 33 of file pgtsrmmu.h.

#define SRMMU_PTRS_PER_PMD   4

Definition at line 51 of file pgtsrmmu.h.

#define SRMMU_REAL_PMD_ALIGN (   __addr)    (((__addr)+SRMMU_REAL_PMD_SIZE-1)&SRMMU_REAL_PMD_MASK)

Definition at line 23 of file pgtsrmmu.h.

#define SRMMU_REAL_PMD_MASK   (~(SRMMU_REAL_PMD_SIZE-1))

Definition at line 22 of file pgtsrmmu.h.

#define SRMMU_REAL_PMD_SHIFT   18

Definition at line 20 of file pgtsrmmu.h.

#define SRMMU_REAL_PMD_SIZE   (1UL << SRMMU_REAL_PMD_SHIFT)

Definition at line 21 of file pgtsrmmu.h.

#define SRMMU_REAL_PTE_TABLE_SIZE   (SRMMU_REAL_PTRS_PER_PTE*4)

Definition at line 35 of file pgtsrmmu.h.

#define SRMMU_REAL_PTRS_PER_PMD   64

Definition at line 32 of file pgtsrmmu.h.

#define SRMMU_REAL_PTRS_PER_PTE   64

Definition at line 31 of file pgtsrmmu.h.

#define SRMMU_REF   0x20

Definition at line 75 of file pgtsrmmu.h.

#define SRMMU_SWP_OFF_MASK   0x7ffff

Definition at line 102 of file pgtsrmmu.h.

#define SRMMU_SWP_OFF_SHIFT   (SRMMU_PTE_FILE_SHIFT + 5)

Definition at line 103 of file pgtsrmmu.h.

#define SRMMU_SWP_TYPE_MASK   0x1f

Definition at line 100 of file pgtsrmmu.h.

#define SRMMU_SWP_TYPE_SHIFT   SRMMU_PTE_FILE_SHIFT

Definition at line 101 of file pgtsrmmu.h.

#define SRMMU_VALID   0x02 /* SRMMU_ET_PTE */

Definition at line 79 of file pgtsrmmu.h.

#define SRMMU_WRITE   0x04

Definition at line 78 of file pgtsrmmu.h.

#define WINDOW_FLUSH (   tmp1,
  tmp2 
)
Value:
mov 0, tmp1; \
98: ld [%g6 + TI_UWINMASK], tmp2; \
orcc %g0, tmp2, %g0; \
add tmp1, 1, tmp1; \
bne 98b; \
save %sp, -64, %sp; \
99: subcc tmp1, 1, tmp1; \
bne 99b; \
restore %g0, %g0, %g0;

Definition at line 130 of file pgtsrmmu.h.

Function Documentation

int srmmu_get_context ( void  )
unsigned int srmmu_get_faddr ( void  )
unsigned int srmmu_get_fstatus ( void  )
unsigned int srmmu_get_mmureg ( void  )
void srmmu_set_context ( int  context)
void srmmu_set_ctable_ptr ( unsigned long  paddr)
void srmmu_set_mmureg ( unsigned long  regval)

Variable Documentation

unsigned long last_valid_pfn

Definition at line 67 of file init_32.c.

void* srmmu_nocache_pool

Definition at line 100 of file srmmu.c.