aboutsummaryrefslogtreecommitdiff
path: root/devkit
diff options
context:
space:
mode:
authorDavid Li <li.davidm96@gmail.com>2016-01-13 14:10:12 -0700
committerDavid Li <li.davidm96@gmail.com>2016-01-13 14:10:12 -0700
commit367a945a6a921e4580bb7c1d8bd1db51de0dec2f (patch)
treeda130337d505f106ce48841c96b424f22d1fd28f /devkit
parentd21ddd428fd3a8717e69265175de401fe1487a3a (diff)
Test basic write traps (WIP)
Diffstat (limited to 'devkit')
-rw-r--r--devkit/masochist.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/devkit/masochist.c b/devkit/masochist.c
new file mode 100644
index 0000000..ddd6018
--- /dev/null
+++ b/devkit/masochist.c
@@ -0,0 +1,11 @@
+#include "cacheracer.h"
+
+void __start(int core_id, unsigned char payload) {
+ volatile int *ptr = (volatile int*) HOME_DATA;
+ while (1) {
+ ptr[0] = WRITE_TRAP;
+ ptr[1] = WRITE_TRAP;
+ ptr[0] = 0;
+ ptr[1] = 0;
+ }
+}