mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-26 16:18:31 +00:00
Fix pmap_dcache_wb_pou in the new armv6 pmap to correctly achieve icache
consistency from ptrace. PR: 199739 Submitted by: Jurgen Weiss <weiss at uni-mainz.de> (original version) Submitted by: Svatopluk Kraus <onwahe at gmail.com>
This commit is contained in:
parent
d8c37c3a16
commit
2a1803d048
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=282151
@ -6094,13 +6094,13 @@ pmap_set_pcb_pagedir(pmap_t pmap, struct pcb *pcb)
|
||||
|
||||
|
||||
/*
|
||||
* Clean L1 data cache range on a single page, which is not mapped yet.
|
||||
* Clean L1 data cache range by physical address.
|
||||
* The range must be within a single page.
|
||||
*/
|
||||
static void
|
||||
pmap_dcache_wb_pou(vm_paddr_t pa, vm_size_t size, vm_memattr_t ma)
|
||||
{
|
||||
struct sysmaps *sysmaps;
|
||||
vm_offset_t va;
|
||||
|
||||
KASSERT(((pa & PAGE_MASK) + size) <= PAGE_SIZE,
|
||||
("%s: not on single page", __func__));
|
||||
@ -6111,9 +6111,8 @@ pmap_dcache_wb_pou(vm_paddr_t pa, vm_size_t size, vm_memattr_t ma)
|
||||
if (*sysmaps->CMAP3)
|
||||
panic("%s: CMAP3 busy", __func__);
|
||||
pte2_store(sysmaps->CMAP3, PTE2_KERN_NG(pa, PTE2_AP_KRW, ma));
|
||||
va = (vm_offset_t)sysmaps->CADDR3;
|
||||
tlb_flush_local(va);
|
||||
dcache_wb_pou(va, size);
|
||||
tlb_flush_local((vm_offset_t)sysmaps->CADDR3);
|
||||
dcache_wb_pou((vm_offset_t)sysmaps->CADDR3 + (pa & PAGE_MASK), size);
|
||||
pte2_clear(sysmaps->CMAP3);
|
||||
sched_unpin();
|
||||
mtx_unlock(&sysmaps->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user