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.

Linux/AM5728: CMEM issues with OCMC2

Part Number: AM5728
Other Parts Discussed in Thread: DRA752, TMP102, PMP

Tool/software: Linux

hello

sdk: 4.0.0.4

I added ocmc2 to am57xx-evm-cmem.dtsi to use ocmc2.

/ {
        reserved-memory {
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;

                cmem_block_mem_0: cmem_block_mem@a0000000 {
                        reg = <0x0 0xa0000000 0x0 0x100000>;
                        no-map;
                        status = "okay";
                };    
               
    cmem_block_ocmc3: cmem_block_mem@40500000 {
      reg = <0x0 0x40500000 0x0 0x100000>;
      no-map;
      status = "okay";
    };
    
    cmem_block_mem_1: cmem_block_mem@a0100000 {
                        reg = <0x0 0xa0100000 0x0 0x12800000>;
                        no-map;
                        status = "okay";
                };  
        };

        cmem {
                compatible = "ti,cmem";
                #address-cells = <1>;
                #size-cells = <0>;

    #pool-size-cells = <2>;

                status = "okay";

                cmem_block_0: cmem_block@0 {
                        reg = <0>;
                        memory-region  = <&cmem_block_mem_0>;
                        cmem-buf-pools = <1 0x0 0x100000>;
                };
               
    cmem_block_1: cmem_block@1 {
      reg = <1>;
      memory-region = <&cmem_block_ocmc3>;
    };
    
    cmem_block_2: cmem_block@2 {
                        reg = <2>;
                        memory-region  = <&cmem_block_mem_1>;                       
                };
        };
};


I wrote a test program, assigned it to cmem_alloc2, and tested memcpy.


But it is 10~20 times slower than memcpy in heap buffers allocated with malloc.

Please advise me. Thank you.

