Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Macros | Typedefs | Functions | Variables
mmu.c File Reference
#include "leon3.h"
#include "testmod.h"
#include "mmu.h"
#include "cache.h"
Include dependency graph for mmu.c:

Macros

#define NODO_CLEAR
 
#define TLBNUM   8
 
#define fail(err)   do { } while(1);
 
#define report(test_case)
 
#define PGD_IDX(v)   (((v) >> pgd_sh) & pgd_m)
 
#define PMD_IDX(v)   (((v) >> pmd_sh) & pmd_m)
 
#define PTE_IDX(v)   (((v) >> pte_sh) & pte_m)
 
#define DEF_ADDR(a, b, c, d)   (((((a)&pgd_m)<<pgd_sh) | (((b)&pmd_m)<<pmd_sh) | (((c)&pte_m)<<pte_sh)) | (d))
 
#define REAL_PAGE_SIZE   (1<<(PAGE_SHIFT+pgsz))
 
#define a_30080000   DEF_ADDR(0x3,2,0,0)
 
#define a_30041000   DEF_ADDR(0x3,1,1,0)
 
#define a_30041004   DEF_ADDR(0x3,1,1,4)
 
#define a_30042000   DEF_ADDR(0x3,1,2,0)
 
#define a_30043000   DEF_ADDR(0x3,1,3,0)
 
#define a_31000000   DEF_ADDR(0x3,3,0,0)
 

Typedefs

typedef void(* functype )(void)
 

Functions

void leon_flush_cache_all (void)
 
void leon_flush_tlb_all (void)
 
unsigned int mmugetpagesize (unsigned int k)
 
void mmu_func1 (void)
 
int mmu_test (void)
 

Variables

unsigned long ctx
 
unsigned long pg0
 
unsigned long pm0
 
unsigned long pt0
 
unsigned long page0
 
unsigned long page1
 
unsigned long page2
 
unsigned long pth_addr
 
unsigned long pth_addr1
 
int pgsz = 0
 
unsigned int pgd_sh = 24
 
unsigned int pgd_m = 0xff
 
unsigned int pmd_sh = 18
 
unsigned int pmd_m = 0x3f
 
unsigned int pte_sh = 12
 
unsigned int pte_m = 0x3f
 

Macro Definition Documentation

#define a_30041000   DEF_ADDR(0x3,1,1,0)

Referenced by mmu_test().

#define a_30041004   DEF_ADDR(0x3,1,1,4)

Referenced by mmu_test().

#define a_30042000   DEF_ADDR(0x3,1,2,0)

Referenced by mmu_test().

#define a_30043000   DEF_ADDR(0x3,1,3,0)

Referenced by mmu_test().

#define a_30080000   DEF_ADDR(0x3,2,0,0)

Referenced by mmu_test().

#define a_31000000   DEF_ADDR(0x3,3,0,0)

Referenced by mmu_test().

#define DEF_ADDR (   a,
  b,
  c,
  d 
)    (((((a)&pgd_m)<<pgd_sh) | (((b)&pmd_m)<<pmd_sh) | (((c)&pte_m)<<pte_sh)) | (d))
#define fail (   err)    do { } while(1);
#define NODO_CLEAR
#define PGD_IDX (   v)    (((v) >> pgd_sh) & pgd_m)

Referenced by mmu_test().

#define PMD_IDX (   v)    (((v) >> pmd_sh) & pmd_m)
#define PTE_IDX (   v)    (((v) >> pte_sh) & pte_m)
#define REAL_PAGE_SIZE   (1<<(PAGE_SHIFT+pgsz))

Referenced by mmu_test().

#define report (   test_case)
#define TLBNUM   8

Referenced by mmu_test().

Typedef Documentation

typedef void(* functype)(void)

Function Documentation

void leon_flush_cache_all ( void  )

Referenced by leon_flush_tlb_all(), and mmu_test().

void leon_flush_tlb_all ( void  )

References leon_flush_cache_all().

Referenced by mmu_test().

Here is the call graph for this function:

void mmu_func1 ( void  )

Referenced by mmu_test().

int mmu_test ( void  )
unsigned int mmugetpagesize ( unsigned int  k)

Referenced by mmu_test().

Variable Documentation

unsigned long ctx

Referenced by mmu_test().

unsigned long page0

Referenced by init_grpci(), and mmu_test().

unsigned long page1
unsigned long page2

Referenced by mmu_test().

unsigned long pg0

Referenced by mmu_test().

unsigned int pgd_m = 0xff

Referenced by mmu_test().

unsigned int pgd_sh = 24
int pgsz = 0
unsigned long pm0

Referenced by mmu_test().

unsigned int pmd_m = 0x3f

Referenced by mmu_test().

unsigned int pmd_sh = 18
unsigned long pt0

Referenced by mmu_test().

unsigned int pte_m = 0x3f

Referenced by mmu_test().

unsigned int pte_sh = 12
unsigned long pth_addr

Referenced by mmu_test().

unsigned long pth_addr1

Referenced by mmu_test().