From 367a945a6a921e4580bb7c1d8bd1db51de0dec2f Mon Sep 17 00:00:00 2001
From: David Li
Date: Wed, 13 Jan 2016 14:10:12 -0700
Subject: Test basic write traps (WIP)
---
devkit/masochist.c | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 devkit/masochist.c
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;
+ }
+}
--
cgit v1.2.3