- kernel boot log-


Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.28-geed43d1050 (jhlee@ubunto-TI) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #125 SMP PREEMPT Mon Jun 11 12:17:07 KST 2018
[    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt:Machine model: TI AM572x EVM Rev A3
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB
[    0.000000] OF: reserved mem: initialized node ipu2_cma@95800000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 64 MiB
[    0.000000] OF: reserved mem: initialized node dsp1_cma@99000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created CMA memory pool at 0x000000009d000000, size 32 MiB
[    0.000000] OF: reserved mem: initialized node dsp2_cma@9d000000, compatible id shared-dma-pool
[    0.000000] Reserved memory: created CMA memory pool at 0x000000009f000000, size 8 MiB
[    0.000000] OF: reserved mem: initialized node ipu1_cma@9f000000, compatible id shared-dma-pool
[    0.000000] cma: Reserved 24 MiB at 0x00000000fe400000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] OMAP4: Map 0x00000000ffd00000 to fe600000 for dram barrier
[    0.000000] DRA752 ES2.0
[    0.000000] percpu: Embedded 13 pages/cpu @dff34000 s22092 r8192 d22964 u53248
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 445760
[    0.000000] Kernel command line: console=ttyO9,115200n8 root=PARTUUID=e754ee62-02 rw rootfstype=ext4 rootwait
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 1569488K/1789952K available (8192K kernel code, 313K rwdata, 2420K rodata, 2048K init, 296K bss, 32048K reserved, 188416K cma-reserved, 1241088K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0a00000   (10208 kB)
[    0.000000]       .init : 0xc0e00000 - 0xc1000000   (2048 kB)
[    0.000000]       .data : 0xc1000000 - 0xc104e660   ( 314 kB)
[    0.000000]        .bss : 0xc1050000 - 0xc109a130   ( 297 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] OMAP clockevent source: timer1 at 32786 Hz
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 6.14MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_idle_ns: 440795202250 ns
[    0.000005] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps every 4398046511023ns
[    0.000016] Switching to timer-based delay loop, resolution 162ns
[    0.000318] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
[    0.000326] OMAP clocksource: 32k_counter at 32768 Hz
[    0.000732] Console: colour dummy device 80x30
[    0.000749] WARNING: Your 'console=ttyO9' has been replaced by 'ttyS9'
[    0.000755] This ensures that you still see kernel messages. Please
[    0.000761] update your kernel commandline.
[    0.000778] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
[    0.000791] pid_max: default: 32768 minimum: 301
[    0.000892] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000903] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001494] CPU: Testing write buffer coherency: ok
[    0.001703] /cpus/cpu@0 missing clock-frequency property
[    0.001719] /cpus/cpu@1 missing clock-frequency property
[    0.001729] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.001747] Setting up static identity map for 0x80200000 - 0x80200060
[    0.080073] EFI services will not be available.
[    0.170315] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.170402] Brought up 2 CPUs
[    0.170415] SMP: Total of 2 processors activated (24.59 BogoMIPS).
[    0.170423] CPU: All CPU(s) started in HYP mode.
[    0.170429] CPU: Virtualization extensions available.
[    0.170856] devtmpfs: initialized
[    0.197772] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
[    0.198005] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.198021] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.201389] pinctrl core: initialized pinctrl subsystem
[    0.202190] NET: Registered protocol family 16
[    0.203036] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.203997] omap_hwmod: l3_main_2 using broken dt data from ocp
[    0.311121] omap_hwmod: dcan1: _wait_target_disable failed
[    0.420370] cpuidle: using governor ladder
[    0.450394] cpuidle: using governor menu
[    0.460082] OMAP GPIO hardware version 0.1
[    0.474874] irq: no irq domain found for /ocp/l4@4a000000/scm@2000/pinmux@1400 !
[    0.500416] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.500427] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.500793] omap4_sram_init:Unable to allocate sram needed to handle errata I688
[    0.500803] omap4_sram_init:Unable to get sram pool needed to handle errata I688
[    0.501334] OMAP DMA hardware revision 0.0
[    0.551410] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
[    0.552685] edma 43300000.edma: memcpy is disabled
[    0.557355] edma 43300000.edma: TI EDMA DMA engine driver
[    0.561769] omap-iommu 40d01000.mmu: 40d01000.mmu registered
[    0.561936] omap-iommu 40d02000.mmu: 40d02000.mmu registered
[    0.562088] omap-iommu 58882000.mmu: 58882000.mmu registered
[    0.562242] omap-iommu 55082000.mmu: 55082000.mmu registered
[    0.562502] omap-iommu 41501000.mmu: 41501000.mmu registered
[    0.562681] omap-iommu 41502000.mmu: 41502000.mmu registered
[    0.565342] palmas 0-0058: Irq flag is 0x00000008
[    0.592294] palmas 0-0058: Muxing GPIO 2f, PWM 0, LED 0
[    0.596067] vtt_fixed: supplied by smps3
[    0.641580] random: fast init done
[    0.672032] vdd_3v3: supplied by regen1
[    0.672250] aic_dvdd_fixed: supplied by vdd_3v3
[    0.675431] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
[    0.676027] omap_i2c 4807c000.i2c: bus 4 rev0.12 at 400 kHz
[    0.676219] media: Linux media interface: v0.10
[    0.676265] Linux video capture interface: v2.00
[    0.676304] pps_core: LinuxPPS API ver. 1 registered
[    0.676311] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.676331] PTP clock support registered
[    0.676363] EDAC MC: Ver: 3.0.0
[    0.677054] omap-mailbox 4883c000.mailbox: omap mailbox rev 0x400
[    0.677343] omap-mailbox 4883e000.mailbox: omap mailbox rev 0x400
[    0.677620] omap-mailbox 48840000.mailbox: omap mailbox rev 0x400
[    0.677900] omap-mailbox 48842000.mailbox: omap mailbox rev 0x400
[    0.678234] Advanced Linux Sound Architecture Driver Initialized.
[    0.679045] clocksource: Switched to clocksource arch_sys_counter
[    0.689579] NET: Registered protocol family 2
[    0.690078] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.690116] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.690183] TCP: Hash tables configured (established 4096 bind 4096)
[    0.690229] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.690249] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.690366] NET: Registered protocol family 1
[    0.690731] RPC: Registered named UNIX socket transport module.
[    0.690740] RPC: Registered udp transport module.
[    0.690748] RPC: Registered tcp transport module.
[    0.690754] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.691662] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
[    0.694542] workingset: timestamp_bits=14 max_order=19 bucket_order=5
[    0.702004] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.702714] NFS: Registering the id_resolver key type
[    0.702735] Key type id_resolver registered
[    0.702743] Key type id_legacy registered
[    0.702784] ntfs: driver 2.1.32 [Flags: R/O].
[    0.703946] bounce: pool size: 64 pages
[    0.704090] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.704100] io scheduler noop registered
[    0.704108] io scheduler deadline registered
[    0.704240] io scheduler cfq registered (default)
[    0.708606] pinctrl-single 4a003400.pinmux: please update dts to use #pinctrl-cells = <1>
[    0.709151] pinctrl-single 4a003400.pinmux: 282 pins at pa fc003400 size 1128
[    0.712528] OF: PCI: host bridge /ocp/axi@0/pcie@51000000 ranges:
[    0.712541] OF: PCI:   No bus range found for /ocp/axi@0/pcie@51000000, using [bus 00-ff]
[    0.712574] OF: PCI:    IO 0x20003000..0x20012fff -> 0x00000000
[    0.712595] OF: PCI:   MEM 0x20013000..0x2fffffff -> 0x20013000
[    1.713980] dra7-pcie 51000000.pcie: phy link never came up
[    1.714154] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00
[    1.714167] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.714179] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    1.714189] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
[    1.714563] PCI: bus0: Fast back to back transfers disabled
[    1.714681] PCI: bus1: Fast back to back transfers enabled
[    1.714799] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    1.714816] pci 0000:00:00.0: BAR 1: assigned [mem 0x20020000-0x2002ffff]
[    1.714830] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.715050] pcieport 0000:00:00.0: Signaling PME through PCIe PME interrupt
[    1.716070] backlight supply power not found, using dummy regulator
[    1.777766] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[    1.781002] 48422000.serial: ttyS7 at MMIO 0x48422000 (irq = 301, base_baud = 3000000) is a 8250
[    1.781850] 4ae2b000.serial: ttyS9 at MMIO 0x4ae2b000 (irq = 302, base_baud = 3000000) is a 8250
[    2.753510] console [ttyS9] enabled
[    2.758909] omap_rng 48090000.rng: OMAP Random Number Generator ver. 20
[    2.765698] [drm] Initialized
[    2.770606] OMAP DSS rev 6.1
[    2.773946] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops)
[    2.782386] omapdss_dss 58000000.dss: bound 58040000.encoder (ops hdmi5_component_ops)
[    2.792170] AUPERS INFO : display.c omapdss_register_display() disp_num_counter:0 display:1
[    2.800671] DBG : dssdev->name(hdmi) at omapdss_register_display
[    2.807039] display@0 supply vcc not found, using dummy regulator
[    2.813308] AUPERS INFO : display.c omapdss_register_display() disp_num_counter:0 display:0
[    2.821803] DBG : dssdev->name(lcd) at omapdss_register_display
[    2.827886] display@1 supply vcc not found, using dummy regulator
[    2.834118] AUPERS INFO : display.c omapdss_register_display() disp_num_counter:0 display:2
[    2.842612] DBG : dssdev->name(lcd1) at omapdss_register_display
[    2.879426] brd: module loaded
[    2.887655] loop: module loaded
[    2.921982] libphy: Fixed MDIO Bus: probed
[    2.979070] davinci_mdio 48485000.mdio: davinci mdio revision 1.6
[    2.985197] libphy: 48485000.mdio: probed
[    2.993561] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver Micrel KSZ9031 Gigabit PHY
[    3.003303] davinci_mdio 48485000.mdio: phy[2]: device 48485000.mdio:02, driver Micrel KSZ9031 Gigabit PHY
[    3.013515] cpsw 48484000.ethernet: Detected MACID = fc:0f:4b:ad:f7:b4
[    3.020202] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies)
[    3.028499] cpsw 48484000.ethernet: cpsw: Detected MACID = fc:0f:4b:ad:f7:b5
[    3.036883] mousedev: PS/2 mouse device common for all mice
[    3.042811] i2c /dev entries driver
[    3.049015] gpio-fan gpio_fan: GPIO fan initialized
[    3.055155] tmp102 0-0048: initialized
[    3.064040] omap_hsmmc 4809c000.mmc: Got CD GPIO
[    3.129524] omap_hsmmc 480b4000.mmc: no pinctrl state for sdr25 mode
[    3.135904] omap_hsmmc 480b4000.mmc: no pinctrl state for sdr12 mode
[    3.279945] ledtrig-cpu: registered to indicate activity on CPUs
[    3.290641] NET: Registered protocol family 10
[    3.305759] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    3.312113] NET: Registered protocol family 17
[    3.316713] Key type dns_resolver registered
[    3.321111] omap_voltage_late_init: Voltage driver support not added
[    3.327557] Power Management for TI OMAP4+ devices.
[    3.332653] Registering SWP/SWPB emulation handler
[    3.346511] dmm 4e000000.dmm: initialized all PAT entries
[    3.379077] DBG : tryt to call omapdss_device_is_connected. at hdmic_connect
[    3.405938] mmc1: new DDR MMC card at address 0001
[    3.409718] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    3.409722] [drm] No driver support for vblank timestamp query.
[    3.423433] [drm] Enabling DMM ywrap scrolling
[    3.433845] mmcblk1: mmc1:0001 Q2J54A 3.64 GiB
[    3.444036] mmcblk1boot0: mmc1:0001 Q2J54A partition 1 2.00 MiB
[    3.444188] mmcblk1boot1: mmc1:0001 Q2J54A partition 2 2.00 MiB
[    3.445114]  mmcblk1: p1 p2
[    3.508235] Console: switching to colour frame buffer device 240x45
[    3.540785] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
[    3.580511] hctosys: unable to open rtc device (rtc0)
[    3.586115] aic_dvdd_fixed: disabling
[    3.589817] vmmcwl_fixed: disabling
[    3.593484] ldousb: disabling
[    3.596719] ALSA device list:
[    3.599716]   No soundcards found.
[    3.626970] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.635161] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    3.641967] devtmpfs: mounted
[    3.646046] Freeing unused kernel memory: 2048K (c0e00000 - c1000000)
[    3.761505] systemd[1]: System time before build time, advancing clock.
[    3.790255] systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
[    3.808705] systemd[1]: Detected architecture arm.

