Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148957634
D3438.id8155.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
959 B
Referenced Files
None
Subscribers
None
D3438.id8155.diff
View Options
Index: head/sys/arm64/arm64/pmap.c
===================================================================
--- head/sys/arm64/arm64/pmap.c
+++ head/sys/arm64/arm64/pmap.c
@@ -3050,10 +3050,32 @@
}
void
-pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz)
+pmap_sync_icache(pmap_t pmap, vm_offset_t va, vm_size_t sz)
{
- panic("ARM64TODO: pmap_sync_icache");
+ if (va >= VM_MIN_KERNEL_ADDRESS) {
+ cpu_icache_sync_range(va, sz);
+ } else {
+ u_int len, offset;
+ vm_paddr_t pa;
+
+ /* Find the length of data in this page to flush */
+ offset = va & PAGE_MASK;
+ len = imin(PAGE_SIZE - offset, sz);
+
+ while (sz != 0) {
+ /* Extract the physical address & find it in the DMAP */
+ pa = pmap_extract(pmap, va);
+ if (pa != 0)
+ cpu_icache_sync_range(PHYS_TO_DMAP(pa), len);
+
+ /* Move to the next page */
+ sz -= len;
+ va += len;
+ /* Set the length for the next iteration */
+ len = imin(PAGE_SIZE, sz);
+ }
+ }
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 22, 7:55 AM (9 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29990759
Default Alt Text
D3438.id8155.diff (959 B)
Attached To
Mode
D3438: Add support for pmap_sync_icache on arm64.
Attached
Detach File
Event Timeline
Log In to Comment