summaryrefslogtreecommitdiff
path: root/firmware/export/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/system.h')
-rw-r--r--firmware/export/system.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h
index 0d601e3d47..0c4a8f1a86 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -164,6 +164,17 @@ static inline int cas2 (volatile int *pointer1,volatile int *pointer2,int reques
set_irq_level(oldlevel);
return 0;
}
+
+/* Utilize the user break controller to catch invalid memory accesses. */
+int system_memory_guard(int newmode);
+
+enum {
+ MEMGUARD_KEEP = -1, /* don't change the mode; for reading */
+ MEMGUARD_NONE = 0, /* catch nothing */
+ MEMGUARD_FLASH_WRITES, /* catch writes to area 02 (flash ROM) */
+ MEMGUARD_ZERO_AREA, /* catch all accesses to areas 00 and 01 */
+ MAXMEMGUARD
+};
#endif