This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Kernel crashes after changing DDR2 memory

I was using a 2Gb DDR2 memory and after I changed it to 512Mb my Kernel won't show me to the login screen, it crashes right before that step... Oh, no message appears on the terminal to inform the error.

I tryed the mtest in the u-boot and everything worked flawlessly, so I really think that the error is somewhere in the address map that the Kernel uses, but I don't know where to configure that.

At first I thought that SPL would configure the EMIF and somehow the Kernel would read the register containing the RAM information, but this theory of mine is not what happens.

Anyone knows how to inform the Kernel the size of my memory or how to solve this?

Thanks :)

Davi

  • Quick update:

    I forgot to inform that I'm using the ti-sdk-am335x-evm-05.05.00.00 and a slightly modified BeagleBone board (I only changed it's RAM).

    Anyway, searching online I discovered that bootargs is used to pass arguments to the Kernel when it boots (guess I'm still fresh in all this) and I added the following to the u-boot ( board-support/u-boot-2011.09-psp04.06.00.08/include/configs/am335x_evm.h )


    bootargs_defaults=setenv bootargs mem=512M


    And now I get another error:

    [ 48.976898] Unable to handle kernel paging request at virtual address 6563697a
    [ 48.984527] pgd = dfba4000
    [ 48.987396] [6563697a] *pgd=00000000
    [ 48.991149] Internal error: Oops: 805 [#1]
    [ 48.995483] Modules linked in:
    [ 48.998718] CPU: 0 Not tainted (3.2.0 #1)
    [ 49.003326] PC is at get_page_from_freelist+0x118/0x4e8
    [ 49.008850] LR is at get_page_from_freelist+0x400/0x4e8
    [ 49.014343] pc : [<c0078384>] lr : [<c007866c>] psr: 60000193
    [ 49.014343] sp : dfbefd78 ip : 00000018 fp : c0962750
    [ 49.026458] r10: 60000113 r9 : 00000002 r8 : 00000001
    [ 49.031951] r7 : c0962734 r6 : c08f0e40 r5 : c0519ec0 r4 : 00000001
    [ 49.038848] r3 : 00200200 r2 : 00100100 r1 : c0962750 r0 : 65636976
    [ 49.045715] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
    [ 49.053344] Control: 10c5387d Table: 9fba4019 DAC: 00000015
    [ 49.059387] Process matrix_browser (pid: 1097, stack limit = 0xdfbee2f0)
    [ 49.066436] Stack: (0xdfbefd78 to 0xdfbf0000)
    [ 49.071044] fd60: 00000041 df816b00
    [ 49.079681] fd80: 60000013 00000000 00000018 000200da d2fd2fd3 00000000 c051a474 00000000
    [ 49.088287] fda0: 00000000 ffffffff 0000002f 60000113 c0962734 00000000 c04fcde0 c0519ec0
    [ 49.096923] fdc0: 000000c2 000200da c04dc100 c051a470 00000000 00000001 000200da c051a474
    [ 49.105560] fde0: 00000000 c007883c 00000001 00000041 c0519ec0 00000002 df472a80 00000000
    [ 49.114166] fe00: df90fc00 dfbefe64 00000002 000200da 00000000 df488a80 df60e580 00000001
    [ 49.122802] fe20: df60e5a4 c00b3700 00000000 df488a80 dfbeff00 dfbeff00 df60e580 dfbefeb0
    [ 49.131439] fe40: dfbeff00 dfbefeb8 df488a80 c0519ec0 dfaad540 00000000 dfae3f20 00000001
    [ 49.140045] fe60: 00000001 01a7e000 df0efa80 dfba4068 00000089 c008a9ac df488a80 c00b2f58
    [ 49.148681] fe80: dfbeff14 00000000 dfbeff00 00000000 dfb10000 c00abc10 dfbefebc 0000000d
    [ 49.157287] fea0: 01a7e000 df0efa80 dfba4000 dfae3f20 dfba4068 00000001 00000089 c008abc0
    [ 49.165924] fec0: dfba4068 00000001 df0efa80 dfbeffb0 01a7e01c dfae3f20 00000817 df0efab4
    [ 49.174560] fee0: df149600 c001a0b8 c04dc298 dfb10000 00000817 01a7e01c dfbeffb0 00000007
    [ 49.183166] ff00: c04e068c 01a7df98 00000004 c0008384 dfb10005 00000000 df097408 dfaad540
    [ 49.191802] ff20: 00000000 00000001 df097400 00000000 00000000 00000000 00000001 df097408
    [ 49.200408] ff40: 0000002a 00000000 dfb612e0 00000002 dfbee000 00000000 bed8c6f4 c00a0a80
    [ 49.209045] ff60: 00000000 00000000 00000000 00000000 df097400 bed8a0b0 0000002a c00a0ca8
    [ 49.217681] ff80: 00000000 00000000 00000004 00000000 0000002a bed8a0b0 423b14d8 60000010
    [ 49.226287] ffa0: ffffffff 00000000 00000000 c00137f4 01a7e018 00000000 000bcda0 0000efe9
    [ 49.234924] ffc0: 01a7df90 4246e278 00000098 00000000 00000000 01a7df98 00000004 00000089
    [ 49.243530] ffe0: 00000089 bed8c598 423b3914 423b14d8 60000010 ffffffff 9fffe821 9fffec21
    [ 49.252197] [<c0078384>] (get_page_from_freelist+0x118/0x4e8) from [<c007883c>] (__alloc_pages_nodemask+0xe8/0x600)
    [ 49.263214] [<c007883c>] (__alloc_pages_nodemask+0xe8/0x600) from [<c008a9ac>] (handle_pte_fault+0x448/0x5d4)
    [ 49.273681] [<c008a9ac>] (handle_pte_fault+0x448/0x5d4) from [<c008abc0>] (handle_mm_fault+0x88/0xb4)
    [ 49.283416] [<c008abc0>] (handle_mm_fault+0x88/0xb4) from [<c001a0b8>] (do_page_fault+0x174/0x1e8)
    [ 49.292877] [<c001a0b8>] (do_page_fault+0x174/0x1e8) from [<c0008384>] (do_DataAbort+0x34/0x9c)
    [ 49.302062] [<c0008384>] (do_DataAbort+0x34/0x9c) from [<c00137f4>] (__dabt_usr+0x34/0x40)
    [ 49.310791] Exception stack(0xdfbeffb0 to 0xdfbefff8)
    [ 49.316101] ffa0: 01a7e018 00000000 000bcda0 0000efe9
    [ 49.324737] ffc0: 01a7df90 4246e278 00000098 00000000 00000000 01a7df98 00000004 00000089
    [ 49.333374] ffe0: 00000089 bed8c598 423b3914 423b14d8 60000010 ffffffff
    [ 49.340332] Code: e3403020 e2466014 e5961018 e5960014 (e5801004)
    [ 49.346862] ---[ end trace 510836ce905b4e6c ]---


    Well, I will still try to figure it out, but any help will be very much appriciated!

  • It looks like an ARM exception. That could easily happen if the DDR isn't configured right. Does this happen shortly after you start booting up?

    You have to configure the DDR PHY registers in u-boot/include/asm/arch-am33xx/ddr_defs.h

    Check out http://processors.wiki.ti.com/index.php/AM335x_EMIF_Configuration_tips for details on how to calculate those values.

  • Davi,

    Can you try by passing lesser memory to kernel like below? 

    bootargs_defaults=setenv bootargs mem=400M

  • Well, I tryed both answers without success, but nevertheless thank you for the support!

    I found what was wrong, I haven't changed the PHYS_DRAM_1_SIZE define in am335x_evm.h and after updating it my Kernel worked. Also, I removed the mem=512M from the bootargs, for some reason it's not necessary with this sdk.

    DAVI