XXX Only if DDB? */
| 266 | |
| 267 | /* XXX Only if DDB? */ |
| 268 | void |
| 269 | tlb_save(void) |
| 270 | { |
| 271 | unsigned ntlb, i, cpu; |
| 272 | |
| 273 | cpu = PCPU_GET(cpuid); |
| 274 | if (num_tlbentries > MIPS_MAX_TLB_ENTRIES) |
| 275 | ntlb = MIPS_MAX_TLB_ENTRIES; |
| 276 | else |
| 277 | ntlb = num_tlbentries; |
| 278 | tlb_state[cpu].wired = mips_rd_wired(); |
| 279 | for (i = 0; i < ntlb; i++) { |
| 280 | mips_wr_index(i); |
| 281 | tlb_read(); |
| 282 | |
| 283 | tlb_state[cpu].entry[i].entryhi = mips_rd_entryhi(); |
| 284 | tlb_state[cpu].entry[i].pagemask = mips_rd_pagemask(); |
| 285 | tlb_state[cpu].entry[i].entrylo0 = mips_rd_entrylo0(); |
| 286 | tlb_state[cpu].entry[i].entrylo1 = mips_rd_entrylo1(); |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | void |
| 291 | tlb_update(struct pmap *pmap, vm_offset_t va, pt_entry_t pte) |
no test coverage detected