hi all,
我有一塊使用CL的EP7312的板上,現在我想使用 32MB的SDRAM,但boot時就會kernel oops,然後panic掛點。
我現在的作法有二種:
一是利用bootloader(hermit)傳遞mem參數(page數目、大小、記憶體大小等)
,另外bootloader還設定CAS latency、RAM device capacity、device bus width、enable SDRAM controller等。
另一作法是在linux kernel中直接修改 arch/arm/mach-clps711x/edb7211-arch.c
直接設定
mi->bank[0].start = 0xc0000000;
mi->bank[0].size = 32*1024*1024;
mi->bank[0].node = 0;
mi->nr_banks = 1;
然後再configure kernel,在cmdline 設定 mem=32M
以下是 kernel oops
------------------------------
SRAM_LAST value = 12344321
SRAM_LAST value = cddcbaab
Uncompressing Linux...........................................done.
SRAM_LAST value = 34432112
SRAM_LAST value = cddcbaab
Linux version 2.4.19-rmk4 (root@localhost.localdomain) (gcc version 2.95.2 19991024 (release)) #140 Tue Dec 10
09:36:39 CST 2002
CPU: ARM ARM720T revision 2
Machine: CL-EDB7211 (EP7211 eval board)
page_size = 0
PAGE_SIZE = 4096
Warning: bad configuration page, trying to continue
Security risk: creating user accessible mapping for 0x30000000 at 0xfd000000
Security risk: creating user accessible mapping for 0x20000000 at 0xfc000000
Security risk: creating user accessible mapping for 0x00000000 at 0xfa000000
Security risk: creating user accessible mapping for 0x10000000 at 0xfb000000
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=1f03 mem=32M
Calibrating delay loop... 36.76 BogoMIPS
Memory: 32MB = 32MB total
Memory: 30804KB available (1158K code, 243K data, 40K init)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Unable to handle kernel paging request at virtual address 0002bfa8
pgd = c0024000
*pgd = 00000000, *pmd = 00000000
Internal error: Oops: ffffffff
CPU: 0
pc : [<c00557d8>] lr : [<00001ffe>] Not tainted
sp : c0157f20 ip : 000001ff fp : c0157f48
r10: c0031154 r9 : 00000001 r8 : c1ffe000
r7 : c1ffe000 r6 : 00000001 r5 : c01912c0 r4 : 0002bfa8
r3 : 0000afea r2 : 00000000 r1 : 00004ff6 r0 : 00000008
Flags: NzCv IRQs on FIQs off Mode SVC_32 Segment kernel
Control: 217D Table: C002401D DAC: 0000001D
Process swapper (pid: 0, stack limit = 0xc0156374)
Stack: (0xc0157f20 to 0xc0158000)
7f20: 000001f0 c01912c0 00000000 00000001 60000053 41807202 c0031154 c0157f6c
7f40: c0157f4c c0055ee0 c005566c c013fbf8 00000007 00000000 00000001 00008124
7f60: c0157f94 c0157f70 c007d9ec c0055cf4 c013fbf8 00008124 00000000 c016f808
7f80: c0164588 c0158c44 c0157fb0 c0157f98 c007dbf8 c007d978 c015b790 c007f104
7fa0: 00000000 c0157fcc c0157fb4 c002dd48 c007db90 00000000 c015b6ec c0164594
7fc0: c0157fe4 c0157fd0 c002dbb8 c002dd18 c016d438 c01908d0 c0157ffc c0157fe8
7fe0: c0028644 c002db74 c01649a8 c01908d0 00000000 c0158000 c0028080 c0028558
Backtrace:
Function entered at [<c005565c>] from [<c0055ee0>]
Function entered at [<c0055ce4>] from [<c007d9ec>]
r8 = 00008124 r7 = 00000001 r6 = 00000000 r5 = 00000007
r4 = C013FBF8
Function entered at [<c007d968>] from [<c007dbf8>]
r8 = C0158C44 r7 = C0164588 r6 = C016F808 r5 = 00000000
r4 = 00008124
Function entered at [<c007db80>] from [<c002dd48>]
r5 = 00000000 r4 = C007F104
Function entered at [<c002dd08>] from [<c002dbb8>]
r6 = C0164594 r5 = C015B6EC r4 = 00000000
Function entered at [<c002db64>] from [<c0028644>]
r5 = C01908D0 r4 = C016D438
Function entered at [<c0028548>] from [<c0028080>]
r4 = C01908D0
Code: e5922320 e0833081 e0824103 e3a00008 (e5845000)
Kernel panic: Attempted to kill the idle task!
In idle task - not syncing
-------------------------------------------------
我的一個疑問是bootloader對DRAM的設定在linux kernel的boot.S
還要再執行一遍嗎!?還是bootloader初始過一遍就可以了?
還有這個記憶體問題如何解決!?
我用的kernel是 2.4.19加上rmk4 patch
kind regards,
Saturn