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.

Unable to handle kernel paging request at virtual address c3902010

Other Parts Discussed in Thread: OMAP3530

Hi everyone,

I am using OMAP35x EVM and try to write some multimedia application algorithms on IVA2.2 subsystem (DSP). I use codec examples provided by DVSDK and wrote my image processing algorithms on DSP. It works well.

I tried to revise my code and added 4 more arrays (really big ones about 1 mb in total) and tried to test my code on EVM. the file ./loadmodules.sh works well, however when I try to run my code, firstly it gives some outputs as expected and comes to some point that I can not gues where the PC is (on my code) and I get the following error:

Unable to handle kernel paging request at virtual address c3902010
pgd = c2888000
[c3902010] *pgd=804a2011, *pte=00000000, *ppte=00000000
Internal error: Oops: 7 [#1]
Modules linked in: lpm_omap3530(F) dsplinkk(F) cmemk
CPU: 0    Tainted: GF       (2.6.22.18-omap3 #1)
PC is at __down_interruptible+0x6c/0x140
LR is at __init_begin+0x3fff8000/0x30
pc : [<c02d814c>]    lr : [<00000000>]    psr: 40000093
sp : c27c5e78  ip : 00000000  fp : c27c5eac
r10: ffffffff  r9 : 00000000  r8 : 00000000
r7 : c2725580  r6 : c27c4000  r5 : c390200c  r4 : 00000001
r3 : c2725580  r2 : c27c4000  r1 : 00000002  r0 : 00000000
Flags: nZcv  IRQs off  FIQs on  Mode SVC_32  Segment user
Control: 00c5387f  Table: 82888018  DAC: 00000015
Process app.out (pid: 337, stack limit = 0xc27c42d8)
Stack: (0xc27c5e78 to 0xc27c6000)
5e60:                                                       c00a9148 00000001
5e80: c2725580 c005f198 c3902014 c3902014 00000001 c3902000 00000000 00008000
5ea0: c27c5f0c c27c5eb0 c02d7f2c c02d80ec c3902000 ffffffff 00000000 c390200c
5ec0: 00000001 bf00c744 c27c5ef4 c27c5ed8 c00a4d20 c00a4ab0 00000000 c04fe000
5ee0: c27c4000 bf020634 41163e08 bf020634 0000001c 41163e08 c27c4000 00000000
5f00: c27c5f34 c27c5f10 bf00b004 bf00c5f0 c27c5f5c 00000000 00000001 c13a6aa0
5f20: 41163e08 c27c5f70 c27c5f44 c27c5f38 bf008860 bf00af8c c27c5f6c c27c5f48
5f40: c00a6f64 bf008858 00000020 c137c120 00000000 00000000 c13a6aa0 0000001c
5f60: c27c5fa4 c27c5f70 c00a7378 c00a6eb8 00000000 00000000 41164490 00000001
5f80: 00000005 411644d8 41164490 40041000 00000003 c002afe8 00000000 c27c5fa8
5fa0: c002ae40 c00a7340 411644d8 41164490 00000009 41163e08 0000001c 41163e08
5fc0: 411644d8 41164490 40041000 00000003 40041000 003d0f00 40029830 41163e34
5fe0: 00000000 41163d78 40033618 40033c94 80000010 00000009 ffffffff ffffffff
Backtrace:
[<c02d80e0>] (__down_interruptible+0x0/0x140) from [<c02d7f2c>] (__down_interrup
tible_failed+0xc/0x20)
 r7:00008000 r6:00000000 r5:c3902000 r4:00000001
[<bf00c5e4>] (SYNC_WaitSEM+0x0/0x294 [dsplinkk]) from [<bf00b004>] (UEVENT_GetBu
f+0x84/0x124 [dsplinkk])
[<bf00af80>] (UEVENT_GetBuf+0x0/0x124 [dsplinkk]) from [<bf008860>] (DRV_Read+0x
14/0x18 [dsplinkk])
 r6:c27c5f70 r5:41163e08 r4:c13a6aa0
[<bf00884c>] (DRV_Read+0x0/0x18 [dsplinkk]) from [<c00a6f64>] (vfs_read+0xb8/0x1
48)
[<c00a6eac>] (vfs_read+0x0/0x148) from [<c00a7378>] (sys_read+0x44/0x70)
 r7:0000001c r6:c13a6aa0 r5:00000000 r4:00000000
[<c00a7334>] (sys_read+0x0/0x70) from [<c002ae40>] (ret_fast_syscall+0x0/0x2c)
 r8:c002afe8 r7:00000003 r6:40041000 r5:41164490 r4:411644d8
Code: e5953004 e2833001 e5853004 e596300c (e5951004)

Actually I know that pop memory map supports until 88000000 which is smaller than c3902010 address. But what should I do in order to prevent such a paging request?

Regards...

  • As far as I know, virtual addresses apply to ARM/Linux side; I do not believe virtual addresses exist on DSP side.  Is it possible this is an ARM side error?

  • hi Juan,

    Yes definitely ARM side error, because CMEM is located between 8500000 to 8600000 and it worked well before I defined the arrays... I also tried to move CMEM location within the range of 8400000 to 8700000 but still I get the same error. Should I define new CMEM area (doubled area than the first one) and define those arrays inside CMEM area?

  • If this is indeed CMEM related, than you can take DSP side algorithm (codec engine calls) aside and you should still be getting this error.  You mentioned you added some large arrays, did you make sure that CMEM has a sufficient number of memory buffer pools of the correct size to accomodate these new arrays.  CMEM size and memory buffer pools are typically defined in loadmodules.sh.  However, if you need to incrase the overall size of CMEM, you will need to decrease the overall size of some other software component; typically, the Linux OS is the easiest and you can decrease its size via bootargs (look for 'mem=128M' and change it to something smaller).  I hope this helps.

  • Hi Juan,

    I actually configured loadmodules.sh, also bootargs in order to locate CMEM and CMEM has enough space for all arrays. However, the arrays that are newly defined are not used by the DSP core but only by the ARM core, and therefore I did not add them (I did not allocate any space for these arrays). Should we define all kinds of arrays inside CMEM? Besides, while DSP side is working with the arrays that are located inside CMEM area, ARM core also does its operation on those big arrays. Is it possible that the problem occurs because ARM and DSP try to reach SDRAM memory simultaneously?  

  • CMEM was developed as a means for ARM and DSP side to share large memory buffers.  When ARM sends a request to DSP (via codec engine API which uses DSPLINK underneath), request normally contains small variables and perhaps pointers to CMEM buffers.  the small variables are easily marshalled by DSPLINK, but it is inefficient to do this with large buffers.  Furthermore, since DSP has no MMU, the memory needs to be contigous and CMEM meets these requirements.

    That said, ARM normally allocates these buffers from CMEM and passes them to DSP side for DSP to work on; therefore, memory pools need to be defined for ARM to be able to allocate these buffers.  Since codec engine calls made from ARM to DSP are normally blocking, this takes care that only one CPU (ARM or DSP) accesses a particular CMEM buffer at one time. 

  • Hi all,

    I am also getting a kernel oops like the following after I changed the default memory map of my application running in OMAP3530 EVM(Default  uses 99MB for linux kernel, 16MB for CMEM, 13MB for DSP codec server and 128MB for storing user input accessed by ARM application).  

    For considering large memory pools to be shared between ARM and DSP, I have to modify the memory map as follows:-

    I am now allocating 71MB for my Linux kernel, 42MB for CMEM, 15MB for DSP codec server and the rest 128MB again for accessing user input for my application.  I have modified .tcf file, rebuild the ARM and DSP codec server, modified loadmodules.sh and modified the bootargs of my board. 

    I have followed the link Changing the DVEVM memory map for the procedures.

    Now the application now runs fine for some time and after that following print occurs:-

    <1>Unable to handle kernel paging request at virtual address 80200800

    Unable to handle kernel paging request at virtual address 80200800

    <1>pgd = cf18c000

    pgd = cf18c000

    <1>[80200800] *pgd=00000000[80200800] *pgd=00000000

    Internal error: Oops: 5 [#1]

    Internal error: Oops: 5 [#1]

    Modules linked in:Modules linked in: sdmak sdmak lpm_omap3530 lpm_omap3530 dsplinkk dsplinkk cmemk cmemk

    CPU: 0    Not tainted  (2.6.29-rc3-omap1 #2)

    CPU: 0    Not tainted  (2.6.29-rc3-omap1 #2)

    PC is at __arm_ioremap_pfn+0x200/0x308

    PC is at __arm_ioremap_pfn+0x200/0x308

    LR is at __insert_vmap_area+0x88/0xd8

    LR is at __insert_vmap_area+0x88/0xd8

    pc : [<c0036c94>]    lr : [<c00a53f0>]    psr: 80000013

    sp : ce73bd30  ip : c00075c0  fp : ce73bd84

    pc : [<c0036c94>]    lr : [<c00a53f0>]    psr: 80000013

    sp : ce73bd30  ip : c00075c0  fp : ce73bd84

    r10: d7000000  r9 : d7000000  r8 : d7000000

    r10: d7000000  r9 : d7000000  r8 : d7000000

    r7 : d7200000  r6 : 87900000  r5 : 80200800  r4 : d7200000

    r7 : d7200000  r6 : 87900000  r5 : 80200800  r4 : d7200000

    r3 : 80200800  r2 : 00000000  r1 : 87900000  r0 : 000004d3

    r3 : 80200800  r2 : 00000000  r1 : 87900000  r0 : 000004d3

    Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user

    Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user

    Control: 10c5387d  Table: 8f18c019  DAC: 00000015

    Control: 10c5387d  Table: 8f18c019  DAC: 00000015

    Process ultrasound (pid: 1250, stack limit = 0xce73a2e0)

    Process ultrasound (pid: 1250, stack limit = 0xce73a2e0)

    Stack: (0xce73bd30 to 0xce73c000)

    Stack: (0xce73bd30 to 0xce73c000)

    bd20: bd20:                                                                         d17bd000 d17bd000 d7400000 d7400000 00000000 00000000 c040a090 c040a090 

    bd40: bd40: c00075c0 c00075c0 87900000 87900000 c00075c0 c00075c0 000004d3 000004d3 d7000000 d7000000 87900000 87900000 ce73bd7c ce73bd7c ce73bdc8 ce73bdc8 

    bd60: bd60: d177c000 d177c000 00000001 00000001 d1779000 d1779000 bf029904 bf029904 bf029934 bf029934 00000000 00000000 ce73bd94 ce73bd94 ce73bd88 ce73bd88 

    bd80: bd80: c0036df0 c0036df0 c0036aa0 c0036aa0 ce73bda4 ce73bda4 ce73bd98 ce73bd98 c00459b8 c00459b8 c0036da8 c0036da8 ce73bdbc ce73bdbc ce73bda8 ce73bda8 

    bda0: bda0: bf01a5cc bf01a5cc c0045940 c0045940 d1785000 d1785000 d177c000 d177c000 ce73bdfc ce73bdfc ce73bdc0 ce73bdc0 bf00bb34 bf00bb34 bf01a594 bf01a594 

    bdc0: bdc0: bf01a698 bf01a698 00000000 00000000 87900000 87900000 00400000 00400000 00000000 00000000 00000000 00000000 ce73be0c ce73be0c d177c000 d177c000 

    bde0: bde0: 00000000 00000000 00000028 00000028 00000000 00000000 00008000 00008000 ce73be0c ce73be0c ce73be00 ce73be00 bf00b0cc bf00b0cc bf00baa4 bf00baa4 

    be00: be00: ce73be4c ce73be4c ce73be10 ce73be10 bf00d550 bf00d550 bf00b0b0 bf00b0b0 bf029610 bf029610 d1779000 d1779000 bf02b280 bf02b280 00000000 00000000 

    be20: be20: ce73be4c ce73be4c bf02b278 bf02b278 00008000 00008000 00000000 00000000 00000000 00000000 bf02b278 bf02b278 00000001 00000001 00000000 00000000 

    be40: be40: ce73be8c ce73be8c ce73be50 ce73be50 bf01e080 bf01e080 bf00d33c bf00d33c 00000001 00000001 d17b9000 d17b9000 00000000 00000000 0000be88 0000be88 

    be60: be60: cf282720 cf282720 00006c08 00006c08 00008000 00008000 00000035 00000035 422a2d7c 422a2d7c 422a2d7c 422a2d7c ce73a000 ce73a000 00000000 00000000 

    be80: be80: ce73bef4 ce73bef4 ce73be90 ce73be90 bf01eef8 bf01eef8 bf01df9c bf01df9c 00000000 00000000 00000001 00000001 ffffffff ffffffff cf282720 cf282720 

    bea0: bea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 cf01a060 cf01a060 00000000 00000000 00000000 00000000 00008000 00008000 

    bec0: bec0: 00000000 00000000 00000000 00000000 000b3608 000b3608 00206080 00206080 0020604c 0020604c 00000000 00000000 422a2d7c 422a2d7c 00006c08 00006c08 

    bee0: bee0: 00000035 00000035 ce5f2d60 ce5f2d60 ce73bf0c ce73bf0c ce73bef8 ce73bef8 c00ba584 c00ba584 bf01ea0c bf01ea0c ce5f2d60 ce5f2d60 422a2d7c 422a2d7c 

    bf00: bf00: ce73bf7c ce73bf7c ce73bf10 ce73bf10 c00baa98 c00baa98 c00ba528 c00ba528 00000000 00000000 ce89de40 ce89de40 40020000 40020000 00000002 00000002 

    bf20: bf20: ce8d16b8 ce8d16b8 ce89dd30 ce89dd30 00000060 00000060 40020000 40020000 ce73a000 ce73a000 00000000 00000000 ce73bf6c ce73bf6c ce73bf48 ce73bf48 

    bf40: bf40: c00aeb74 c00aeb74 c00d6498 c00d6498 00000000 00000000 00000000 00000000 00232f2c 00232f2c 00000035 00000035 422a2d7c 422a2d7c 00006c08 00006c08 

    bf60: bf60: ce5f2d60 ce5f2d60 c002ffa8 c002ffa8 ce73a000 ce73a000 00000000 00000000 ce73bfa4 ce73bfa4 ce73bf80 ce73bf80 c00bab1c c00bab1c c00ba5cc c00ba5cc 

    bf80: bf80: ce73a000 ce73a000 00000001 00000001 00008000 00008000 000b3608 000b3608 00206080 00206080 00000036 00000036 00000000 00000000 ce73bfa8 ce73bfa8 

    bfa0: bfa0: c002fe00 c002fe00 c00baae8 c00baae8 00008000 00008000 000b3608 000b3608 00000035 00000035 00006c08 00006c08 422a2d7c 422a2d7c 00000035 00000035 

    bfc0: bfc0: 00008000 00008000 000b3608 000b3608 00206080 00206080 00000036 00000036 000000b4 000000b4 00000009 00000009 000b2144 000b2144 422a2d6c 422a2d6c 

    bfe0: bfe0: 0020604c 0020604c 422a2c58 422a2c58 0005ef20 0005ef20 40fc629c 40fc629c 80000010 80000010 00000035 00000035 00000000 00000000 00000000 00000000 

    Backtrace: Backtrace: 

    [<c0036a94>] [<c0036a94>] (__arm_ioremap_pfn+0x0/0x308) (__arm_ioremap_pfn+0x0/0x308) from [<c0036df0>] from [<c0036df0>] (__arm_ioremap+0x54/0x58)

    (__arm_ioremap+0x54/0x58)

    [<c0036d9c>] [<c0036d9c>] (__arm_ioremap+0x0/0x58) (__arm_ioremap+0x0/0x58) from [<c00459b8>] from [<c00459b8>] (omap_ioremap+0x84/0x8c)

    (omap_ioremap+0x84/0x8c)

    [<c0045934>] [<c0045934>] (omap_ioremap+0x0/0x8c) (omap_ioremap+0x0/0x8c) from [<bf01a5cc>] from [<bf01a5cc>] (MEM_Map+0x44/0x6c [dsplinkk])

    (MEM_Map+0x44/0x6c [dsplinkk])

    [<bf01a588>] [<bf01a588>] (MEM_Map+0x0/0x6c [dsplinkk]) (MEM_Map+0x0/0x6c [dsplinkk]) from [<bf00bb34>] from [<bf00bb34>] (OMAP3530_init+0x9c/0x1d4 [dsplink)

    (OMAP3530_init+0x9c/0x1d4 [dsplinkk])

     r5:d177c000 r5:d177c000 r4:d1785000 r4:d1785000

    [<bf00ba98>] [<bf00ba98>] (OMAP3530_init+0x0/0x1d4 [dsplinkk]) (OMAP3530_init+0x0/0x1d4 [dsplinkk]) from [<bf00b0cc>] from [<bf00b0cc>] (DSP_init+0x28/0x30 )

    (DSP_init+0x28/0x30 [dsplinkk])

     r8:00008000 r8:00008000 r7:00000000 r7:00000000 r6:00000028 r6:00000028 r5:00000000 r5:00000000 r4:d177c000 r4:d177c000

    [<bf00b0a4>] [<bf00b0a4>] (DSP_init+0x0/0x30 [dsplinkk]) (DSP_init+0x0/0x30 [dsplinkk]) from [<bf00d550>] from [<bf00d550>] (LDRV_PROC_init+0x220/0x2ec [dsp)

    (LDRV_PROC_init+0x220/0x2ec [dsplinkk])

    [<bf00d330>] [<bf00d330>] (LDRV_PROC_init+0x0/0x2ec [dsplinkk]) (LDRV_PROC_init+0x0/0x2ec [dsplinkk]) from [<bf01e080>] from [<bf01e080>] (PMGR_PROC_attach+)

    (PMGR_PROC_attach+0xf0/0x33c [dsplinkk])

    [<bf01df90>] [<bf01df90>] (PMGR_PROC_attach+0x0/0x33c [dsplinkk]) (PMGR_PROC_attach+0x0/0x33c [dsplinkk]) from [<bf01eef8>] from [<bf01eef8>] (DRV_Ioctl+0x4)

    (DRV_Ioctl+0x4f8/0x944 [dsplinkk])

    [<bf01ea00>] [<bf01ea00>] (DRV_Ioctl+0x0/0x944 [dsplinkk]) (DRV_Ioctl+0x0/0x944 [dsplinkk]) from [<c00ba584>] from [<c00ba584>] (vfs_ioctl+0x68/0x78)

    (vfs_ioctl+0x68/0x78)

     r7:ce5f2d60 r7:ce5f2d60 r6:00000035 r6:00000035 r5:00006c08 r5:00006c08 r4:422a2d7c r4:422a2d7c

    [<c00ba51c>] [<c00ba51c>] (vfs_ioctl+0x0/0x78) (vfs_ioctl+0x0/0x78) from [<c00baa98>] from [<c00baa98>] (do_vfs_ioctl+0x4d8/0x51c)

    (do_vfs_ioctl+0x4d8/0x51c)

     r5:422a2d7c r5:422a2d7c r4:ce5f2d60 r4:ce5f2d60

    [<c00ba5c0>] [<c00ba5c0>] (do_vfs_ioctl+0x0/0x51c) (do_vfs_ioctl+0x0/0x51c) from [<c00bab1c>] from [<c00bab1c>] (sys_ioctl+0x40/0x64)

    (sys_ioctl+0x40/0x64)

    [<c00baadc>] [<c00baadc>] (sys_ioctl+0x0/0x64) (sys_ioctl+0x0/0x64) from [<c002fe00>] from [<c002fe00>] (ret_fast_syscall+0x0/0x2c)

    (ret_fast_syscall+0x0/0x2c)

     r7:00000036 r7:00000036 r6:00206080 r6:00206080 r5:000b3608 r5:000b3608 r4:00008000 r4:00008000

    Code: Code: 0a000015 0a000015 e51b6030 e51b6030 e1a0800a e1a0800a e3c61eff e3c61eff (e5953000) (e5953000) 

    <4>---[ end trace 21f183f5acc56b50 ]---

    ---[ end trace 21f183f5acc56b50 ]---

    Could you please help me figure out my problem? Is it CMEM related issue? If so, how can I solve it?