Welcome to Arago 2017.05!

[    3.839522] systemd[1]: Set hostname to <am57xx-evm>.
[    4.035544] systemd[1]: alignment.service: Found ordering cycle on alignment.service/start
[    4.043911] systemd[1]: alignment.service: Found dependency on sysinit.target/start
[    4.051679] systemd[1]: alignment.service: Found dependency on alignment.service/start
[    4.059673] systemd[1]: alignment.service: Breaking ordering cycle by deleting job alignment.service/start
[    4.069474] systemd[1]: alignment.service: Job alignment.service/start deleted to break ordering cycle starting with alignment.service/start
[ SKIP ] Ordering cycle found, skipping alignment.service
[    4.121505] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[    4.159240] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on Journal Socket.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Paths.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Listening on Syslog Socket.
[  OK  ] Created slice System Slice.
         Starting Load Kernel Modules...
[    4.454471] cmemk: loading out-of-tree module taints kernel.
[    4.460924] CMEMK module: reference Linux version 4.9.28
[    4.466976] allocated heap buffer 0x40500000 of size 0x100000
         [    4.475490] allocated heap buffer 0xa0100000 of size 0x12800000
Mounting POSIX Message Queue File System...
[    4.482243] allocated heap buffer 0x40400000 of size 0x100000
[    4.491979] cmemk initialized
[  OK  ] Reached target Slices.
[    4.510676] cryptodev: driver 1.8 loaded.
         Starting Create Static Device Nodes in /dev...
         Mounting Debug File System...
         Starting Setup Virtual Console...
