Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Linux Page Fault Accessing DDR2 on Custom AT91SAM9G45 Board
PostPosted: Tue Sep 07, 2010 9:08 pm 
Offline

Joined: Thu Jul 08, 2010 5:07 pm
Posts: 3
Hello,

I have a custom board using the AT91SAM9G45 with a 16-bit 512Mb DDR2 device. I had to adjust the at91bootstrap values so that I wasn't getting memory aliasing.

(Possible issue: I had to change number of columns from 10 to 9 even though the datasheet says 10 bits of column. I'm thinking the datasheet is giving that in bytes but for some reason Atmel requires it in 16-bit word addresses. I'm trying to get that confirmed by Atmel).

Now I can use u-boot's mm and md to write unique values before and after the 16MB boundaries and everything behaves as I expect. I can let mtest run over the DDR2 memory range (0x70000000 - 0x73ffffff) and there are no errors over hours of running.

However, when I try to load Linux I get crashes. Something like what is below.

From u-boot the relevant settings are:

bootargs=mem=64M console=ttyS0 115200 root=/dev/mtdblock2 rw rootfstype=cramfs
bootcmd=nand read 0x72000000 0xa0000 0x200000; bootm 0x72000000

If I change to mem=16M then it will boot though the application will crash out since it needs more memory than that.

Is there something in Linux that needs to be configured for the larger memory? We're using the 2.6.27 kernel.

TIA, James.

----------------

VFS: Mounted root (cramfs filesystem) readonly.
Freeing init memory: 104K
Unable to handle kernel paging request at virtual address e3a01094
pgd = c3a14000
[e3a01094] *pgd=00000000
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.27 #6)
PC is at cramfs_read+0x20/0x20c
LR is at cramfs_readpage+0x7c/0x188
pc : [<c00bb2b4>] lr : [<c00bbab4>] psr: 20000013
sp : c3819d80 ip : c3819dc0 fp : c3819dbc
r10: c396a000 r9 : 00000020 r8 : c396a000
r7 : 00020210 r6 : 000001be r5 : c02fb060 r4 : 00020100
r3 : e3a01000 r2 : 00000004 r1 : 0002020c r0 : c396a000
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 0005317f Table: 73a14000 DAC: 00000015
Process init (pid: 1, stack limit = 0xc3818268)
Stack: (0xc3819d80 to 0xc381a000)
9d80: c3819dbc c02fb060 c340f6f0 00000044 00000000 00020100 c02fb060 000001be
9da0: 00020210 c396a000 00000020 00100100 c3819de4 c3819dc0 c00bbab4 c00bb2a4
9dc0: c3819de4 c02fb060 00000006 c340f6f0 00200200 00000007 c3819e24 c3819de8
9de0: c00649a8 c00bba48 c39c8da0 000001bd c3819df0 c3819df0 c3819e18 c340f6f0
9e00: 00000020 0000002e c39c8da0 c3819eb0 00000001 c340f6f0 c3819e4c c3819e28
9e20: c0064e3c c0064814 00000000 c005c924 00000fff c026e3d8 00000000 c39c8da0
9e40: c3819e9c c3819e50 c005f2d4 c0064de0 00000000 c396256c 00000100 c39625a0
9e60: c39c8de8 c340f658 00000000 00000004 c0300680 00000000 c3a14000 c39625a0
9e80: c39625a0 00046000 c3961de0 00046000 c3819eec c3819ea0 c006a62c c005f174
9ea0: c004e21c c3a14000 00000000 00000000 00000000 0000003e 00046000 00000000
9ec0: c380c220 00000000 c3a14000 c3818000 c39625a0 00046000 00000000 c3961de0
9ee0: c3819f3c c3819ef0 c006b50c c006a5e8 0000003e 00000000 00000000 c0028ed0
9f00: c3819f84 00000118 c3a14000 c0078264 c380c220 ffffffff 00046000 c3814c40
9f20: c39625a0 c3961e14 c3961de0 00046480 c3819f84 c3819f40 c0028fa8 c006b25c
9f40: c004862c c0047e94 c0092360 00000000 c3819fb0 00000000 c3819f84 ffffffff
9f60: bee3d8a5 00000000 001bc1cc bee3d948 bee3d840 0000007d c3819f9c c3819f88
9f80: c002919c c0028ed0 bee3dfeb ffffffff c3819fac c3819fa0 c00221d4 c0029190
9fa0: 00000000 c3819fb0 c0022b40 c00221cc bee3d798 001bc1cc bee3d948 00000000
9fc0: bee3d798 bee3d8a5 00000000 001bc1cc bee3d948 bee3d840 0000007d 00000002
9fe0: 00000000 bee3d790 000546e8 00046480 a0000010 ffffffff ffffffff ffffffff
Backtrace:
[<c00bb294>] (cramfs_read+0x0/0x20c) from [<c00bbab4>] (cramfs_readpage+0x7c/0x188)
[<c00bba38>] (cramfs_readpage+0x0/0x188) from [<c00649a8>] (__do_page_cache_readahead+0x1a4/0x1f4)
r8:00000007 r7:00200200 r6:c340f6f0 r5:00000006 r4:c02fb060
[<c0064804>] (__do_page_cache_readahead+0x0/0x1f4) from [<c0064e3c>] (do_page_cache_readahead+0x6c/0x74)
[<c0064dd0>] (do_page_cache_readahead+0x0/0x74) from [<c005f2d4>] (filemap_fault+0x170/0x374)
r7:c39c8da0 r6:00000000 r5:c026e3d8 r4:00000fff
[<c005f164>] (filemap_fault+0x0/0x374) from [<c006a62c>] (__do_fault+0x54/0x3b8)
[<c006a5d8>] (__do_fault+0x0/0x3b8) from [<c006b50c>] (handle_mm_fault+0x2c0/0x3cc)
[<c006b24c>] (handle_mm_fault+0x0/0x3cc) from [<c0028fa8>] (do_page_fault+0xe8/0x23c)
[<c0028ec0>] (do_page_fault+0x0/0x23c) from [<c002919c>] (do_translation_fault+0x1c/0x84)
[<c0029180>] (do_translation_fault+0x0/0x84) from [<c00221d4>] (do_PrefetchAbort+0x18/0x1c)
r4:ffffffff
[<c00221bc>] (do_PrefetchAbort+0x0/0x1c) from [<c0022b40>] (ret_from_exception+0x0/0x10)
Exception stack(0xc3819fb0 to 0xc3819ff8)
9fa0: bee3d798 001bc1cc bee3d948 00000000
9fc0: bee3d798 bee3d8a5 00000000 001bc1cc bee3d948 bee3d840 0000007d 00000002
9fe0: 00000000 bee3d790 000546e8 00046480 a0000010 ffffffff
Code: e59030a4 e3520000 e5933004 e1a0a000 (e5936094)
---[ end trace fb8397707b1cac78 ]---
Kernel panic - not syncing: Attempted to kill init!


