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.

ioremap/syslink errors when giving linux more memory

Hello,

We use the system that's described in the signatrue (I hope). It has 1GB of RAM, but until now we treated it as it it has only 512GB to have some spare. Guess what, we need more memory ;)

So until now, the kernel bootparams  were:

console=ttyO0,115200n8 rootwait quiet root=ubi0:ubi-rootfs rootfstype=ubifs ubi.mtd=9 ro mem=296M vram=16M ti814xfb.vram=0:16M ip=off noinitrd libata.force=1.5G

Where, of course, only the mem=296M is interesting for now.

According to this wiki page and this excel sheet from the same page, there's an additional wealth of memory for Linux at 0xA0000000. So I tried this:

console=ttyO0,115200n8 rootwait root=ubi0:ubi-rootfs rootfstype=ubifs ubi.mtd=9 ro mem=296M@0x80000000 mem=296M@0xa0000000 vram=16M ti814xfb.vram=0:16M ip=off noinitrd libata.force=1.5G

Good news: The kernel boots and reports more memory :)

Bad new: It doesn't go far:

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.37 (charly@PC-VM-KRACH-UBUNTU-1404) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 Wed Aug 13 16:20:14 CEST 2014
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: damian
vram size = 16777216 at 0x0
ti81xx_reserve: ### Reserved DDR region @b2700000
reserved size = 16777216 at 0x0
FB: Reserving 16777216 bytes SDRAM for VRAM
Memory policy: ECC disabled, Data cache writeback
OMAP chip is TI8148 2.1
SRAM: Mapped pa 0x402f1000 to va 0xfe400000 size: 0xf000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 145584
Kernel command line: console=ttyO0,115200n8 rootwait root=ubi0:ubi-rootfs rootfstype=ubifs ubi.mtd=9 ro mem=296M@0x80000000 mem=296M@0xa0000000 vram=16M ti814xfb.vram=0:16M ip=off noinitrd libata.force=1.5G
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 296MB 279MB = 575MB total
Memory: 578916k/578916k available, 27292k reserved, 23552K highmem
.
.
.
OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
BUG: Your driver calls ioremap() on system memory.  This leads
to architecturally unpredictable behaviour on ARMv6+, and ioremap()
will fail in the next kernel release.  Please fix your driver.
------------[ cut here ]------------
WARNING: at arch/arm/mm/ioremap.c:211 __arm_ioremap_pfn_caller+0x58/0x190()
Modules linked in:
Backtrace:
[<c0045bd0>] (dump_backtrace+0x0/0x110) from [<c02cc8fc>] (dump_stack+0x18/0x1c)
 r7:00000000 r6:c004976c r5:c036757f r4:000000d3
[<c02cc8e4>] (dump_stack+0x0/0x1c) from [<c006a3f4>] (warn_slowpath_common+0x54/0x6c)
[<c006a3a0>] (warn_slowpath_common+0x0/0x6c) from [<c006a430>] (warn_slowpath_null+0x24/0x2c)
 r9:00000000 r8:c002597c r7:c0025b0c r6:000a0000 r5:00002100
r4:00000000
[<c006a40c>] (warn_slowpath_null+0x0/0x2c) from [<c004976c>] (__arm_ioremap_pfn_caller+0x58/0x190)
[<c0049714>] (__arm_ioremap_pfn_caller+0x0/0x190) from [<c0049928>] (__arm_ioremap_caller+0x64/0x6c)
[<c00498c4>] (__arm_ioremap_caller+0x0/0x6c) from [<c005bdfc>] (omap_ioremap+0x60/0x64)
 r6:00000000 r5:00002100 r4:a0000000
[<c005bd9c>] (omap_ioremap+0x0/0x64) from [<c0025b0c>] (notify_init+0x190/0x2cc)
 r7:00000000 r6:c04326bc r5:00000020 r4:00000002
[<c002597c>] (notify_init+0x0/0x2cc) from [<c003742c>] (do_one_initcall+0xd0/0x1a4)
 r7:00000013 r6:c006d5fc r5:c00086b0 r4:c002bd48