[  OK  ] Created slice system-getty.slice.
         Starting Remount Root and Kernel File Systems...
[    4.671209] EXT4-fs (mmcblk1p2): re-mounted. Opts: (null)
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Reached target Swap.
         Mounting Temporary Directory...
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on Journal Socket (/dev/log).
         Starting Journal Service...
[  OK  ] Listening on Network Service Netlink Socket.
[  OK  ] Mounted Debug File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Temporary Directory.
[  OK  ] Started Journal Service.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Setup Virtual Console.
[  OK  ] Started Remount Root and Kernel File Systems.
         Starting udev Coldplug all Devices...
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /media/ram...
         Mounting /var/volatile...
         Starting udev Kernel Device Manager...
         Mounting Configuration File System...
         Starting Apply Kernel Variables...
         Starting Flush Journal to Persistent Storage...
[  OK  ] Mounted Configuration File System.
[  OK  ] Mounted /var/volatile.
[  OK  ] Mounted /media/ram.
[  OK  ] Started udev Kernel Device Manager.
[FAILED] Failed to start Apply Kernel Variables.
See 'systemctl status systemd-sysctl.service' for details.
[    5.608835] systemd-journald[125]: Received request to flush runtime journal from PID 1
         Starting Load/Save Random Seed...
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Started Load/Save Random Seed.
[    5.945106] omap-rproc 58820000.ipu: assigned reserved memory node ipu1_cma@9f000000
[    5.995862] remoteproc remoteproc0: 58820000.ipu is available
[  OK  ] Started udev Coldplug all Devices.
[    6.022669] remoteproc remoteproc0: Direct firmware load for dra7-ipu1-fw.xem4 failed with error -2
[    6.035362] omap-rproc 55020000.ipu: assigned reserved memory node ipu2_cma@95800000
[    6.035442] remoteproc remoteproc1: 55020000.ipu is available
[    6.035576] omap-rproc 40800000.dsp: assigned reserved memory node dsp1_cma@99000000
[    6.035659] remoteproc remoteproc2: 40800000.dsp is available
[    6.035883] omap-rproc 41000000.dsp: assigned reserved memory node dsp2_cma@9d000000
[    6.035959] remoteproc remoteproc3: 41000000.dsp is available
[    6.100170] remoteproc remoteproc0: powering up 58820000.ipu
[    6.137066] remoteproc remoteproc0: Direct firmware load for dra7-ipu1-fw.xem4 failed with error -2
[    6.180291] remoteproc remoteproc0: request_firmware failed: -2
[    6.219723] remoteproc remoteproc2: Direct firmware load for dra7-dsp1-fw.xe66 failed with error -2
[    6.230444] remoteproc remoteproc3: Direct firmware load for dra7-dsp2-fw.xe66 failed with error -2
[    6.230452] remoteproc remoteproc3: powering up 41000000.dsp
[    6.230479] remoteproc remoteproc3: Direct firmware load for dra7-dsp2-fw.xe66 failed with error -2
[    6.230484] remoteproc remoteproc3: request_firmware failed: -2
[    6.237413] omap-des 480a5000.des: OMAP DES hw accel rev: 2.2
[    6.251869] omap-des 480a5000.des: will run requests pump with realtime priority
[    6.293910] mt9t11x: disagrees about version of symbol gpiod_set_value_cansleep
[    6.293914] mt9t11x: Unknown symbol gpiod_set_value_cansleep (err -22)
[    6.295307] remoteproc remoteproc1: powering up 55020000.ipu
[    6.295316] remoteproc remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3743164
[    6.295381] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
[    6.325359] pixcir_i2c_ts: disagrees about version of symbol gpiod_get_value_cansleep
[    6.325366] pixcir_i2c_ts: Unknown symbol gpiod_get_value_cansleep (err -22)
[    6.325654] pixcir_i2c_ts: disagrees about version of symbol gpiod_set_value_cansleep
[    6.325658] pixcir_i2c_ts: Unknown symbol gpiod_set_value_cansleep (err -22)
[    6.330189] palmas-rtc 48070000.i2c:tps659038@58:tps659038_rtc: rtc core: registered 48070000.i2c:tps659 as rtc1
[    6.353397] extcon_palmas: disagrees about version of symbol gpiod_get_value_cansleep
[    6.353402] extcon_palmas: Unknown symbol gpiod_get_value_cansleep (err -22)
[    6.353442] extcon_palmas: disagrees about version of symbol gpiod_to_irq
[    6.353445] extcon_palmas: Unknown symbol gpiod_to_irq (err -22)
[    6.353458] extcon_palmas: disagrees about version of symbol gpiod_set_debounce
[    6.353461] extcon_palmas: Unknown symbol gpiod_set_debounce (err -22)
[    6.389957] mt9t11x: disagrees about version of symbol gpiod_set_value_cansleep
[    6.389962] mt9t11x: Unknown symbol gpiod_set_value_cansleep (err -22)
[    6.423522] pixcir_i2c_ts: disagrees about version of symbol gpiod_get_value_cansleep
[    6.423527] pixcir_i2c_ts: Unknown symbol gpiod_get_value_cansleep (err -22)
[    6.423546] pixcir_i2c_ts: disagrees about version of symbol gpiod_set_value_cansleep
[    6.423549] pixcir_i2c_ts: Unknown symbol gpiod_set_value_cansleep (err -22)
[    6.443044] extcon_palmas: disagrees about version of symbol gpiod_get_value_cansleep
[    6.443049] extcon_palmas: Unknown symbol gpiod_get_value_cansleep (err -22)
[    6.443121] extcon_palmas: disagrees about version of symbol gpiod_to_irq
[    6.443125] extcon_palmas: Unknown symbol gpiod_to_irq (err -22)
[    6.443146] extcon_palmas: disagrees about version of symbol gpiod_set_debounce
[    6.443150] extcon_palmas: Unknown symbol gpiod_set_debounce (err -22)
[    6.493967] omap_rtc 48838000.rtc: rtc core: registered 48838000.rtc as rtc2
[    6.510935] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
[    6.540254] vpe 489d0000.vpe: Device registered as /dev/video0
[    6.585231] vip 48990000.vip: loading firmware vpdma-1b8.bin
[    6.615302] SCSI subsystem initialized
[    6.700763] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    6.703261] ahci 4a140000.sata: SSS flag set, parallel bus scan disabled
[    6.703282] ahci 4a140000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode
[    6.703289] ahci 4a140000.sata: flags: 64bit ncq sntf stag pm led clo only pmp pio slum part ccc apst
[    6.903126] remoteproc remoteproc2: powering up 40800000.dsp
[    6.903159] remoteproc remoteproc2: Direct firmware load for dra7-dsp1-fw.xe66 failed with error -2
[    6.903165] remoteproc remoteproc2: request_firmware failed: -2
[    6.942276] scsi host0: ahci
[    6.942561] ata1: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a1410ff] port 0x100 irq 345
[    6.943064] omap-sham 4b101000.sham: hw accel on OMAP rev 4.3
[    6.959080] vip 48990000.vip: VPDMA firmware loaded
[    6.982016] omap-aes 4b500000.aes: OMAP AES hw accel rev: 3.3
[    7.001377] omap-aes 4b500000.aes: will run requests pump with realtime priority
[    7.052022] omap-aes 4b700000.aes: OMAP AES hw accel rev: 3.3
[    7.060286] omap-aes 4b700000.aes: will run requests pump with realtime priority
[    7.098385] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1
[    7.110113] virtio_rpmsg_bus virtio0: rpmsg host is online
[    7.110131] remoteproc remoteproc1: registered virtio0 (type 7)
[    7.110137] remoteproc remoteproc1: remote processor 55020000.ipu is now up
[    7.117430] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x65
[    7.118558] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x66
[    7.282933] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[  OK  ] Found device /dev/ttyS9.
[    7.439103] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    7.451191] ata1.00: ATA-8: TOSHIBA DT01ABA300V, MZ6OACA0, max UDMA/133
[    7.457863] ata1.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    7.525608] ata1.00: configured for UDMA/133
[    7.548422] scsi 0:0:0:0: Direct-Access     ATA      TOSHIBA DT01ABA3 ACA0 PQ: 0 ANSI: 5
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[  OK  ] Created slice system-systemd\x2dbacklight.slice.
         Starting Load/Save Screen Backlight...htness of backlight:backlight...
