root/include/asm-mips/mm.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef __ASM_MIPS_MM_H
   2 #define __ASM_MIPS_MM_H
   3 
   4 #if defined (__KERNEL__)
   5 
   6 /*
   7  * Note that we shift the lower 32bits of each EntryLo[01] entry
   8  * 6 bits to the left. That way we can convert the PFN into the
   9  * physical address by a single 'and' operation and gain 6 additional
  10  * bits for storing information which isn't present in a normal
  11  * MIPS page table.
  12  * I've also changed the naming of some bits so that they conform
  13  * the i386 naming as much as possible.
  14  * PAGE_USER isn't implemented in software yet.
  15  */
  16 #define PAGE_PRESENT               (1<<0)   /* implemented in software */
  17 #define PAGE_COW                   (1<<1)   /* implemented in software */
  18 #define PAGE_DIRTY                 (1<<2)   /* implemented in software */
  19 #define PAGE_USER                  (1<<3)   /* implemented in software */
  20 #define PAGE_UNUSED1               (1<<4)   /* implemented in software */
  21 #define PAGE_UNUSED2               (1<<5)   /* implemented in software */
  22 #define PAGE_GLOBAL                (1<<6)
  23 #define PAGE_ACCESSED              (1<<7)   /* The Mips valid bit      */
  24 #define PAGE_RW                    (1<<8)   /* The Mips dirty bit      */
  25 #define CACHE_CACHABLE_NO_WA       (0<<9)
  26 #define CACHE_CACHABLE_WA          (1<<9)
  27 #define CACHE_UNCACHED             (2<<9)
  28 #define CACHE_CACHABLE_NONCOHERENT (3<<9)
  29 #define CACHE_CACHABLE_CE          (4<<9)
  30 #define CACHE_CACHABLE_COW         (5<<9)
  31 #define CACHE_CACHABLE_CUW         (6<<9)
  32 #define CACHE_MASK                 (7<<9)
  33 
  34 #define PAGE_PRIVATE    (PAGE_PRESENT | PAGE_ACCESSED | PAGE_DIRTY | PAGE_RW | \
  35                          PAGE_COW | CACHE_CACHABLE_NO_WA)
  36 #define PAGE_SHARED     (PAGE_PRESENT | PAGE_ACCESSED | PAGE_DIRTY | PAGE_RW | \
  37                          CACHE_CACHABLE_NO_WA)
  38 #define PAGE_COPY       (PAGE_PRESENT | PAGE_ACCESSED | PAGE_COW | \
  39                          CACHE_CACHABLE_NO_WA)
  40 #define PAGE_READONLY   (PAGE_PRESENT | PAGE_ACCESSED | CACHE_CACHABLE_NO_WA)
  41 #define PAGE_TABLE      (PAGE_PRESENT | PAGE_ACCESSED | PAGE_DIRTY | PAGE_RW | \
  42                          CACHE_CACHABLE_NO_WA)
  43 
  44 #ifndef __ASSEMBLY__
  45 
  46 #include <asm/system.h>
  47 
  48 extern unsigned long invalid_pg_table[1024];
  49 
  50 /*
  51  * memory.c & swap.c
  52  */
  53 extern void mem_init(unsigned long start_mem, unsigned long end_mem);
  54 #endif /* !defined (__ASSEMBLY__) */
  55 
  56 #endif /* defined (__KERNEL__) */
  57 
  58 #endif /* __ASM_MIPS_MM_H */

/* [previous][next][first][last][top][bottom][index][help] */