Changeset 68656282 in mainline
- Timestamp:
- 2006-02-24T19:59:57Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 578aebf7
- Parents:
- b6fba84
- Location:
- arch/sparc64
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/sparc64/include/mm/tlb.h
rb6fba84 r68656282 112 112 unsigned asi : 8; /**< ASI. */ 113 113 unsigned tm : 1; /**< TLB miss. */ 114 unsigned : 3;115 unsigned ft : 5; /**< Fault type. */114 unsigned : 1; 115 unsigned ft : 7; /**< Fault type. */ 116 116 unsigned e : 1; /**< Side-effect bit. */ 117 117 unsigned ct : 2; /**< Context Register selection. */ … … 119 119 unsigned w : 1; /**< Write bit. */ 120 120 unsigned ow : 1; /**< Overwrite bit. */ 121 unsigned fv : 1; /**< Fa yult Valid bit. */121 unsigned fv : 1; /**< Fault Valid bit. */ 122 122 } __attribute__ ((packed)); 123 123 }; … … 262 262 } 263 263 264 /** Read IMMU TLB Tag Access Register. 265 * 266 * @return Current value of IMMU TLB Tag Access Register. 267 */ 268 static inline __u64 itlb_tag_access_read(void) 269 { 270 return asi_u64_read(ASI_IMMU, VA_IMMU_TAG_ACCESS); 271 } 272 264 273 /** Write DMMU TLB Tag Access Register. 265 274 * … … 271 280 flush(); 272 281 } 282 283 /** Read DMMU TLB Tag Access Register. 284 * 285 * @return Current value of DMMU TLB Tag Access Register. 286 */ 287 static inline __u64 dtlb_tag_access_read(void) 288 { 289 return asi_u64_read(ASI_DMMU, VA_DMMU_TAG_ACCESS); 290 } 291 273 292 274 293 /** Write IMMU TLB Data in Register. -
arch/sparc64/src/mm/tlb.c
rb6fba84 r68656282 32 32 #include <arch/mm/page.h> 33 33 #include <arch/mm/mmu.h> 34 #include <mm/asid.h> 34 35 #include <print.h> 35 36 #include <arch/types.h> … … 75 76 * We do identity mapping of 4M-page at 4M. 76 77 */ 77 tag.value = 0;78 tag.value = ASID_KERNEL; 78 79 tag.vpn = pg.vpn; 79 80 … … 113 114 pg.address = 0xc0000000; 114 115 115 tag.value = 0;116 tag.value = ASID_KERNEL; 116 117 tag.vpn = pg.vpn; 117 118 … … 142 143 void fast_data_access_mmu_miss(void) 143 144 { 144 tlb_sfsr_reg_t status; 145 __address address, tpc; 145 tlb_tag_access_reg_t tag; 146 tlb_data_t data; 147 __address tpc; 146 148 char *tpc_str; 147 149 148 status.value = dtlb_sfsr_read(); 149 address = dtlb_sfar_read(); 150 tpc = tpc_read(); 151 tpc_str = get_symtab_entry(tpc); 152 153 printf("ASI=%B, Context=%s\n", status.asi, context_encoding[status.ct]); 154 printf("Faulting address: %P\n", dtlb_sfar_read()); 155 printf("TPC=%P, (%s)\n", tpc, tpc_str ? tpc_str : "?"); 156 panic("%s\n", __FUNCTION__); 150 tag.value = dtlb_tag_access_read(); 151 if (tag.context != ASID_KERNEL || tag.vpn == 0) { 152 tpc = tpc_read(); 153 tpc_str = get_symtab_entry(tpc); 154 155 printf("Faulting page: %P, ASID=%d\n", tag.vpn * PAGE_SIZE, tag.context); 156 printf("TPC=%P, (%s)\n", tpc, tpc_str ? tpc_str : "?"); 157 panic("%s\n", __FUNCTION__); 158 } 159 160 /* 161 * Identity map piece of faulting kernel address space. 162 */ 163 data.value = 0; 164 data.v = true; 165 data.size = PAGESIZE_8K; 166 data.pfn = tag.vpn; 167 data.l = false; 168 data.cp = 1; 169 data.cv = 1; 170 data.p = true; 171 data.w = true; 172 data.g = true; 173 174 dtlb_data_in_write(data.value); 157 175 } 158 176
Note:
See TracChangeset
for help on using the changeset viewer.