Tool/software: Linux
Hello,
Is there a guide or a more specific setup to follow to test all the 4 GB RAM access starting from TI android BSP? either from u-boot or kernel prompt.
Regards,
Shweta
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.
Tool/software: Linux
Hello,
Is there a guide or a more specific setup to follow to test all the 4 GB RAM access starting from TI android BSP? either from u-boot or kernel prompt.
Regards,
Shweta
Hello Yordan,
Thanks for the reply.
I am using memtester as to test the memory.
But unfortunately I am not able to test (access ) the entire 4GB size of memory. It is got around 2.9GB memory only when I try to test more then this.
root@am57xx-evm:~# memtester 3000MB memtester version 4.3.0 (32-bit) Copyright (C) 2001-2012 Charles Cazabon. Licensed under the GNU General Public License version 2 (only). pagesize is 4096 pagesizemask is 0xfffff000 want 3000MB (3145728000 bytes) got 2924MB (3066933248 bytes), trying mlock ...locked.
root@am57xx-evm:~# memtester 4000MB memtester version 4.3.0 (32-bit) Copyright (C) 2001-2012 Charles Cazabon. Licensed under the GNU General Public License version 2 (only). pagesize is 4096 pagesizemask is 0xfffff000 want 4000MB (4194304000 bytes) got 2924MB (3066933248 bytes), trying mlock ...^C
root@am57xx-evm:~# free total used free shared buff/cache available Mem: 3932996 88032 3597160 18876 247804 3790616 Swap: 0 0 0 root@am57xx-evm:~#
Please let me know why this happens and what could be root cause.
Regards,
Shweta
Hello,
what is your dmesg output it should tell you how much memory is allocated to the kernel, for example:
Memory: 364MB 270MB 959MB = 1593MB total
Memory: 1613136k/1613136k available, 19120k reserved, 883712K highmem
On the linux side you cant test entire RAM because there will be reserved memory. you should be able to do it in uboot where the memory reserved will be limited and you know what exactly regions are free.
When your uboot comes up how much ram/dram size does it print out ? you can use mtest from uboot and just keep adjusting the range of memory and have the memory tested.
Cheers,
--Prabhakar Lad
Hello Prabhar and Yorden,
below is the kernel and u-boot messages:
CPU : DRA752-GP ES2.0 Model: TI AM5728 BeagleBoard-X15 Board: UNKNOWN(BeagleBoard X15?) REV UNKNOWN DRAM: 4 GiB CONFIG_SYS_SDRAM_BASE= -2147483648: MMC: no pinctrl for sdr104
Kernel image @ 0x82000000 [ 0x000000 - 0x328a70 ] ## Flattened Device Tree blob at 88000000 Booting using the fdt blob at 0x88000000 Loading Device Tree to 8ffe3000, end 8ffff1a8 ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 4.4.19-gdb0b54cdad (ubuntu@ubuntu-OptiPlex-380) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #10 SMP PREEMPT Tue Jan 17 14:15:52 PST 2017 [ 0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache [ 0.000000] Machine model: TI AM5728 BeagleBoard-X15 [ 0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB [ 0.000000] Reserved memory: 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] Reserved memory: 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] Reserved memory: initialized node ipu1_cma@9d000000, compatible id shared-dma-pool [ 0.000000] Reserved memory: created CMA memory pool at 0x000000009f000000, size 8 MiB [ 0.000000] Reserved memory: initialized node dsp2_cma@9f000000, compatible id shared-dma-pool [ 0.000000] cma: Reserved 24 MiB at 0x00000000fd800000 [ 0.000000] Forcing write-allocate cache policy for SMP [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] OMAP4: Map 0x000000027fd00000 to fe600000 for dram barrier [ 0.000000] DRA752 ES2.0 [ 0.000000] PERCPU: Embedded 12 pages/cpu @eff27000 s19136 r8192 d21824 u49152 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 992832 [ 0.000000] Kernel command line: console=ttyO2,115200n8 root=PARTUUID=0009619d-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: 3744232K/3978240K available (6143K kernel code, 264K rwdata, 2188K rodata, 352K init, 260K bss, 45592K reserved, 188416K cma-reserved, 3363840K 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 - 0xc082b07c (8333 kB) [ 0.000000] .init : 0xc082c000 - 0xc0884000 ( 352 kB) [ 0.000000] .data : 0xc0884000 - 0xc08c6370 ( 265 kB) [ 0.000000] .bss : 0xc08c8000 - 0xc09093c4 ( 261 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
looking at log and respond of "free" command
root@am57xx-evm:~# free total used free shared buff/cache available Mem: 3933000 86316 3600408 18872 246276 3792880 Swap: 0 0 0 root@am57xx-evm:~#
I shall be able to use "free - Shared - cache" = 3335262KB but i am able to access only "2994176KB" only which around 300MB is not accessible.
below is the Calculation on am57xx EVM and our custom board
am5728 EVM = Free - shared - buff/cache = 1679744 --> able to access 1600MB = 1638400KB diff = 41344
custom board = Free - shared - buff/cache = 3331728 --> able to access 2924MB = 2994176KB diff = 337552
Can you please let me know what will be address range for test from the u-boot
I have use below commands
One more thing it is mention in "./arch/arm/mach-tegra/board.c". As i am using LPAE for supporting 4 GB ram, so pleas elet me know how can get it confirm that software configuration is okay.. and it actually support 4GB.
#ifndef CONFIG_ARM64
/*
* If all RAM fits within 32-bits, it can be accessed without
* LPAE, so go test the RAM size. Otherwise, we can't access
* all the RAM, and get_ram_size() would get confused, so
* avoid using it. There's no reason we should need this
* validation step anyway.
*/
if (emem_cfg <= (0 - PHYS_SDRAM_1) / (1024 * 1024))
size_bytes = get_ram_size((void *)PHYS_SDRAM_1,
size_bytes);
#endif
Regards
Shweta