uclinux-2008R1.5-RC3(bf561)到VDSP5的移植(56):L1 data memory overflow

rev 0.1

快乐虾

http://blog.csdn.net/lights_joy/

[email protected]

本文适用于

ADI bf561 DSP

优视BF561EVB开发板

uclinux-2008r1.5-rc3(smp patch)

Visual DSP++ 5.0(update 5)

欢迎转载,但请保留作者信息

内核panic,提示为

L1 data memory overflow

这个错误的代码发生在setup_arch

l1_length = _ebss_l1 - _sdata_l1;

if (l1_length > L1_DATA_A_LENGTH)

panic("L1 data memory overflow\n");

在这里_ebss_l1_sdata_l1是定义在uclinux.ldf中的两个值:

L1_data_a

{

INPUT_SECTION_ALIGN(4)

__sdata_l1 = .;

INPUT_SECTIONS($OBJECTS_CORE_A{DualCoreMem("CoreA")}(cplb_data) $LIBRARIES_CORE_A{DualCoreMem("CoreA")}(cplb_data))

INPUT_SECTIONS($OBJECTS_CORE_A(cplb_data) $LIBRARIES_CORE_A(cplb_data))

INPUT_SECTIONS($OBJECTS_CORE_A(voldata) $LIBRARIES_CORE_A(voldata))

INPUT_SECTIONS($OBJECTS_CORE_A(.edt) $LIBRARIES_CORE_A(.edt))

INPUT_SECTIONS($OBJECTS_CORE_A(.cht) $LIBRARIES_CORE_A(.cht))

INPUT_SECTIONS($OBJECTS_CORE_A(.l1.data) $LIBRARIES_CORE_A(.l1.data))

/*$VDSG<insert-input-sections-at-the-end-of-l1_data_a> */

/* Text inserted between these $VDSG comments will be preserved */

/*$VDSG<insert-input-sections-at-the-end-of-l1_data_a> */

__edata_l1 = .;

} > MEM_A_L1_DATA_A

bsz_L1_data_a ZERO_INIT

{

INPUT_SECTION_ALIGN(4)

__sbss_l1 = .;

INPUT_SECTIONS($OBJECTS_CORE_A(bsz) $LIBRARIES_CORE_A(bsz))

INPUT_SECTIONS($OBJECTS_CORE_A(.l1.bss) $LIBRARIES_CORE_A(.l1.bss))

__ebss_l1 = .;

} > MEM_A_L1_DATA_A

但是由于在生成uclinux工程的时候,没有选择启用cachevdsp将把l1_data_a32k空间全部拿来当data memory,而uclinux则需要启用16k的空间来做为cache。为此需要调整MEM_A_L1_DATA_A的定义,让其只使用16k的空间:

MEM_A_L1_DATA_A { TYPE(RAM) START(0xFF800000) END(0xFF803FFF) WIDTH(8) }

1 参考资料

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(52)__ebss_l1(2009-1-28)

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(53)ARRAY_SIZE(2009-1-30)

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(54)MEM_SDRAM_BANKx(2009-2-1)

uclinux-2008R1.5-RC3(bf561)VDSP5的移植(55)CONFIG_FLAT_NODE_MEM_MAP(2009-02-03)

你可能感兴趣的:(.net,cache,Blog)