forked from len0rd/rockbox
made system_memory_guard() exist for all CPUs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5741 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8bf5130ffd
commit
f348f8f20c
1 changed files with 12 additions and 11 deletions
|
@ -56,6 +56,18 @@ extern void system_init(void);
|
||||||
#define I_CONSTRAINT "I"
|
#define I_CONSTRAINT "I"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#if CONFIG_CPU == SH7034
|
#if CONFIG_CPU == SH7034
|
||||||
#define or_b(mask, address) \
|
#define or_b(mask, address) \
|
||||||
asm \
|
asm \
|
||||||
|
@ -132,17 +144,6 @@ static inline unsigned long SWAB32(unsigned long value)
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 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
|
|
||||||
};
|
|
||||||
|
|
||||||
#elif CONFIG_CPU == MCF5249
|
#elif CONFIG_CPU == MCF5249
|
||||||
#define HIGHEST_IRQ_LEVEL (7<<8)
|
#define HIGHEST_IRQ_LEVEL (7<<8)
|
||||||
static inline int set_irq_level(int level)
|
static inline int set_irq_level(int level)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue