summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-09-29 06:56:21 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-09-29 06:56:21 +0000
commit3e7d4f0d147199d503ab24708ff787850bb6a990 (patch)
treef4d2db2cae1a94de3c58f8d0840b2766c3ff1d38 /firmware
parentda55251a35d8ad6c0b8b9e62904798212caba46f (diff)
Anti-red?
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14899 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/SOURCES2
-rw-r--r--firmware/export/config.h19
-rw-r--r--firmware/rolo.c10
3 files changed, 17 insertions, 14 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 58595a493a..45bedd9dbe 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -13,9 +13,7 @@ logf.c
profile.c
#endif /* RB_PROFILE */
kernel.c
-#ifndef BOOTLOADER
rolo.c
-#endif /* BOOTLOADER */
thread.c
timer.c
#endif /* SIMULATOR */
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 784856d2f2..9bf589a459 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -364,7 +364,11 @@
#endif
/* Dual core support - not yet working on the 1G/2G and 3G iPod */
-#if defined(CPU_PP) && CONFIG_CPU != PP5002 && !defined(BOOTLOADER)
+#if defined(CPU_PP)
+#define IDLE_STACK_SIZE 0x80
+#define IDLE_STACK_WORDS 0x20
+
+#if !defined(BOOTLOADER) && CONFIG_CPU != PP5002
#define NUM_CORES 2
#define CURRENT_CORE current_core()
/* Hopefully at some point we will learn how to mark areas of main memory as
@@ -373,18 +377,17 @@
#define NOCACHEDATA_ATTR IDATA_ATTR
#define IF_COP(...) __VA_ARGS__
+#endif /* !defined(BOOTLOADER) && CONFIG_CPU != PP5002 */
+#endif /* CPU_PP */
-#define IDLE_STACK_SIZE 0x80
-#define IDLE_STACK_WORDS 0x20
-
-#else
+#ifndef NUM_CORES
+/* Default to single core */
#define NUM_CORES 1
#define CURRENT_CORE CPU
#define NOCACHEBSS_ATTR
#define NOCACHEDATA_ATTR
#define IF_COP(...)
+#endif /* NUM_CORES */
-#endif /* Processor specific */
-
-#endif
+#endif /* __CONFIG_H__ */
diff --git a/firmware/rolo.c b/firmware/rolo.c
index 1e9fc45984..9f83f916f9 100644
--- a/firmware/rolo.c
+++ b/firmware/rolo.c
@@ -51,11 +51,10 @@
* TODO: Use the mailboxes built into the PP processor for this
*/
+#if NUM_CORES > 1
volatile unsigned char IDATA_ATTR cpu_message = 0;
volatile unsigned char IDATA_ATTR cpu_reply = 0;
-#if NUM_CORES > 1
extern int cop_idlestackbegin[];
-#endif
void rolo_restart_cop(void) ICODE_ATTR;
void rolo_restart_cop(void)
@@ -92,7 +91,8 @@ void rolo_restart_cop(void)
"mov pc, r0 \n"
);
}
-#endif
+#endif /* NUM_CORES > 1 */
+#endif /* CPU_PP */
static void rolo_error(const char *text)
{
@@ -154,11 +154,13 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
for (i=0;i<8;i++)
memmapregs[i]=0;
+#if NUM_CORES > 1
/* Tell the COP it's safe to continue rebooting */
cpu_message = 1;
/* Wait for the COP to tell us it is rebooting */
while(cpu_reply != 2);
+#endif
asm volatile(
"mov r0, #0x10000000 \n"
@@ -226,7 +228,7 @@ int rolo_load(const char* filename)
file_checksum = betoh32(file_checksum);
#endif
-#ifdef CPU_PP
+#if defined(CPU_PP) && NUM_CORES > 1
lcd_puts(0, 2, "Waiting for coprocessor...");
lcd_update();
rolo_restart_cop();