[<c003735c>] (do_one_initcall+0x0/0x1a4) from [<c000874c>] (kernel_init+0x9c/0x154)
[<c00086b0>] (kernel_init+0x0/0x154) from [<c006d5fc>] (do_exit+0x0/0x5e4)
 r5:c00086b0 r4:00000000
---[ end trace eef563f49cdac562 ]---
notify_init : notify drivercreated  for  remote proc id 2 at physical Address 0xa0000000
.
.
.
Loading DSP Firmware
FIRMWARE: I2cInit will be done by M3
FIRMWARE: Memory map bin file not passed
Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
===Mandatory arguments===
<Processor Id>         0: DSP, 1: Video-M3, 2: Vpss-M3
<Location of Firmware> firmware binary file
<start|stop>           to start/stop the firmware
===Optional arguments===
-mmap                  input memory map bin file name
-i2c                   0: i2c init not done by M3, 1(default): i2c init done by M3
FIRMWARE: isI2cInitRequiredOnM3: 1
FIRMWARE: Default memory configuration is used
Firmware Loader debugging not configured
Default FL_DEBUG: warning
Allowed FL_DEBUG levels: error, warning, info, debug, log
MemCfg: DCMM (Dynamically Configurable Memory Map) Version :  2.1.2.1
vmap allocation for size 87162880 failed: use vmalloc=<size> to increase size.
Unable to handle kernel paging request at virtual address ffffffff
pgd = ef088000
[ffffffff] *pgd=afffe021, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1]
last sysfs file: /sys/devices/virtual/syslinkipc/syslinkipc_Osal/dev
Modules linked in: syslink
CPU: 0    Tainted: G        W    (2.6.37 #1)
PC is at memset+0xb8/0xc0
LR is at ElfLoaderTrgWrite_copy+0x154/0x388 [syslink]
pc : [<c0164398>]    lr : [<bf013134>]    psr: 20000013
sp : ef085cb0  ip : 00000000  fp : ef085d1c
r10: ffffffff  r9 : f28ba000  r8 : f297d000
r7 : 06a85000  r6 : 0531e7d8  r5 : bf0fd9b8  r4 : ef085d48
r3 : 00000003  r2 : 00000000  r1 : 0531e7d4  r0 : ffffffff
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: af088019  DAC: 00000015
Process firmware_loader (pid: 637, stack limit = 0xef0842e8)
Stack: (0xef085cb0 to 0xef086000)
5ca0:                                     94d00000 bf02a408 f2a5d000 00000001
5cc0: f29d2000 ffffffff 00000001 94d00000 94d00000 ef085ce0 0531e7d8 bf020000
5ce0: f2a5d000 00000001 f297d01c 94d00000 ef085d0c f29f3000 f29d2000 00000001
5d00: 0000000b f297d000 f29cf000 00000001 ef085d2c ef085d20 bf01672c bf012fec
5d20: ef085d9c ef085d30 bf015468 bf016728 ef2c0580 ef085db4 f29cf000 9a07cc4c
5d40: 0000000b f297d01c f29cf000 f29f6000 c00d0a60 ef2c0580 00000038 00000000
5d60: 00000002 00000008 f29d2000 f29d2000 00000000 f28ba000 03046000 f28b4000
5d80: becd0bf8 00000001 ef085ec0 00000001 ef085de4 ef085da0 bf012150 bf014d40
5da0: f29cc000 00000001 becd0bf8 00000000 bf034d84 f29cf000 ef085df4 f28b4000
5dc0: 00000001 becd0bf8 f29cc000 ef085ec0 f29cc000 00000000 ef085e1c ef085de8
5de0: bf002c10 bf011ee8 00000000 ef085ec0 becd0bf8 00000000 f0b98000 00000001
5e00: f28c6000 becd0bf8 00000000 ef085ec0 ef085e5c ef085e20 bf007104 bf002b30
5e20: 00000000 ef085ec0 becd0bf8 00000000 0000002c 00000000 ef2fd580 f29cc000
5e40: becd0b68 bf0fd9b8 ef084000 00000000 ef085ef4 ef085e60 bf0090a8 bf006ef0
5e60: 00000000 ef085ec0 00000000 00000000 0000003d 00000000 ef2ab780 000000f4
5e80: c00acef0 c0167c40 ef045688 ef2ab780 ef085eac ef085ea0 00000204 ef085fb0
5ea0: ef2cedc0 0485f000 f28c6000 becd0f5e 0000002c 00000001 becd0bf8 00000000
5ec0: 00000000 c0085f10 c00b7b5c c00b571c ef04585c 00000000 ef2fd580 00000008
5ee0: 00000008 becd0b68 ef085f04 ef085ef8 c00d1880 bf008538 ef085f74 ef085f08
5f00: c00d1f90 c00d1864 c03c5d0c 00000000 fffffffe 00000000 ef085f54 ef085f28
5f20: c02d0a7c c003d1c4 ffffffff ef87001c ef2cedc0 00000017 ef839340 ef084000
5f40: ef084000 400dc000 ef085f6c 00000000 becd0b68 c020e0a2 00000008 ef2fd580
5f60: ef084000 00000000 ef085fa4 ef085f78 c00d2028 c00d1a9c ef085fac 00000001
5f80: c02cd1bc 00000000 00000000 00008e20 00000036 c0041fa8 00000000 ef085fa8
5fa0: c0041e00 c00d1fdc 00000000 00000000 00000008 c020e0a2 becd0b68 00000008
5fc0: 00000000 00000000 00008e20 00000036 00000000 00000000 400dc000 becd0b44
5fe0: 00068704 becd0b1c 00040108 4027e06c 60000010 00000008 e7ff5db6 91b55d59
Backtrace:
[<bf012fe0>] (ElfLoaderTrgWrite_copy+0x0/0x388 [syslink]) from [<bf01672c>] (DLIF_copy+0x10/0x1c [syslink])
[<bf01671c>] (DLIF_copy+0x0/0x1c [syslink]) from [<bf015468>] (DLOAD_load+0x734/0xa58 [syslink])
[<bf014d34>] (DLOAD_load+0x0/0xa58 [syslink]) from [<bf012150>] (ElfLoader_load+0x274/0x37c [syslink])
[<bf011edc>] (ElfLoader_load+0x0/0x37c [syslink]) from [<bf002c10>] (Loader_load+0xec/0x164 [syslink])
[<bf002b24>] (Loader_load+0x0/0x164 [syslink]) from [<bf007104>] (ProcMgr_load+0x220/0x2fc [syslink])
[<bf006ee4>] (ProcMgr_load+0x0/0x2fc [syslink]) from [<bf0090a8>] (ProcMgrDrv_ioctl+0xb7c/0x1b74 [syslink])
[<bf00852c>] (ProcMgrDrv_ioctl+0x0/0x1b74 [syslink]) from [<c00d1880>] (vfs_ioctl+0x28/0x44)
 r8:becd0b68 r7:00000008 r6:00000008 r5:ef2fd580 r4:00000000
[<c00d1858>] (vfs_ioctl+0x0/0x44) from [<c00d1f90>] (do_vfs_ioctl+0x500/0x540)
[<c00d1a90>] (do_vfs_ioctl+0x0/0x540) from [<c00d2028>] (sys_ioctl+0x58/0x7c)
[<c00d1fd0>] (sys_ioctl+0x0/0x7c) from [<c0041e00>] (ret_fast_syscall+0x0/0x30)
 r8:c0041fa8 r7:00000036 r6:00008e20 r5:00000000 r4:00000000
Code: ba00001d e3530002 b4c02001 d4c02001 (e4c02001)
---[ end trace eef563f49cdac564 ]---

So it seems that syslink/notify is interfering somehow. I didn't expect this, because until now nothing should have accessed memory at 0xA0000000...

What do I have to do now? The MemSegmentDefinition.xs doesn't mention anything at this address... Do we have to rebuild syslink/ezsdk? If so, which changes have to be applied?

Thanks for your help,

Markus

(Oh, and BTW: I can't find a "Preview" button, only "Post" in the new forum. Is it hidden somewhere?)

  • Moving this thread to the DM814x forum.
  • Markus,

    Markus Grunwald said:

    According to this wiki page and this excel sheet from the same page, there's an additional wealth of memory for Linux at 0xA0000000. So I tried this:

    console=ttyO0,115200n8 rootwait root=ubi0:ubi-rootfs rootfstype=ubifs ubi.mtd=9 ro mem=296M@0x80000000 mem=296M@0xa0000000 vram=16M ti814xfb.vram=0:16M ip=off noinitrd libata.force=1.5G

    Why do not try with the 1GB recommended boot args?

    Linux Kernel Memory

    Linux size is passed though the mem parameter in the bootargs environment variable, base address is always <LINUX_MEM_1> -
     % setenv bootargs 'console=ttyO2,115200n8 root=/dev/nfs nfsroot=<nfs-server-ip>:<path-to-nfs-share>,nolock rw mem=<size of LINUX_MEM_1>@<addr of LINUX_MEM_1> mem=<size of LINUX_MEM_2>@<addr of LINUX_MEM_2>'

    For 1GB default memory map,

     % setenv bootargs 'console=ttyO2,115200n8 root=/dev/nfs nfsroot=<nfs-server-ip>:<path-to-nfs-share>,nolock rw mem=364M'

    The second partition can be added to linux mem=320M@0x9FC00000 Ex: mem=364M mem=320M@0x9FC00000

    So, can you try with the below mem settings?

    mem=364M@0x80000000 mem=324M@0x9F900000 vmalloc=500M notifyk.vpssm3_sva=0xBF900000

    BR
    Pavel

  • Markus,

    Could you also provide me your DMM_LISA_MAP (0 to 3) register settings?

    BR
    Pavel
  • Hello Pavel,

    your answer led me to an intermediate solution, but to a new problem, too...

    Unfortunately, my colleagues changed the kernel to ignore the notifyk.vpssm3_sva and to set a fixed value and I didn't know:

     /* notify slave virtual address of vpssm3*/
    -static  int  vpssm3_notify_va ;
    -module_param_named(vpssm3_sva, vpssm3_notify_va, int,
    -			S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
    -MODULE_PARM_DESC(vpssm3_notify_va, "Specify the slave virtual address where the"
    -				"notify driver for vpssm3 will be created."
    -				" ignore notify driver creation  is not "
    -				"required at kernel boot time ");
    +static const int vpssm3_notify_va = 0xA0000000;
     #endif

    So, whenever I tried to use memory at 0xA0000000, it failed...

    Knowing this, I got a working set of parameters, which lets the second linux memory partition start well after vpssm3_notify_va:

    console=ttyO0,115200n8 rootwait root=ubi0:ubi-rootfs rootfstype=ubifs ubi.mtd=9 ro mem=296M@0x80000000 mem=280M@0xa1000000 vmalloc=500M vram=16M ti814xfb.vram=0:16M ip=off noinitrd

    This way, linux boots, the DSP-Firmware is loaded and all is fine :)

    Of course, there's a "but":

    My final target is to give DSP_DATA more memory without taking anything away from the linux memory. The plan was

    1. Activate the now unused LINUX_MEM_2_2 at 0xA0000000 (solved :) )
    2. Shrink LINUX_MEM_1 by x MB
    3. Give the x MB to DSP_DATA

    After you helped me to accomplish 1), I tried to continue to 2) by using these bootparameters:

    console=ttyO0,115200n8 rootwait root=ubi0:ubi-rootfs rootfstype=ubifs ubi.mtd=9 ro mem=16M@0x80000000 mem=280M@0xa1000000 vmalloc=279M vram=16M ti814xfb.vram=0:16M ip=off noinitrd

    So LINUX_MEM_1 gets only 16M but there's plenty at LNUX_MEM_2_2. Unfortunately, the Kernel complains now when the firmware_loader tries to load the DSP-Firmware:

    FIRMWARE: I2cInit will be done by M3
    FIRMWARE: Memory map bin file not passed
    Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
    ===Mandatory arguments===
    <Processor Id>         0: DSP, 1: Video-M3, 2: Vpss-M3
    <Location of Firmware> firmware binary file
    <start|stop>           to start/stop the firmware
    ===Optional arguments===
    -mmap                  input memory map bin file name
    -i2c                   0: i2c init not done by M3, 1(default): i2c init done by M3
    FIRMWARE: isI2cInitRequiredOnM3: 1
    FIRMWARE: Default memory configuration is used
    Firmware Loader debugging not configured
    Default FL_DEBUG: warning
    Allowed FL_DEBUG levels: error, warning, info, debug, log
    MemCfg: DCMM (Dynamically Configurable Memory Map) Version :  2.1.2.1
    vmap allocation for size 197136384 failed: use vmalloc=<size> to increase size.
    Unable to handle kernel paging request at virtual address 40000010
    pgd = e67fc000
    [40000010] *pgd=a5f7a031, *pte=00000000, *ppte=00000000
    Internal error: Oops: 817 [#1]
    last sysfs file: /sys/devices/virtual/syslinkipc/syslinkipc_Osal/dev
    Modules linked in: syslink
    CPU: 0    Not tainted  (2.6.37 #1)
    PC is at HeapMemMP_postInit+0x178/0x228 [syslink]
    LR is at GateMP_getSharedAddr+0x4c/0x60 [syslink]
    pc : [<bf04fd80>]    lr : [<bf04bf34>]    psr: 80000013
    sp : e6757d78  ip : 00000000  fp : e6757db4
    r10: 00000001  r9 : e6757e14  r8 : e6757e00
    r7 : e7007000  r6 : e700a000  r5 : 40000000  r4 : 0bbfff80
    r3 : 00000580  r2 : 00000580  r1 : 00060000  r0 : 00000580
    Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
    Control: 10c5387d  Table: a67fc019  DAC: 00000015
    Process firmware_loader (pid: 640, stack limit = 0xe67562e8)
    Stack: (0xe6757d78 to 0xe6758000)
    7d60:                                                       00000002 00000004
    7d80: e6757db4 e6757d90 e6757db4 e6757d98 bf039260 bf02a354 40000000 e700a000
    7da0: e7007000 00000000 e6757df4 e6757db8 bf051638 bf04fc14 e6757e00 00000001
    7dc0: e6757df4 00000000 bf0369a8 e6757e00 e6757e44 e739e048 00000000 00000002
    7de0: 00000048 00000000 e6757e2c e6757df8 bf051f9c bf05124c e739e048 00000002
    7e00: 00000000 00000000 40000000 0bbfff80 00000000 e7007000 0bc00000 e6757e44
    7e20: e6757e84 e6757e30 bf03b760 bf051e70 e6757eb8 e67fd330 e6757ea4 e739e000
    7e40: 00000001 00000000 00000000 40000000 0bbfff80 00000000 bf02b62c c024f2a0
    7e60: e58ada00 bed12b14 00000009 bed12b14 e6756000 00000000 e6757ef4 e6757e88
    7e80: bf07e214 bf03b484 c024f2a0 bed12b14 c03dbd88 00000001 e64265b0 00000000
    7ea0: e6757ed4 e6757eb0 c0066c90 c0066ab4 c03dbd88 e6426580 40000000 0bc00000
    7ec0: 00010003 00000000 00000080 00000001 00000000 00000000 00000000 e58ada00
    7ee0: 00000009 00000009 e6757f04 e6757ef8 c00d1880 bf07ddc8 e6757f74 e6757f08
    7f00: c00d1f90 c00d1864 c03c5d0c 00000000 fffffffe 00000000 e6757f54 e6757f28
    7f20: c02d0a7c c003d1c4 ffffffff e643a01c e5da2b00 00000017 e6427080 e6756000
    7f40: e6756000 00000000 e6757f6c 00000000 bed12b14 c024f2a0 00000009 e58ada00
    7f60: e6756000 00000000 e6757fa4 e6757f78 c00d2028 c00d1a9c e6757fac 00000001
    7f80: c02cd1bc 00000000 00000000 00008e20 00000036 c0041fa8 00000000 e6757fa8
    7fa0: c0041e00 c00d1fdc 00000000 00000000 00000009 c024f2a0 bed12b14 00000009
    7fc0: 00000000 00000000 00008e20 00000036 00000000 00000000 400d5000 bed12afc
    7fe0: 00068704 bed12aac 0002e33c 402d106c 20000010 00000009 a68fe021 a68fe421
    Backtrace:
    [<bf04fc08>] (HeapMemMP_postInit+0x0/0x228 [syslink]) from [<bf051638>] (_HeapMemMP_create+0x3f8/0x5e0 [syslink])
     r7:00000000 r6:e7007000 r5:e700a000 r4:40000000
    [<bf051240>] (_HeapMemMP_create+0x0/0x5e0 [syslink]) from [<bf051f9c>] (HeapMemMP_create+0x138/0x1bc [syslink])
    [<bf051e64>] (HeapMemMP_create+0x0/0x1bc [syslink]) from [<bf03b760>] (SharedRegion_setEntry+0x2e8/0x414 [syslink])
     r5:e6757e44 r4:0bc00000
    [<bf03b478>] (SharedRegion_setEntry+0x0/0x414 [syslink]) from [<bf07e214>] (SharedRegionDrv_ioctl+0x458/0x5a8 [syslink])
    [<bf07ddbc>] (SharedRegionDrv_ioctl+0x0/0x5a8 [syslink]) from [<c00d1880>] (vfs_ioctl+0x28/0x44)
     r7:00000009 r6:00000009 r5:e58ada00 r4:00000000
    [<c00d1858>] (vfs_ioctl+0x0/0x44) from [<c00d1f90>] (do_vfs_ioctl+0x500/0x540)
    [<c00d1a90>] (do_vfs_ioctl+0x0/0x540) from [<c00d2028>] (sys_ioctl+0x58/0x7c)
    [<c00d1fd0>] (sys_ioctl+0x0/0x7c) from [<c0041e00>] (ret_fast_syscall+0x0/0x30)
     r8:c0041fa8 r7:00000036 r6:00008e20 r5:00000000 r4:00000000
    Code: e0040094 e596000c e5864024 ebfff059 (e5850010)
    ---[ end trace 26c90f36c1b95fe4 ]---

    "vmap allocation for size 197136384 failed: use vmalloc=<size> to increase size.", seems to be the key... but why does syslink try to alloc 188MB? And why isn't there sufficient memory if there's 279MB available?

    Well, since it's obvious, I have to admit that I don't understand what's going on with this memory map configuration. I would be really thankfull if you could help me to accomplish the other two targets mentioned above...

  • LISA 0 .. 3:

    4e000040: 00000000 00000000 00000000 80640300

    LISA 3: Sys_ADDR 0x80000000, SYS_SIZE 1-GB, Mapped on SDRC 0 and SDRC 1


    Thanks,
    Markus
  • Markus,

    Markus Grunwald said:
    My final target is to give DSP_DATA more memory without taking anything away from the linux memory.

    Markus Grunwald said:
    • Shrink LINUX_MEM_1 by x MB
    • Give the x MB to DSP_DATA

    But you are taking away from the linux memory (LINUX_MEM_1) x MB? It seems to me these two quotes are in contradiction. Regarding DSP_DATA size, see the below e2e threads:

     

    Markus Grunwald said:

    2) by using these bootparameters:

    console=ttyO0,115200n8 rootwait root=ubi0:ubi-rootfs rootfstype=ubifs ubi.mtd=9 ro mem=16M@0x80000000 mem=280M@0xa1000000 vmalloc=279M vram=16M ti814xfb.vram=0:16M ip=off noinitrd

    Can you try with vmalloc=500M?

    See also if the below wiki page will be in help:

    Markus Grunwald said:
    vmap allocation for size 197136384 failed: use vmalloc=<size> to increase size.

    When the 2 partition is set it throws below error while running EZSDK. "vmap allocation for size 197136384 failed: use vmalloc=500M to increase size."

    To solve this rebuild the kernel with HIGHMEM support enabled. This can be enabled by menuconfig->Kernel Features->HIGH Memory Support. Please note Linux partiton memory needs to start and end at 4MB boundary.

    For quick check you can pass vmalloc=500M to bootargs, but note that the actual physical memory which can be managed by Linux would less that what is passed via mem= bootargs.

    BR
    Pavel

  • Markus,

    Markus Grunwald said:
    4e000040: 00000000 00000000 00000000 80640300

    LISA 3: Sys_ADDR 0x80000000, SYS_SIZE 1-GB, Mapped on SDRC 0 and SDRC 1

    In this configuration, it seems to me that second linux kernel memory partition (LINUX_MEM_2) shoud start from 0x9FC00000 not from 0xA0000000 or 0xA1000000.

    For using LINUX_MEM_2 at 0xA1000000, can you also try with below LISA MAP settings:

    4e000040: 00000000 00000000 80640300 A0640320

    Regards,
    Pavel

  • Hello Pavel,

    Pavel Botev said:

    Markus Grunwald
    Shrink LINUX_MEM_1 by x MB
    Give the x MB to DSP_DATA
    But you are taking away from the linux memory (LINUX_MEM_1) x MB? It seems to me these two quotes are in contradiction.

    It's not a contratiction if you keep the start of the thread in mind: we haven't used LINUX_MEM_2 at all until now. So I can take some memory from LINUX_MEM_1, give it to the DSP. By using LINUX_MEM_2, I still have at leas as much memory for linux as before :)

    Pavel Botev said:

    console=ttyO0,115200n8 rootwait root=ubi0:ubi-rootfs rootfstype=ubifs ubi.mtd=9 ro mem=16M@0x80000000 mem=280M@0xa1000000 vmalloc=279M vram=16M ti814xfb.vram=0:16M ip=off noinitrd


    Can you try with vmalloc=500M?

    Hmm. I still don't get this vmalloc bootparameter. Is it ok to set it to 500 if there's only 16M+280M=296M available? Where does the value 500M come from?

    Nevertheless, If I try with vmalloc=500, this is what happens:

    console=ttyO0,115200n8 rootwait root=ubi0:ubi-rootfs rootfstype=ubifs ubi.mtd=9 ro mem=16M@0x80000000 mem=280M@0xa1000000 vmalloc=500 vram=16M ti814xfb.vram=0:16M ip=off noinitrd

    ...

    FIRMWARE: I2cInit will be done by M3
    FIRMWARE: Memory map bin file not passed
    Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
    ===Mandatory arguments===
    <Processor Id> 0: DSP, 1: Video-M3, 2: Vpss-M3
    <Location of Firmware> firmware binary file
    <start|stop> to start/stop the firmware
    ===Optional arguments===
    -mmap input memory map bin file name
    -i2c 0: i2c init not done by M3, 1(default): i2c init done by M3
    FIRMWARE: isI2cInitRequiredOnM3: 1
    FIRMWARE: Default memory configuration is used
    Firmware Loader debugging not configured
    Default FL_DEBUG: warning
    Allowed FL_DEBUG levels: error, warning, info, debug, log
    MemCfg: DCMM (Dynamically Configurable Memory Map) Version : 2.1.2.1
    vmap allocation for size 87162880 failed: use vmalloc=<size> to increase size.
    Unable to handle kernel paging request at virtual address ffffffff
    pgd = f0800000
    [ffffffff] *pgd=b16fe021, *pte=00000000, *ppte=00000000
    Internal error: Oops: 817 [#1]

    Pavel Botev said:
    To solve this rebuild the kernel with HIGHMEM support enabled. This can be enabled by menuconfig->Kernel Features->HIGH Memory Support. Please note Linux partiton memory needs to start and end at 4MB boundary.

    Well, the kernel is compiled with HIGHMEM support:

    # zcat config.gz | grep HIGHMEM
    CONFIG_HIGHMEM=y
    # CONFIG_DEBUG_HIGHMEM is not set


    Thank you for your help, Pavel! As I see it now, I have two problems:

    - Why can't I load the DSP Firmware when LINUX_MEM_1 is only 16M? and

    - Why does it complain even if HIGHMEM is enabled?

    Could you continue to help me with these problems? Meanwhile, I'll have a look at the documents that you suggested - that's a lot to read and I have soooo little time :(

    cu

    Markus

  • Pavel Botev said:
    In this configuration, it seems to me that second linux kernel memory partition (LINUX_MEM_2) shoud start from 0x9FC00000 not from 0xA0000000 or 0xA1000000.

    Yes, that's what I've seen in the above mentioned excel-file. The reason that we use 0xA100000 is that in our kernel notifyk.vpssm3_sva is hardcoded to 0xA000000 (don't ask me why) - see above. We'll change this, but for now I have to live with it. So we use 0xA1000000 to start after notifyk.vpssm3_sva.

  • Markus,

    Markus Grunwald said:
    Can you try with vmalloc=500M?

    Markus Grunwald said:
    If I try with vmalloc=500

    Markus Grunwald said:
    mem=16M@0x80000000 mem=280M@0xa1000000 vmalloc=500 vram=16M

    Try with vmalloc=500M, not vmalloc=500. 

    BR
    Pavel

  • Pavel Botev said:
    Try with vmalloc=500M, not vmalloc=500. 

    Ups. Bad mistake, sorry. But:

    console=ttyO0,115200n8 rootwait root=ubi0:ubi-rootfs rootfstype=ubifs ubi.mtd=9 ro mem=16M@0x80000000 mem=280M@0xa1000000 vmalloc=500M vram=16M ti814xfb.vram=0:16M ip=off noinitrd libata.force=1.5G
    
    ...
    ...
    
    FIRMWARE: I2cInit will be done by M3
    FIRMWARE: Memory map bin file not passed
    Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
    ===Mandatory arguments===
    <Processor Id>         0: DSP, 1: Video-M3, 2: Vpss-M3
    <Location of Firmware> firmware binary file
    <start|stop>           to start/stop the firmware
    ===Optional arguments===
    -mmap                  input memory map bin file name
    -i2c                   0: i2c init not done by M3, 1(default): i2c init done by M3
    FIRMWARE: isI2cInitRequiredOnM3: 1
    FIRMWARE: Default memory configuration is used
    Firmware Loader debugging not configured
    Default FL_DEBUG: warning
    Allowed FL_DEBUG levels: error, warning, info, debug, log
    MemCfg: DCMM (Dynamically Configurable Memory Map) Version :  2.1.2.1
    BUG: Your driver calls ioremap() on system memory.  This leads
    to architecturally unpredictable behaviour on ARMv6+, and ioremap()
    will fail in the next kernel release.  Please fix your driver.
    ------------[ cut here ]------------
    WARNING: at arch/arm/mm/ioremap.c:211 __arm_ioremap_pfn_caller+0x58/0x190()
    Modules linked in: syslink
    Backtrace:
    

  • Markus,

    Could you please provide me full boot up log, not just part of it.

    Do you load also the HDVICP-M3 and HDVPSS-M3 firmwares, or only DSP firmware?

    Have you make any changes in the syslink module? Have you rebuild the syslink module to match your kernel version?

    BR
    Pavel