Anti-red?
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14899 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
da55251a35
commit
3e7d4f0d14
3 changed files with 17 additions and 14 deletions
|
@ -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 */
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue