Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168119974
D17139.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
775 B
Referenced Files
None
Subscribers
None
D17139.id.diff
View Options
Index: head/sys/riscv/riscv/pmap.c
===================================================================
--- head/sys/riscv/riscv/pmap.c
+++ head/sys/riscv/riscv/pmap.c
@@ -3244,11 +3244,27 @@
critical_exit();
}
+static void
+pmap_sync_icache_one(void *arg __unused)
+{
+
+ __asm __volatile("fence.i");
+}
+
void
pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz)
{
- panic("RISCVTODO: pmap_sync_icache");
+ /*
+ * From the RISC-V User-Level ISA V2.2:
+ *
+ * "To make a store to instruction memory visible to all
+ * RISC-V harts, the writing hart has to execute a data FENCE
+ * before requesting that all remote RISC-V harts execute a
+ * FENCE.I."
+ */
+ __asm __volatile("fence");
+ smp_rendezvous(NULL, pmap_sync_icache_one, NULL, NULL);
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 27, 11:39 AM (18 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37380554
Default Alt Text
D17139.id.diff (775 B)
Attached To
Mode
D17139: Implement pmap_sync_icache().
Attached
Detach File
Event Timeline
Log In to Comment