[  OK  ] Started Load/Save Screen Backlight Brightness of backlight:backlight.
[    7.848852] ti-pruss 4b200000.pruss: creating PRU cores and other child platform devices
[    7.861837] irq: no irq domain found for /ocp/pruss_soc_bus@4b226000/pruss@4b200000/intc@4b220000 !
[    7.875116] rpmsg_rpc virtio0.rpmsg-rpc.-1.101: probing service dce-callback with src 1024 dst 101
[    8.319195] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    8.370879] hub 2-1:1.0: USB hub found
[    8.375716] hub 2-1:1.0: 4 ports detected
[    8.489088] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    8.690877] hub 1-1:1.0: USB hub found
[    8.694300] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[[    8.718325] hub 1-1:1.0: 4 ports detected
  OK  ] Found device TOSHIBA_DT01ABA300V Linux\x2fWindows\x20data.
[    8.777649] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
[  OK  ] Found device TOSHIBA_DT01ABA300V Linux\x2fWindows\x20data.
[    8.860127] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
[  OK  ] Found device TOSHIBA_DT01ABA300V Linux\x2fWindows\x20data.
[    9.172617] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Found device TOSHIBA_DT01ABA300V Linux\x2fWindows\x20data.
         Starting Update UTMP about System Boot/Shutdown...
         Starting Network Time Synchronization...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.
         Starting Synchronize System and HW clocks...
