Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dev/fbt/aarch64 Switch from db_write_byt...
details: https://anonhg.NetBSD.org/src/rev/1098d04cd885
branches: trunk
changeset: 1007251:1098d04cd885
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Feb 12 06:05:31 2020 +0000
description:
Switch from db_write_bytes to using direct-mapping.
This way there's no dependency on ddb.
diffstat:
external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r b8645ffb4379 -r 1098d04cd885 external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c
--- a/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c Wed Feb 12 06:05:23 2020 +0000
+++ b/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c Wed Feb 12 06:05:31 2020 +0000
@@ -37,7 +37,9 @@
#include <sys/module.h>
#include <sys/kmem.h>
-#include <ddb/ddb.h>
+#include <uvm/uvm_extern.h>
+
+#include <dev/mm.h>
#include <machine/cpufunc.h>
@@ -92,9 +94,14 @@
void
fbt_patch_tracepoint(fbt_probe_t *fbt, fbt_patchval_t val)
{
+ paddr_t pa;
+ vaddr_t va;
- db_write_bytes((db_addr_t)fbt->fbtp_patchpoint, sizeof(val),
- (const void *)&val);
+ if (!pmap_extract(pmap_kernel(), (vaddr_t)fbt->fbtp_patchpoint, &pa))
+ return;
+ if (!mm_md_direct_mapped_phys(pa, &va))
+ return;
+ *(fbt_patchval_t *)va = val;
cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, sizeof(val));
}
Home |
Main Index |
Thread Index |
Old Index