| Recently, the multi-core technology has become the most popular computing technology, and leading the development trend of computer field. The idear of multi-core processor technology is packaging two or more separate processor cores into a single chip, and these processors parallel computing(Chip Multi-Processing,CMP). In this way, the processor could get higher performance with lower clock speed.ADSP-BlackFin561 DSP is an embedded processor produced by Analog Devices Company. It contains 2 processor cores. While the uCLinux is a very popular embedded operating system for normal single processors. What this paper studied is how to make modification to the uCLinux, so that it could run in BF561 platform. During the studies, this paper mainly resolves these problems: booting; synchronization and mutex; the memory management.In order to make the uCLinux could boot successfully in both cores of BF561, what we did is constructing a kernel-level thread after the core A's booting, and the core B will boot with this thread. At first, the thread will copy initializing code for Core B to memory location and will install the service functions for interrupt, and then kick off core B. Causing core A and core B have the same construction, the initial code for core B derives form core A's. The work of initialization usually consists of installing interrupt service,enabling cache and setting time.Synchronization and mutex is the very important part on multi-core platform. With the understanding of SMP system theory,the fine-grained spinlock is used as BF561's short term strategy, and semaphore is used as its long-term mutual exclusion policy.About the memory management part, to enable cache on core B, we modified the uCLinux by adding CPLB data struct, and implemented the strategies of loading and switching CPLB. The CPLB data struct is mainly used to store CPLB, loading CPLB and switching CPLB means how to write the CPLB into the table in MMR and how to switch in and out CPLB to MMR.After all the modifications, we did a performance test with the modified uCLinux in BF561, using the BBP algorithm as the test algorithm. And in order to adapt to multi-core environment, the BBP algorithm was parallelized. Through the analysis of the test result, we can draw a positive conclusion that the extended uCLinux did enhance the performance of BF561 effectively. |