[FAILED] Failed to start Synchronize System and HW clocks.
See 'systemctl status sync-clocks.service' for details.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Listening on dropbear.socket.
[  OK  ] Listening on RPCbind Server Activation Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Login Service...
         Starting Telephony service...
[  OK  ] Started System Logging Service.
         Starting uim-sysfs.service...
         Starting TI MultiCore Tools Daemon...
         Starting Avahi mDNS/DNS-SD Stack...
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Telephony service.
[   10.222702] Bluetooth: Core ver 2.22
[   10.226356] NET: Registered protocol family 31
[[   10.233664] Bluetooth: HCI device and connection manager initialized
  OK  ] Started Avahi mDNS/DNS-SD Stack.
[   10.240952] Bluetooth: HCI socket layer initialized
[   10.249715] Bluetooth: L2CAP socket layer initialized
[   10.254815] Bluetooth: SCO socket layer initialized
         Starting Network Service...
         Starting Print notice about GPLv3 packages...
[  OK  ] Started Kernel Logging Service.
[  OK  ] Started TI MultiCore Tools Daemon.
[  OK  ] Started Login Service.
[  OK  ] Started Network Service.
[  OK  ] Reached target Network.
[   10.362042] net eth1: initializing cpsw version 1.15 (0)
[   10.383177] net eth0: initialized cpsw ale version 1.4
[   10.383182] net eth0: ALE Table size 1024
         Starting Permit User Sessions...
