summaryrefslogtreecommitdiffstats
path: root/firmware/export/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/system.h')
-rw-r--r--firmware/export/system.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h
index f554ac7cf1..552540a1db 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -31,7 +31,13 @@ extern void system_reboot (void);
/* Called from any UIE handler and panicf - wait for a key and return
* to reboot system. */
extern void system_exception_wait(void);
+
+#if NUM_CORES == 1
+extern void system_init(void) INIT_ATTR;
+#else
+/* TODO: probably safe to use INIT_ATTR on multicore but this needs checking */
extern void system_init(void);
+#endif
extern long cpu_frequency;
@@ -258,9 +264,12 @@ static inline void cpu_boost_unlock(void)
#endif
/* Define this if target has support for generating backtraces */
-#ifdef CPU_ARM
+#if defined(CPU_ARM) || \
+ (defined(CPU_MIPS) && (CONFIG_PLATFORM & PLATFORM_NATIVE))
+#ifndef DISABLE_BACKTRACE
#define HAVE_RB_BACKTRACE
#endif
+#endif
#ifndef MIN_STACK_ALIGN
#define MIN_STACK_ALIGN (sizeof (uintptr_t))
@@ -307,8 +316,8 @@ static inline void cpu_boost_unlock(void)
/* Define MEM_ALIGN_ATTR which may be used to align e.g. buffers for faster
* access. */
-#if defined(CPU_ARM)
- /* Use ARMs cache alignment. */
+#if defined(HAVE_CPU_CACHE_ALIGN)
+ /* Align to a cache line. */
#define MEM_ALIGN_ATTR CACHEALIGN_ATTR
#define MEM_ALIGN_SIZE CACHEALIGN_SIZE
#elif defined(CPU_COLDFIRE)