Rev 2720 | Rev 3022 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2720 | Rev 2745 | ||
---|---|---|---|
Line 570... | Line 570... | ||
570 | * @param page First page whose TLB entry is to be invalidated. |
570 | * @param page First page whose TLB entry is to be invalidated. |
571 | * @param cnt Number of entries to invalidate. |
571 | * @param cnt Number of entries to invalidate. |
572 | */ |
572 | */ |
573 | void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt) |
573 | void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt) |
574 | { |
574 | { |
575 | int i; |
575 | unsigned int i; |
576 | ipl_t ipl; |
576 | ipl_t ipl; |
577 | entry_lo_t lo0, lo1; |
577 | entry_lo_t lo0, lo1; |
578 | entry_hi_t hi, hi_save; |
578 | entry_hi_t hi, hi_save; |
579 | tlb_index_t index; |
579 | tlb_index_t index; |
580 | 580 | ||
581 | ASSERT(asid != ASID_INVALID); |
581 | ASSERT(asid != ASID_INVALID); |
582 | 582 | ||
583 | hi_save.value = cp0_entry_hi_read(); |
583 | hi_save.value = cp0_entry_hi_read(); |
584 | ipl = interrupts_disable(); |
584 | ipl = interrupts_disable(); |
585 | 585 | ||
586 | for (i = 0; i < cnt+1; i+=2) { |
586 | for (i = 0; i < cnt + 1; i += 2) { |
587 | hi.value = 0; |
587 | hi.value = 0; |
588 | prepare_entry_hi(&hi, asid, page + i * PAGE_SIZE); |
588 | prepare_entry_hi(&hi, asid, page + i * PAGE_SIZE); |
589 | cp0_entry_hi_write(hi.value); |
589 | cp0_entry_hi_write(hi.value); |
590 | 590 | ||
591 | tlbp(); |
591 | tlbp(); |