[  OK  ] Started strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf.
         Starting Simple Network Management Protocol (SNMP) Daemon....
         Starting Enable and configure wl18xx bluetooth stack...
         Starting Network Name Resolution...
         Starting Lightning Fast Webserver With Light System Requirements...
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyS9.
[   10.539252] Micrel KSZ9031 Gigabit PHY 48485000.mdio:02: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:02, irq=-1)
[   10.612402] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[  OK  ] Started Lightning Fast Webserver With Light System Requirements.
[  OK  ] Started Enable and configure wl18xx bluetooth stack.
[  OK  ] Started Network Name Resolution.
[   10.689817] NET: Registered protocol family 15
[   10.694019] net eth0: initializing cpsw version 1.15 (0)
[   10.823168] Micrel KSZ9031 Gigabit PHY 48485000.mdio:01: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=48485000.mdio:01, irq=-1)
[   10.876089] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   10.921095] Initializing XFRM netlink socket
[  OK  ] Started Simple Network Management Protocol (SNMP) Daemon..
[   11.302579] random: crng init done
[  OK  ] Started uim-sysfs.service.
         Starting rc.pvr.service...
***************************************************************
**************************************************************[   11.851665] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
*
NOTICE: This file system contains the following GPLv3 packages:
        autoconf
        binutils-dev
        binutils
        bison-dev
        bison
        cpp-symlinks
        cpp
        dosfstools
        g++-symlinks
        g++
        gawk-dev
        gawk
        gcc-symlinks
        gcc
        gdb
        gdbc6x
        gdbserver
        gstreamer1.0-libav
        hidapi
        libcairo-perf-utils
        libgmp10
        libidn11
        libmpc3
        libmpfr4
        libreadline-dev
        libreadline6
        m4-dev
        m4
        make
        nettle
        parted
        swig-dev
        swig

If you do not wish to distribute GPLv3 components please remove
the above packages prior to distribution.  This can be done using
the opkg remove command.  i.e.:
    opkg remove <package>
Where <package> is the name printed in the list above

NOTE: If the package is a dependency of another package you
      will be notified of the dependent packages.  You should
      use the --force-removal-of-dependent-packages option to
      also remove the dependent packages as well
***************************************************************
***************************************************************
[  OK  ] Started rc.pvr.service.
[  OK  ] Started Print notice about GPLv3 packages.
         Starting weston.service...
[  OK  ] Started weston.service.
         Starting telnetd.service...
         Starting tiipclad-daemon.service...
[  OK  ] Started telnetd.service.
[   12.174195] Err : fb is NULL. at __setplane_internal
[  OK  ] Started tiipclad-daemon.service.
         Starting thttpd.service...
[  OK  ] Started thttpd.service.
         Starting rng-tools.service...
[  OK  ] Started rng-tools.service.
         Starting SYSV: The kdump script provides the support:...
[FAILED] Failed to start SYSV: The kdump script provides the support:.
See 'systemctl status kdump.service' for details.
         Starting gdbserverproxy.service...
[  OK  ] Started gdbserverproxy.service.
         Starting matrix-gui-2.0.service...
[  OK  ] Started matrix-gui-2.0.service.
         Starting thermal-zone-init.service...
[  OK  ] Started thermal-zone-init.service.
[   14.007697] cpsw 48484000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   14.015797] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

 _____                    _____           _         _  
|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_| 
              |___|                    |___|           

Arago Project http://arago-project.org am57xx-evm ttyS9

Arago 2017.05 am57xx-evm ttyS9

