diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-02-02 21:45:56 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-02-02 21:45:56 +0000 |
commit | f348f8f20c0150e0b456598efa25f695a783f55a (patch) | |
tree | 9aeb893cc7efad2952c5b89beb26f94b5ce8543f | |
parent | 8bf5130ffde4f3c9ff3d4fc2d3f7998f4f527329 (diff) | |
download | rockbox-f348f8f20c0150e0b456598efa25f695a783f55a.tar.gz rockbox-f348f8f20c0150e0b456598efa25f695a783f55a.zip |
made system_memory_guard() exist for all CPUs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5741 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/export/system.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h index a3944296a0..b1b5b025a9 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -56,6 +56,18 @@ extern void system_init(void); | |||
56 | #define I_CONSTRAINT "I" | 56 | #define I_CONSTRAINT "I" |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | /* Utilize the user break controller to catch invalid memory accesses. */ | ||
60 | int system_memory_guard(int newmode); | ||
61 | |||
62 | enum { | ||
63 | MEMGUARD_KEEP = -1, /* don't change the mode; for reading */ | ||
64 | MEMGUARD_NONE = 0, /* catch nothing */ | ||
65 | MEMGUARD_FLASH_WRITES, /* catch writes to area 02 (flash ROM) */ | ||
66 | MEMGUARD_ZERO_AREA, /* catch all accesses to areas 00 and 01 */ | ||
67 | MAXMEMGUARD | ||
68 | }; | ||
69 | |||
70 | |||
59 | #if CONFIG_CPU == SH7034 | 71 | #if CONFIG_CPU == SH7034 |
60 | #define or_b(mask, address) \ | 72 | #define or_b(mask, address) \ |
61 | asm \ | 73 | asm \ |
@@ -132,17 +144,6 @@ static inline unsigned long SWAB32(unsigned long value) | |||
132 | return value; | 144 | return value; |
133 | } | 145 | } |
134 | 146 | ||
135 | /* Utilize the user break controller to catch invalid memory accesses. */ | ||
136 | int system_memory_guard(int newmode); | ||
137 | |||
138 | enum { | ||
139 | MEMGUARD_KEEP = -1, /* don't change the mode; for reading */ | ||
140 | MEMGUARD_NONE = 0, /* catch nothing */ | ||
141 | MEMGUARD_FLASH_WRITES, /* catch writes to area 02 (flash ROM) */ | ||
142 | MEMGUARD_ZERO_AREA, /* catch all accesses to areas 00 and 01 */ | ||
143 | MAXMEMGUARD | ||
144 | }; | ||
145 | |||
146 | #elif CONFIG_CPU == MCF5249 | 147 | #elif CONFIG_CPU == MCF5249 |
147 | #define HIGHEST_IRQ_LEVEL (7<<8) | 148 | #define HIGHEST_IRQ_LEVEL (7<<8) |
148 | static inline int set_irq_level(int level) | 149 | static inline int set_irq_level(int level) |