summaryrefslogtreecommitdiff
path: root/kern_funcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'kern_funcs.c')
-rw-r--r--kern_funcs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kern_funcs.c b/kern_funcs.c
index cd43438..2d7d182 100644
--- a/kern_funcs.c
+++ b/kern_funcs.c
@@ -20,10 +20,14 @@
#include <kmem.h>
#include "CSCommon.h"
-extern mach_port_t tfp0;
+static mach_port_t tfp0=MACH_PORT_NULL;
size_t kread(uint64_t where, void *p, size_t size);
size_t kwrite(uint64_t where, const void *p, size_t size);
+void set_tfp0(mach_port_t port) {
+ tfp0 = port;
+}
+
void wk32(uint64_t kaddr, uint32_t val) {
kwrite(kaddr, &val, sizeof(uint32_t));
}