| 6706 | } |
| 6707 | |
| 6708 | void |
| 6709 | pmap_sync_icache(pmap_t pmap, vm_offset_t va, vm_size_t sz) |
| 6710 | { |
| 6711 | |
| 6712 | PMAP_ASSERT_STAGE1(pmap); |
| 6713 | if (va >= VM_MIN_KERNEL_ADDRESS) { |
| 6714 | cpu_icache_sync_range(va, sz); |
| 6715 | } else { |
| 6716 | u_int len, offset; |
| 6717 | vm_paddr_t pa; |
| 6718 | |
| 6719 | /* Find the length of data in this page to flush */ |
| 6720 | offset = va & PAGE_MASK; |
| 6721 | len = imin(PAGE_SIZE - offset, sz); |
| 6722 | |
| 6723 | while (sz != 0) { |
| 6724 | /* Extract the physical address & find it in the DMAP */ |
| 6725 | pa = pmap_extract(pmap, va); |
| 6726 | if (pa != 0) |
| 6727 | cpu_icache_sync_range(PHYS_TO_DMAP(pa), len); |
| 6728 | |
| 6729 | /* Move to the next page */ |
| 6730 | sz -= len; |
| 6731 | va += len; |
| 6732 | /* Set the length for the next iteration */ |
| 6733 | len = imin(PAGE_SIZE, sz); |
| 6734 | } |
| 6735 | } |
| 6736 | } |
| 6737 | |
| 6738 | static int |
| 6739 | pmap_stage2_fault(pmap_t pmap, uint64_t esr, uint64_t far) |
nothing calls this directly
no test coverage detected