diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-09-28 10:20:02 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-09-28 10:20:02 +0000 |
commit | 7914e90738ff37e6378b37632eb1f05bab7354d5 (patch) | |
tree | 6b3d6a6bac4c7a3f82fa212d5f3ed324d81dc8bb /apps/main.c | |
parent | edbf5d81f5a635a0db68039554b086f942b3e005 (diff) | |
download | rockbox-7914e90738ff37e6378b37632eb1f05bab7354d5.tar.gz rockbox-7914e90738ff37e6378b37632eb1f05bab7354d5.zip |
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
Diffstat (limited to 'apps/main.c')
-rw-r--r-- | apps/main.c | 26 |
1 files changed, 9 insertions, 17 deletions
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) | |||
334 | /* if nobody initialized ATA before, I consider this a cold start */ | 334 | /* if nobody initialized ATA before, I consider this a cold start */ |
335 | bool coldstart = (PACR2 & 0x4000) != 0; /* starting from Flash */ | 335 | bool coldstart = (PACR2 & 0x4000) != 0; /* starting from Flash */ |
336 | #endif | 336 | #endif |
337 | #ifdef CPU_PP | 337 | |
338 | COP_CTL = PROC_WAKE; | ||
339 | #endif | ||
340 | system_init(); | 338 | system_init(); |
341 | kernel_init(); | 339 | kernel_init(); |
342 | 340 | ||
@@ -591,25 +589,19 @@ void cop_main(void) | |||
591 | so it should not be assumed that the coprocessor be usable even on | 589 | so it should not be assumed that the coprocessor be usable even on |
592 | platforms which support it. | 590 | platforms which support it. |
593 | 591 | ||
594 | A kernel thread runs on the coprocessor which waits for other threads to be | 592 | A kernel thread is initially setup on the coprocessor and immediately |
595 | added, and gracefully handles RoLo */ | 593 | destroyed for purposes of continuity. The cop sits idle until at least |
594 | one thread exists on it. */ | ||
596 | 595 | ||
597 | #if CONFIG_CPU == PP5002 | ||
598 | /* 3G doesn't have Rolo or dual core support yet */ | 596 | /* 3G doesn't have Rolo or dual core support yet */ |
599 | while(1) { | 597 | #if NUM_CORES > 1 |
600 | COP_CTL = PROC_SLEEP; | ||
601 | } | ||
602 | #else | ||
603 | extern volatile unsigned char cpu_message; | ||
604 | |||
605 | system_init(); | 598 | system_init(); |
606 | kernel_init(); | 599 | kernel_init(); |
607 | 600 | /* This should never be reached */ | |
608 | while(cpu_message != COP_REBOOT) { | 601 | #endif |
609 | sleep(HZ); | 602 | while(1) { |
603 | COP_CTL = PROC_SLEEP; | ||
610 | } | 604 | } |
611 | rolo_restart_cop(); | ||
612 | #endif /* PP5002 */ | ||
613 | } | 605 | } |
614 | #endif /* CPU_PP */ | 606 | #endif /* CPU_PP */ |
615 | 607 | ||