Changeset 38a1a84 in mainline for arch/mips32/include
- Timestamp:
- 2005-10-05T21:29:16Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bca1b47
- Parents:
- 49c1f93
- Location:
- arch/mips32/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/include/mm/page.h
r49c1f93 r38a1a84 47 47 * - 32-bit virtual addresses 48 48 * - Offset is 14 bits => pages are 16K long 49 * - PTE's use the same format as CP0 EntryLo[01] registers => PTE is therefore 4 bytes long 49 * - PTE's use similar format as CP0 EntryLo[01] registers => PTE is therefore 4 bytes long 50 * - PTE's make use of CP0 EntryLo's two-bit reserved field for bit W (writable) and bit A (accessed) 50 51 * - PTL0 has 64 entries (6 bits) 51 52 * - PTL1 is not used … … 57 58 #define PTL1_INDEX_ARCH(vaddr) 0 58 59 #define PTL2_INDEX_ARCH(vaddr) 0 59 #define PTL3_INDEX_ARCH(vaddr) (((vaddr)>>1 2)&0xfff)60 #define PTL3_INDEX_ARCH(vaddr) (((vaddr)>>14)&0x3fff) 60 61 61 62 #define GET_PTL0_ADDRESS_ARCH() (PTL0) … … 98 99 (1<<PAGE_USER_SHIFT) | 99 100 (1<<PAGE_READ_SHIFT) | 100 ((p-> d)<<PAGE_WRITE_SHIFT) |101 ((p->w)<<PAGE_WRITE_SHIFT) | 101 102 (1<<PAGE_EXEC_SHIFT) 102 103 ); … … 110 111 p->c = (flags & PAGE_CACHEABLE) != 0 ? PAGE_CACHEABLE_EXC_WRITE : PAGE_UNCACHED; 111 112 p->v = !(flags & PAGE_NOT_PRESENT); 112 p-> d= (flags & PAGE_WRITE) != 0;113 p->w = (flags & PAGE_WRITE) != 0; 113 114 } 114 115 -
arch/mips32/include/mm/tlb.h
r49c1f93 r38a1a84 48 48 unsigned c : 3; /* cache coherency attribute */ 49 49 unsigned pfn : 24; /* frame number */ 50 unsigned : 2; 50 unsigned zero: 2; /* zero */ 51 } __attribute__ ((packed)); 52 53 struct pte { 54 unsigned g : 1; /* global bit */ 55 unsigned v : 1; /* valid bit */ 56 unsigned d : 1; /* dirty/write-protect bit */ 57 unsigned c : 3; /* cache coherency attribute */ 58 unsigned pfn : 24; /* frame number */ 59 unsigned w : 1; /* writable */ 60 unsigned a : 1; /* accessed */ 51 61 } __attribute__ ((packed)); 52 62 … … 63 73 } __attribute__ ((packed)); 64 74 65 struct tlb_entry { 66 struct entry_lo lo0; 67 struct entry_lo lo1; 68 struct entry_hi hi; 69 struct page_mask mask; 75 struct index { 76 unsigned index : 4; 77 unsigned : 27; 78 unsigned p : 1; 70 79 } __attribute__ ((packed)); 80 81 /** Probe TLB for Matching Entry 82 * 83 * Probe TLB for Matching Entry. 84 */ 85 static inline void tlbp(void) 86 { 87 __asm__ volatile ("tlbp\n\t"); 88 } 71 89 72 90 -
arch/mips32/include/types.h
r49c1f93 r38a1a84 50 50 typedef __u32 __native; 51 51 52 typedef struct entry_lopte_t;52 typedef struct pte pte_t; 53 53 54 54 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
