root/include/asm-mips/mipsregs.h

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

INCLUDED FROM


   1 /*
   2  * include/asm-mips/mipsregs.h
   3  *
   4  * This file is subject to the terms and conditions of the GNU General Public
   5  * License.  See the file "COPYING" in the main directory of this archive
   6  * for more details.
   7  *
   8  * Copyright (C) 1994 by Ralf Baechle
   9  */
  10 
  11 #ifndef _ASM_MIPS_MIPSREGS_H_
  12 #define _ASM_MIPS_MIPSREGS_H_
  13 
  14 /*
  15  * The following macros are especially useful for __asm__
  16  * inline assembler.
  17  */
  18 
  19 #ifndef __STR
  20 #define __STR(x) #x
  21 #endif
  22 #ifndef STR
  23 #define STR(x) __STR(x)
  24 #endif
  25 
  26 /*
  27  * Coprocessor 0 register names
  28  */
  29 #define CP0_INDEX $0
  30 #define CP0_RANDOM $1
  31 #define CP0_ENTRYLO0 $2
  32 #define CP0_ENTRYLO1 $3
  33 #define CP0_CONTEXT $4
  34 #define CP0_PAGEMASK $5
  35 #define CP0_WIRED $6
  36 #define CP0_BADVADDR $8
  37 #define CP0_COUNT $9
  38 #define CP0_ENTRYHI $10
  39 #define CP0_COMPARE $11
  40 #define CP0_STATUS $12
  41 #define CP0_CAUSE $13
  42 #define CP0_EPC $14
  43 #define CP0_PRID $15
  44 #define CP0_CONFIG $16
  45 #define CP0_LLADDR $17
  46 #define CP0_WATCHLO $18
  47 #define CP0_WATCHHI $19
  48 #define CP0_XCONTEXT $20
  49 #define CP0_ECC $26
  50 #define CP0_CACHEERR $27
  51 #define CP0_TAGLO $28
  52 #define CP0_TAGHI $29
  53 #define CP0_ERROREPC $30
  54 
  55 /*
  56  * Values for pagemask register
  57  */
  58 #define PM_4K   0x000000000
  59 #define PM_16K  0x000060000
  60 #define PM_64K  0x0001e0000
  61 #define PM_256K 0x0007e0000
  62 #define PM_1M   0x001fe0000
  63 #define PM_4M   0x007fe0000
  64 #define PM_16M  0x01ffe0000
  65 
  66 /*
  67  * Values used for computation of new tlb entries
  68  */
  69 #define PL_4K   12
  70 #define PL_16K  14
  71 #define PL_64K  16
  72 #define PL_256K 18
  73 #define PL_1M   20
  74 #define PL_4M   22
  75 #define PL_16M  24
  76 
  77 /*
  78  * Compute a vpn/pfn entry for EntryHi register
  79  */
  80 #define VPN(addr,pagesizeshift) ((addr) & ~((1 << (pagesizeshift))-1))
  81 #define PFN(addr,pagesizeshift) (((addr) & ((1 << (pagesizeshift))-1)) << 6)
  82 
  83 #endif /* _ASM_MIPS_MIPSREGS_H_ */

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