Top
 Profile  
 
 Post subject: Re: Linux Page Fault Accessing DDR2 on Custom AT91SAM9G45 Board
PostPosted: Mon Sep 13, 2010 4:14 pm 
Offline

Joined: Tue Jun 30, 2009 11:44 am
Posts: 7
Hi,
it's look like a bad memory initialization.
I'll be happy to assist you if you publish/send your memory initialization file.


Top
 Profile  
 
 Post subject: Re: Linux Page Fault Accessing DDR2 on Custom AT91SAM9G45 Board
PostPosted: Fri May 27, 2011 4:36 pm 
Offline

Joined: Wed May 25, 2011 9:44 am
Posts: 32
Hi jm2morri,

I'm working on a custom board designed on the lines of AT91SAM9G45-EK. I'm also facing the same problem as you are facing.

Whenever I change the DDR2 RAM from 128 MB to 256 MB, there is a kernel segmentation fault at some point after kernel starts loading. This some point may be during the kernel loading or while my application is running. I have no clue why this is happening. It seems that you may have got solution to this problem.

If you have, please reply back to this post on how you solved it.

-pj


Top
 Profile  
 
 Post subject: Re: Linux Page Fault Accessing DDR2 on Custom AT91SAM9G45 Board
PostPosted: Fri May 27, 2011 7:33 pm 
Offline

Joined: Sat Oct 30, 2010 6:04 pm
Posts: 574
Well you have to initialize the memory controller in AT91BootStrap, and uBoot has to provide the memory configuration to the kernel.

If you get the geometry or timing wrong, things will crash and burn. So look at what you're doing in AT91BootStrap, and uBoot, and assume the default setting aren't working for you.

To solve such problems, you'll need to review, and provide, details of the EXACT parts you are using, and how you are ACTUALLY configuring the parts. Your current question is boundlessly vague in terms of seeking resolution. Please provide pertinent, and specific, details of your board/system.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: