hello experts,
my board is iMX6DL based customized board with 1G SDRAM,
i configured uboot successfully,and uboot can recgnize 1G ram at startup.
after booting up linux ,I excute my test program which just allocate 1M mem everytime and continuous until out of mem.
but it can only access 640M ,and then kernel crashed.
but when i passed nosmp paramtter to cmdline this problem disappears.
./mem 600
... ...
allocated mem:1M success, address:0x6e09f008 ,total allocated:491 M
Mem: 882 638 243 0 0
allocated mem:1M success, address:0x6e243008 ,total allocated:492 M
Mem: 882 639 243 0 0
allocated mem:1M success, address:0x6e370008 ,total allocated:493 M
Mem: 882 640 242 0 0
allocated mem:1M success, address:0x6e53b008 ,total allocated:494 M
Mem: 882 641 240 0
[ 2172.882422] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 2172.891952] pgd = c0004000
[ 2172.894671] [00000000] *pgd=00000000
[ 2172.898280] Internal error: Oops: 80000007 [#1] PREEMPT SMP
[ 2172.903867] Modules linked in: iPod_drmic cgpio rohm_bu21024
[ 2172.909618] CPU: 1 Not tainted (3.0.35 #9)
[ 2172.914083] pc : [<00000000>] lr : [<c0027128>] psr: 80000093
[ 2172.914093] sp : e9fa7ef0 ip : 00000000 fp : 80000093
[ 2172.925597] r10: cc010040 r9 : 00000000 r8 : 00000001
[ 2172.930838] r7 : c048c0c8 r6 : 80000093 r5 : 0000001d r4 : 80000093
[ 2172.937382] r3 : c003d778 r2 : 00000400 r1 : 00000000 r0 : 0000001d
[ 2172.943929] Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 2172.951345] Control: 10c53c7d Table: 340b804a DAC: 00000015
[ 2172.957108] Process swapper (pid: 0, stack limit = 0xe9fa62f0)
[ 2172.962956] Stack: (0xe9fa7ef0 to 0xe9fa8000)
[ 2172.967333] 7ee0: c003d778 c0483e50 00000001 c003d798
[ 2172.975539] 7f00: cc010040 c0090b98 00000002 00000000 c04619e0 c0091c30 00000001 c005d1dc
[ 2172.983740] 7f20: c0387ae0 e9f8db00 00000001 00000000 e9fa7fd4 e9fa7fd4 00000004 412fc09a
[ 2172.991942] 7f40: 00000000 c00912cc e9918000 00000002 00000000 c0088858 00000000 ffffffff
[ 2173.000144] 7f60: 00000000 00000000 e9fa7fd4 00000004 412fc09a 00000000 80000093 c0088590
[ 2173.008345] 7f80: 00000004 c0483d24 c0452c3c e9fa7fd4 1000406a c0088694 00000000 c0483d24
[ 2173.016560] 7fa0: c0452c3c c00907d8 00000000 e9fa6000 c0483d24 c0452c3c c0483e40 1000406a
[ 2173.024762] 7fc0: 412fc09a 00000000 00000000 c0042cc4 00000000 00000001 c0483d24 c0038870
[ 2173.032965] 7fe0: c0038850 c0038a0c 39fa806a 00000015 10c03c7d 100265b4 05800680 10000044
[ 2173.041168] Function entered at [<c0027128>] from [<c003d798>]
[ 2173.047019] Function entered at [<c003d798>] from [<c0090b98>]
[ 2173.052869] Function entered at [<c0090b98>] from [<c0091c30>]
[ 2173.058718] Function entered at [<c0091c30>] from [<c00912cc>]
[ 2173.064565] Function entered at [<c00912cc>] from [<c0088590>]
[ 2173.070414] Function entered at [<c0088590>] from [<c0088694>]
[ 2173.076261] Function entered at [<c0088694>] from [<c00907d8>]
[ 2173.082108] Function entered at [<c00907d8>] from [<c0042cc4>]
[ 2173.087956] Function entered at [<c0042cc4>] from [<c0038870>]
[ 2173.093805] Function entered at [<c0038870>] from [<c0038a0c>]
[ 2173.099651] Function entered at [<c0038a0c>] from [<100265b4>]
[ 2173.105502] Code: bad PC value
[ 2173.108716] ---[ end trace 65e19ed5dd25e2ad ]---
[ 2173.113354] Kernel panic - not syncing: Attempted to kill the idle task!
[ 2173.120114] Function entered at [<c003dd8c>] from [<c0381620>]
[ 2173.125998] Function entered at [<c0381620>] from [<c006e010>]
[ 2173.131851] Function entered at [<c006e010>] from [<c003af48>]
[ 2173.137727] Function entered at [<c003af48>] from [<c03811ec>]
[ 2173.143577] Function entered at [<c03811ec>] from [<c003f160>]
[ 2173.149455] Function entered at [<c003f160>] from [<c00323bc>]
[ 2173.155329] Function entered at [<c00323bc>] from [<c0037af0>]
[ 2173.161179] Exception stack(0xe9fa7ea8 to 0xe9fa7ef0)
[ 2173.166278] 7ea0: 0000001d 00000000 00000400 c003d778 80000093 0000001d
[ 2173.174505] 7ec0: 80000093 c048c0c8 00000001 00000000 cc010040 80000093 00000000 e9fa7ef0
[ 2173.182704] 7ee0: c0027128 00000000 80000093 ffffffff
[ 2173.187801] Function entered at [<c0037af0>] from [<c0027128>]
[ 2173.193651] Function entered at [<c0027128>] from [<c003d798>]
[ 2173.199525] Function entered at [<c003d798>] from [<c0090b98>]
[ 2173.205417] Function entered at [<c0090b98>] from [<c0091c30>]
[ 2173.211270] Function entered at [<c0091c30>] from [<c00912cc>]
[ 2173.217147] Function entered at [<c00912cc>] from [<c0088590>]
[ 2173.222997] Function entered at [<c0088590>] from [<c0088694>]
[ 2173.228874] Function entered at [<c0088694>] from [<c00907d8>]
[ 2173.234748] Function entered at [<c00907d8>] from [<c0042cc4>]
[ 2173.240598] Function entered at [<c0042cc4>] from [<c0038870>]
[ 2173.246470] Function entered at [<c0038870>] from [<c0038a0c>]
[ 2173.252319] Function entered at [<c0038a0c>] from [<100265b4>]
[ 2174.497826] SMP: failed to stop secondary CPUs
can anyone give some suggestions?
thanks.
Original Attachment has been moved to: mem.c.zip
I would recommend looking at AN3980 (link below) as hardware looks to be working fine (uboot is recognizing the entire RAM) and the problem seems to be the memory mapping in Linux. This Application Note is written for the i.MX51 but the key concepts still apply.
http://cache.freescale.com/files/dsp/doc/app_note/AN3980.pdf
thanks gusarambula's reply,I solved the problem,I selected cpu hot plug in support in kernel and the problem got solved.
I’m glad to hear you solve your problem. Thanks for sharing the solution as I’m sure it will help other users of the community!