From 7914e90738ff37e6378b37632eb1f05bab7354d5 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 28 Sep 2007 10:20:02 +0000 Subject: Commit a subset of the dual core changes that have to do with cache handling, stacks, firmware startup and thread startup. Tested on e200, H10-20GB, iPod Color and 5.5G. Thread function return implemented for all targets. Some changes to plugins to follow shortly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14879 a1c6a512-1295-4272-9138-f99709370657 --- apps/main.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'apps/main.c') diff --git a/apps/main.c b/apps/main.c index a27998168c..bc8a12dd4e 100644 --- a/apps/main.c +++ b/apps/main.c @@ -334,9 +334,7 @@ static void init(void) /* if nobody initialized ATA before, I consider this a cold start */ bool coldstart = (PACR2 & 0x4000) != 0; /* starting from Flash */ #endif -#ifdef CPU_PP - COP_CTL = PROC_WAKE; -#endif + system_init(); kernel_init(); @@ -591,25 +589,19 @@ void cop_main(void) so it should not be assumed that the coprocessor be usable even on platforms which support it. - A kernel thread runs on the coprocessor which waits for other threads to be - added, and gracefully handles RoLo */ + A kernel thread is initially setup on the coprocessor and immediately + destroyed for purposes of continuity. The cop sits idle until at least + one thread exists on it. */ -#if CONFIG_CPU == PP5002 /* 3G doesn't have Rolo or dual core support yet */ - while(1) { - COP_CTL = PROC_SLEEP; - } -#else - extern volatile unsigned char cpu_message; - +#if NUM_CORES > 1 system_init(); kernel_init(); - - while(cpu_message != COP_REBOOT) { - sleep(HZ); + /* This should never be reached */ +#endif + while(1) { + COP_CTL = PROC_SLEEP; } - rolo_restart_cop(); -#endif /* PP5002 */ } #endif /* CPU_PP */ -- cgit v1.2.3