uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(43):exception_stacks
来源:互联网 发布:淘宝网墙贴纸 编辑:程序博客网 时间:2024/06/04 17:57
快乐虾
http://blog.csdn.net/lights_joy/
lights@hb165.com
本文适用于
ADI bf561 DSP
优视BF561EVB开发板
uclinux-2008r1.5-rc3(smp patch)
Visual DSP++ 5.0(update 5)
欢迎转载,但请保留作者信息
在每个核初始化的时候,都将调用一个叫init_pda的函数,用以初始化每个核的私有数据区:
asmlinkage void init_pda(void)
{
unsigned int cpu = raw_smp_processor_id();
/* Initialize the PDA fields holding references to other parts
of the memory. The content of such memory is still
undefined at the time of the call, we are only setting up
valid pointers to it. */
memset(cpu_pda, 0, sizeof(*cpu_pda));
#ifdef CONFIG_MPU
#else
write_pda(ipdt, ipdt_tables[cpu]);
#ifdef CONFIG_CPLB_INFO
write_pda(ipdt_swapcount, ipdt_swapcount_tables[cpu]);
write_pda(dpdt_swapcount, dpdt_swapcount_tables[cpu]);
#endif
write_pda(dpdt, dpdt_tables[cpu]);
#endif
write_pda(ex_stack, exception_stacks[cpu + 1]);
#ifdef CONFIG_SMP
write_pda(imask, 0x1f);
#endif
}
在这里,exception_stacks是一个比较特殊的数组,说它特殊,是因为它的定义放在了linux-2.6.x/arch/blackfin/mach-common/entry.S中,且对移植造成了一定的困扰:
ENTRY(_exception_stacks)
.rept 1024*NR_CPUS
.long 0;
.endr
_exception_stack_top:
Vdsp的汇编器是不支持.rept的,因此将这段代码改为:
.global _exception_stacks;
.byte4 _exception_stacks[1024*NR_CPUS] = {0};
_exception_stack_top:
当然,这样会造成一个警告:
[Warning ea1049] "../../linux-2.6.x/arch/blackfin/mach-common/entry.S":1445 Too few initializers specified.
Expected 2048 but found 1 for "_exception_stacks".
The remaining 2047 elements were initialized to zero.
本来就是要把这些元素置0的,所以略过这个警告。
1 参考资料
uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(38):未命名union的问题(2009-01-16)
uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(39):CONFIG_BASE_SMALL(2009-1-16)
uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(40):远调用(2009-1-17)
uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(41):bfin_write_EVT15(2009-1-17)
uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(42):.macro(2009-1-17)
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(43):exception_stacks
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(5):'bf561.h'的问题
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(38):未命名union的问题
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(45):未命名union的后遗症
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(46):fls_long的问题
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(47):per_cpu的奇怪问题
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(70):保留VDSP的heap
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(71):l1_data_sram_init的疑惑
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(72):中断时SP的保存
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(1):前言
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(2):代码注释
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(3):vdsp项目创建
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(4):目录差异
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(6):CONFIG_BFIN_KERNEL_CLOCK
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(7):CONFIG_MEM_MT48LC16M16A2TG_75
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(8):CONFIG_CLKIN_HZ
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(9):CONFIG_MEM_SIZE
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(10):CONFIG_FLASH_SPEED_BTT
- 一个简单的VIM配置
- 疯狂JAVA讲义---第十二章:Swing编程(六)微调控制器和列表框
- 两小时搞定负载均衡51CTO技术沙龙现场视频
- IBM发布流通行业SaaS服务 优化零售供应链
- 无题
- uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(43):exception_stacks
- 名词解释(ISV-Independent Software Vendors 的英文缩写,意为“独立软件开发商”)
- Overlapped I/O
- Java对象交换和值交换的相关问题
- 制作类似于Title、ALT的提示效果
- 常用Java数据转换
- 09年为工作为房子拼搏的一年
- EJB2.0和Hibernate组合技术
- 客户端和服务器端的IP、MAC地址等的获取