由于我们希望让uclinux支持smp,且希望使用VDSP中多核相关的函数,因此在head.s中添加了对_mc_data_initialise的调用,此调用放在fp和sp设置好之后,跳转到main之前,如下所示:
/*
* load the current thread pointer and stack
*/
r1.l = _init_thread_union;
r1.h = _init_thread_union;
r2.l = 0x2000;
r2.h = 0x0000;
r1 = r1 + r2;
sp = r1;
usp = sp;
fp = sp;
/////////////////////////////////////////////////////////////////
// blackfin-multi-core
// Initialise the multi-core data tables.
CALL.X __mc_data_initialise;
.extern __mc_data_initialise;
.type __mc_data_initialise,STT_FUNC;
jump.l _main;//start_kernel;
时间: 2024-09-23 04:28:52