am57xx-evm login:
 _____          

  • Hi, aupers,

    What type of CMEM do you get when calling CMEM_alloc2()? Is it from CMEM_HEAP and CACHED? Are you able to confirm the memory is from OCMC?

    Rex
  • Thank you for your reply.
    The type of cmem is CMEM_HEAP, the flag is CMEM_NONCACHED, and the alignment is zero.
    The virtual address received by CMEM_alloc2 function is 0x40400000 in CMEM_getPhys function.
  • Please give any other advice on resolving this issue.

  • Hi, aupers,

    Sorry for the slow response. I was out since 7/6 and just came back yesterday.

    The address allocated at 0x40400000 doesn't match up with the dts file. The dts file has only ocmc3 defined.
    Is the dts file not the correct one?

    You also have CMEM_NONCACHED. Could you try with cached to see if it improves.

    Rex
  • sorry for late answer.

    I'm sorry to confuse you.
    I confirmed that I was wrongly asked the dts file.

    It was an original source file, and this is what I modified.

    / {
    reserved-memory {
    #address-cells = <2>;
    #size-cells = <2>;
    ranges;

    cmem_block_mem_0: cmem_block_mem@a0000000 {
    reg = <0x0 0xa0000000 0x0 0x100000>;
    no-map;
    status = "okay";
    };

    cmem_block_ocmc3: cmem_block_mem@40500000 {
    reg = <0x0 0x40500000 0x0 0x100000>;
    no-map;
    status = "okay";
    };

    cmem_block_mem_1: cmem_block_mem@a0100000 {
    reg = <0x0 0xa0100000 0x0 0x12800000>;
    no-map;
    status = "okay";
    };

    cmem_block_ocmc2: cmem_block_mem@40400000 {
    reg = <0x0 0x40400000 0x0 0x100000>;
    no-map;
    status = "okay";
    };
    };

    cmem {
    compatible = "ti,cmem";
    #address-cells = <1>;
    #size-cells = <0>;

    #pool-size-cells = <2>;

    status = "okay";

    cmem_block_0: cmem_block@0 {
    reg = <0>;
    memory-region = <&cmem_block_mem_0>;
    cmem-buf-pools = <1 0x0 0x100000>;
    };

    cmem_block_1: cmem_block@1 {
    reg = <1>;
    memory-region = <&cmem_block_ocmc3>;
    };

    cmem_block_2: cmem_block@2 {
    reg = <2>;
    memory-region = <&cmem_block_mem_1>;
    };

    cmem_block_3: cmem_block@3 {
    reg = <3>;
    memory-region = <&cmem_block_ocmc2>;
    };
    };
    };

    There was no difference in speed between cached and noncached.

  • Hi, Aupers,

    The configuration looks good, but I am not sure what could cause the issue.

    Rex
  • Hi, Aupers,

    I tested the performance and my result for malloc is only about 2x faster than OCMC (please see below), not your 10-20x. This is due to ARM hardware page alignment when doing memcpy using malloc. We had similar issue on KS2 devices. OCMC performance can be improved by enabling SMP bit of ARM L2ACTLR register. We are doing some experiment to enable that bit on AM57x to see if it makes any difference. If it does, we'll suggest the development team to merge that code from KS2 to AM57x device (and all ARM devices).

    Memcpy from DDR to DDR is 29361 clock ticks
    from OCMC2 to OCMC2 is 50385 clock ticks
    from OCMC3 to OCMC3 is 48495 clock ticks
    using malloc to malloc 23409 clock ticks

    Rex
  • Hi,

    We tried enabling SMP bit by adding codes (shown below) in cmem_init() in cmemk.c and replaced the cmem.ko in the filesystem.

    #endif /* KERNEL_VERSION >= 3.14.0 */

    + {
    + u32 val;
    + asm volatile("mcr p15, 0, %0, c15, c0, 0" :: "r"(1<<6));
    + asm volatile("mrc p15, 0, %0, c15, c0, 0" : "=r"(val));
    + printk("val = %x\n", val);
    + }

    if ((err = cl_config()) != 0) {
    __E("error %d processing command line\n", err);
    return err;
    }

    The results (in number of clock ticks) I got before and after SMP bit enabled aren’t significant:

    Before After
    Memcpy from DDR to DDR is 29361 26528
    From OCMC2 to OCMC2 is 50385 46470
    From OCMC3 to OCMC3 is 48495 47878
    Using malloc is 23409 22105

    Also, OCMC performance I observed is only 2x slower than using malloc, not 10-20x as your observation.
    With 10-20x slower, it could be caused by CMEM not having Cache enabled.

    After discussing the results internally, the explanation for the behavior is due to ARM hardware page alignment when doing memcpy using malloc.

    Rex
  • Thank you Rex Chang.
    It helped me a lot.