Rev 3440 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3440 | Rev 3450 | ||
---|---|---|---|
Line 403... | Line 403... | ||
403 | print_tlb_entry(i, t, d); |
403 | print_tlb_entry(i, t, d); |
404 | } |
404 | } |
405 | 405 | ||
406 | printf("DT512_1 contents:\n"); |
406 | printf("DT512_1 contents:\n"); |
407 | for (i = 0; i < 512; i++) { |
407 | for (i = 0; i < 512; i++) { |
408 | d.value = dtlb_data_access_read(TLB_DT512_1, i); |
408 | d.value = dtlb_data_access_read(TLB_DT512_0, i); |
409 | t.value = dtlb_tag_read_read(TLB_DT512_1, i); |
409 | t.value = dtlb_tag_read_read(TLB_DT512_0, i); |
410 | print_tlb_entry(i, t, d); |
410 | print_tlb_entry(i, t, d); |
411 | } |
411 | } |
412 | 412 | ||
413 | printf("DT512_2 contents:\n"); |
413 | printf("DT512_2 contents:\n"); |
414 | for (i = 0; i < 512; i++) { |
414 | for (i = 0; i < 512; i++) { |
415 | d.value = dtlb_data_access_read(TLB_DT512_2, i); |
415 | d.value = dtlb_data_access_read(TLB_DT512_1, i); |
416 | t.value = dtlb_tag_read_read(TLB_DT512_2, i); |
416 | t.value = dtlb_tag_read_read(TLB_DT512_1, i); |
417 | print_tlb_entry(i, t, d); |
417 | print_tlb_entry(i, t, d); |
418 | } |
418 | } |
419 | } |
419 | } |
420 | 420 | ||
421 | #endif |
421 | #endif |
Line 477... | Line 477... | ||
477 | 477 | ||
478 | #if defined (US3) |
478 | #if defined (US3) |
479 | /** Invalidates given TLB entry if and only if it is non-locked or global. |
479 | /** Invalidates given TLB entry if and only if it is non-locked or global. |
480 | * |
480 | * |
481 | * @param tlb |
481 | * @param tlb |
482 | * TLB number (one of TLB_DT16, TLB_DT512_1, TLB_DT512_2, |
482 | * TLB number (one of TLB_DT16, TLB_DT512_0, TLB_DT512_1, |
483 | * TLB_IT16, TLB_IT128) |
483 | * TLB_IT16, TLB_IT128) |
484 | * @param entry entry index within the given TLB |
484 | * @param entry entry index within the given TLB |
485 | */ |
485 | */ |
486 | static void tlb_invalidate_entry(int tlb, index_t entry) |
486 | static void tlb_invalidate_entry(int tlb, index_t entry) |
487 | { |
487 | { |
488 | tlb_data_t d; |
488 | tlb_data_t d; |
489 | tlb_tag_read_reg_t t; |
489 | tlb_tag_read_reg_t t; |
490 | 490 | ||
491 | if (tlb == TLB_DT16 || tlb == TLB_DT512_1 || tlb == TLB_DT512_2) { |
491 | if (tlb == TLB_DT16 || tlb == TLB_DT512_0 || tlb == TLB_DT512_1) { |
492 | d.value = dtlb_data_access_read(tlb, entry); |
492 | d.value = dtlb_data_access_read(tlb, entry); |
493 | if (!d.l || d.g) { |
493 | if (!d.l || d.g) { |
494 | t.value = dtlb_tag_read_read(tlb, entry); |
494 | t.value = dtlb_tag_read_read(tlb, entry); |
495 | d.v = false; |
495 | d.v = false; |
496 | dtlb_tag_access_write(t.value); |
496 | dtlb_tag_access_write(t.value); |
Line 553... | Line 553... | ||
553 | for (i = 0; i < 128; i++) |
553 | for (i = 0; i < 128; i++) |
554 | tlb_invalidate_entry(TLB_IT128, i); |
554 | tlb_invalidate_entry(TLB_IT128, i); |
555 | for (i = 0; i < 16; i++) |
555 | for (i = 0; i < 16; i++) |
556 | tlb_invalidate_entry(TLB_DT16, i); |
556 | tlb_invalidate_entry(TLB_DT16, i); |
557 | for (i = 0; i < 512; i++) |
557 | for (i = 0; i < 512; i++) |
558 | tlb_invalidate_entry(TLB_DT512_1, i); |
558 | tlb_invalidate_entry(TLB_DT512_0, i); |
559 | for (i = 0; i < 512; i++) |
559 | for (i = 0; i < 512; i++) |
560 | tlb_invalidate_entry(TLB_DT512_2, i); |
560 | tlb_invalidate_entry(TLB_DT512_1, i); |
561 | #endif |
561 | #endif |
562 | 562 | ||
563 | } |
563 | } |
564 | 564 | ||
565 | /** Invalidate all ITLB and DTLB entries that belong to specified ASID |
565 | /** Invalidate all ITLB and DTLB entries that belong to specified ASID |