how to downsize the DDR size

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to downsize the DDR size

844 Views
stevenyu
Contributor III

Hi All,

We have seen much memory left in our system, therefore, we plan to downsize the DDR from 512MB to 256MB.

Would you please advise where should we take care for downsizing, because it stop at starting kernel ?

U-Boot 2016.03-imx_v2016.03_4.1.15_2.0.0_ga+ga57b13b (Dec 06 2018 - 11:49:56 +0800)

CPU: Freescale i.MX6ULL rev1.0 528 MHz (running at 396 MHz)
CPU: Commercial temperature grade (0C to 95C) at 60C
Reset cause: POR
Board: MX6ULL 14x14 EVK
I2C: ready
DRAM: 512 MiB
NAND: 256 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: FEC0
Normal Boot
Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x400000, size 0x800000
8388608 bytes read: OK

NAND read: device 0 offset 0x1400000, size 0x100000
1048576 bytes read: OK
Kernel image @ 0x80800000 [ 0x000000 - 0x5ad558 ]
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Using Device Tree in place at 83000000, end 8300a81f

Starting kernel ...

Regards,

Steven Yu

Labels (1)
0 Kudos
3 Replies

661 Views
Yuri
NXP Employee
NXP Employee

Hello,

   Use chapter "Porting U-boot" of "i.MX_BSP_Porting_Guide.pdf" document of Your

NXP Linux BSP regarding memory customizing.  

  Memory configuring is implemented in U-boot.


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

661 Views
stevenyu
Contributor III

Hi Yuri,

We can pass u-boot now, however, the kernel is panic when booting as below. It looks like page allocation or DMA like issue, and it should be related to DDR size. 

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.1.15 (stephen@AdvanWISE-YG-409) (gcc version 5.3.0 (GCC) ) #2 SMP PREEMPT Fri Dec 7 14:47:37 CST 2018
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Freescale i.MX6 ULL 14x14 EVK Board
Reserved memory: failed to allocate memory for node 'linux,cma'
Memory policy: Data cache writealloc
PERCPU: Embedded 12 pages/cpu @8fdd6000 s17164 r8192 d23796 u49152
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
Kernel command line: console=ttymxc0,115200 ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs mtdparts=gpmi-nand:4m(boot),16m(kernel),2m(dtb),1m(misc),90m(rootfs),90m(rootfs2),10m(fact),-(etc)
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 248380K/262144K available (7426K kernel code, 364K rwdata, 2652K rodata, 432K init, 416K bss, 13764K reserved, 0K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0x90800000 - 0xff000000 (1768 MB)
lowmem : 0x80000000 - 0x90000000 ( 256 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.text : 0x80008000 - 0x809dfd08 (10080 kB)
.init : 0x809e0000 - 0x80a4c000 ( 432 kB)
.data : 0x80a4c000 - 0x80aa7140 ( 365 kB)
.bss : 0x80aaa000 - 0x80b12210 ( 417 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
Additional per-CPU info printed with stalls.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS:16 nr_irqs:16 16
mxc_clocksource_init 3000000
Switching to timer-based delay loop, resolution 333ns
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
clocksource mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
/cpus/cpu@0 missing clock-frequency property
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x80008280 - 0x800082d8
Brought up 1 CPUs
SMP: Total of 1 processors activated (6.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at /home2/steven/SuperWIFIap/build-fb/tmp/work-shared/imx6ull14x14evk/kernel-source/mm/page_alloc.c:2668 __alloc_pages_nodemask+0x3c8/0x894()
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.15 #2
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[<80015d78>] (unwind_backtrace) from [<8001271c>] (show_stack+0x10/0x14)
[<8001271c>] (show_stack) from [<80711600>] (dump_stack+0x84/0xc4)
[<80711600>] (dump_stack) from [<80036b68>] (warn_slowpath_common+0x80/0xb0)
[<80036b68>] (warn_slowpath_common) from [<80036c34>] (warn_slowpath_null+0x1c/0x24)
[<80036c34>] (warn_slowpath_null) from [<800b68f4>] (__alloc_pages_nodemask+0x3c8/0x894)
[<800b68f4>] (__alloc_pages_nodemask) from [<8001b58c>] (__dma_alloc_buffer+0x2c/0x84)
[<8001b58c>] (__dma_alloc_buffer) from [<8001b5fc>] (__alloc_remap_buffer+0x18/0x8c)
[<8001b5fc>] (__alloc_remap_buffer) from [<809e5928>] (atomic_pool_init+0xa4/0x164)
[<809e5928>] (atomic_pool_init) from [<80009718>] (do_one_initcall+0x8c/0x1d4)
[<80009718>] (do_one_initcall) from [<809e0dbc>] (kernel_init_freeable+0x144/0x1e4)
[<809e0dbc>] (kernel_init_freeable) from [<8070d678>] (kernel_init+0x8/0xe8)
[<8070d678>] (kernel_init) from [<8000f528>] (ret_from_fork+0x14/0x2c)
---[ end trace 97dbff5c63b8fb29 ]---
DMA: failed to allocate 20000 KiB pool for atomic coherent allocation
cpuidle: using governor ladder
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 8 bytes.
imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver
imx6ul-pinctrl 2290000.iomuxc-snvs: initialized IMX pinctrl driver
mxs-dma 1804000.dma-apbh: initialized
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
MIPI CSI2 driver module loaded
Advanced Linux Sound Architecture Driver Initialized.
Bluetooth: Core ver 2.20
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
Switched to clocksource mxc_timer1
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
imx rpmsg driver is registered.
Bus freq driver module loaded
futex hash table entries: 256 (order: 2, 16384 bytes)
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) 穢 2001-2006 Red Hat, Inc.
fuse init (API version 7.23)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
imx-weim 21b8000.weim: Driver registered.
backlight supply power not found, using dummy regulator
imx-sdma 20ec000.sdma: no event needs to be remapped
imx-sdma 20ec000.sdma: loaded firmware 3.3
imx-sdma 20ec000.sdma: initialized
2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 19, base_baud = 5000000) is a IMX
console [ttymxc0] enabled
21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 227, base_baud = 5000000) is a IMX
imx-rng 2284000.rngb: iMX RNG Registered.
imx sema4 driver is registered.
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at /home2/steven/SuperWIFIap/build-fb/tmp/work-shared/imx6ull14x14evk/kernel-source/arch/arm/mm/dma-mapping.c:498 __dma_alloc+0x220/0x228()
coherent pool not initialised!
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.1.15 #2
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[<80015d78>] (unwind_backtrace) from [<8001271c>] (show_stack+0x10/0x14)
[<8001271c>] (show_stack) from [<80711600>] (dump_stack+0x84/0xc4)
[<80711600>] (dump_stack) from [<80036b68>] (warn_slowpath_common+0x80/0xb0)
[<80036b68>] (warn_slowpath_common) from [<80036bc8>] (warn_slowpath_fmt+0x30/0x40)
[<80036bc8>] (warn_slowpath_fmt) from [<8001b980>] (__dma_alloc+0x220/0x228)
[<8001b980>] (__dma_alloc) from [<8001bab8>] (arm_dma_alloc+0x8c/0xa0)
[<8001bab8>] (arm_dma_alloc) from [<803e28b8>] (gpmi_alloc_dma_buffer+0x88/0x100)
[<803e28b8>] (gpmi_alloc_dma_buffer) from [<803e3d1c>] (gpmi_nand_probe+0x2c8/0x97c)
[<803e3d1c>] (gpmi_nand_probe) from [<803570e0>] (platform_drv_probe+0x44/0xac)
[<803570e0>] (platform_drv_probe) from [<8035597c>] (driver_probe_device+0x174/0x2b4)
[<8035597c>] (driver_probe_device) from [<80355b8c>] (__driver_attach+0x8c/0x90)
[<80355b8c>] (__driver_attach) from [<80354008>] (bus_for_each_dev+0x68/0x9c)
[<80354008>] (bus_for_each_dev) from [<8035510c>] (bus_add_driver+0x148/0x1f0)
[<8035510c>] (bus_add_driver) from [<8035618c>] (driver_register+0x78/0xf8)
[<8035618c>] (driver_register) from [<80009718>] (do_one_initcall+0x8c/0x1d4)
[<80009718>] (do_one_initcall) from [<809e0dbc>] (kernel_init_freeable+0x144/0x1e4)
[<809e0dbc>] (kernel_init_freeable) from [<8070d678>] (kernel_init+0x8/0xe8)
[<8070d678>] (kernel_init) from [<8000f528>] (ret_from_fork+0x14/0x2c)
---[ end trace 97dbff5c63b8fb2a ]---
Unable to handle kernel NULL pointer dereference at virtual address 00000004
pgd = 80004000
[00000004] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.1.15 #2
Hardware name: Freescale i.MX6 Ultralite (Device Tree)
task: 8c050000 ti: 8c054000 task.ti: 8c054000
PC is at addr_in_gen_pool+0x20/0x8c
LR is at addr_in_gen_pool+0x1c/0x8c
pc : [<802c99a8>] lr : [<802c99a4>] psr: 60000113
sp : 8c055dc0 ip : 00000000 fp : 80aaa3f8
r10: 00004000 r9 : 0000c324 r8 : 8fdf7000
r7 : 909d5000 r6 : 909d8fff r5 : 00000000 r4 : 909d5000
r3 : 00000001 r2 : 8c050000 r1 : 909d5000 r0 : 00000000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c53c7d Table: 8000406a DAC: 00000015
Process swapper/0 (pid: 1, stack limit = 0x8c054210)
Stack: (0x8c055dc0 to 0x8c056000)
5dc0: 8c0b9210 909d5000 8ff7d480 00000000 8c0b9210 8001b10c 8c324000 8001b258
5de0: 8c029010 00000000 8c1a20a0 fffffff4 80a3c9b4 80a46804 00000000 8001b270
5e00: 00000000 00000000 fffffff4 802fd788 00000000 8c1a20a0 fffffff4 8c0290b8
5e20: 8c1a26b0 802f3a90 8c1a26cc 8c1a26b0 00000000 803e3d84 00000000 808d5fd8
5e40: 8c1a2010 80a3c9b4 8c0ba870 8c2eafa0 00000000 8c0ba870 00000000 00000000
5e60: 8c2ec050 80affe14 8c0b9410 80a8289c fffffdfb 00000000 80a3c9b4 80a46804
5e80: 00000000 803570e0 80affe14 8c0b9410 80a8289c 00000000 00000000 8035597c
5ea0: 8c0b9410 80a8289c 8c0b9444 80a75b68 00000000 80355b8c 00000000 80a8289c
5ec0: 80355b00 80354008 8c03095c 8c0b4eb4 80a8289c 8c246f80 00000000 8035510c
5ee0: 8092f644 80a54820 8c2eb640 80a8289c 80a54820 8c2eb640 80a210a8 8035618c
5f00: 80a54820 80a54820 8c2eb640 80009718 80a3c990 80142364 00000000 8c031c00
5f20: 00000000 80a5ca68 60000113 00000000 8fde4f25 8fde4ec3 807428a4 8004e9cc
5f40: 00000000 8093d988 00000006 00000006 80a5ca50 000000e7 00000006 80aaa000
5f60: 000000e7 00000006 80aaa000 80aaa000 80a3c9ac 809e0dbc 00000006 00000006
5f80: 809e0594 80052fac 00000000 8070d670 00000000 00000000 00000000 00000000
5fa0: 00000000 8070d678 00000000 8000f528 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<802c99a8>] (addr_in_gen_pool) from [<8001b10c>] (__arm_dma_free+0xd0/0x1fc)
[<8001b10c>] (__arm_dma_free) from [<8001b270>] (arm_dma_free+0x18/0x20)
[<8001b270>] (arm_dma_free) from [<802fd788>] (mxs_dma_free_chan_resources+0x58/0xa4)
[<802fd788>] (mxs_dma_free_chan_resources) from [<802f3a90>] (dma_release_channel+0x24/0x94)
[<802f3a90>] (dma_release_channel) from [<803e3d84>] (gpmi_nand_probe+0x330/0x97c)
[<803e3d84>] (gpmi_nand_probe) from [<803570e0>] (platform_drv_probe+0x44/0xac)
[<803570e0>] (platform_drv_probe) from [<8035597c>] (driver_probe_device+0x174/0x2b4)
[<8035597c>] (driver_probe_device) from [<80355b8c>] (__driver_attach+0x8c/0x90)
[<80355b8c>] (__driver_attach) from [<80354008>] (bus_for_each_dev+0x68/0x9c)
[<80354008>] (bus_for_each_dev) from [<8035510c>] (bus_add_driver+0x148/0x1f0)
[<8035510c>] (bus_add_driver) from [<8035618c>] (driver_register+0x78/0xf8)
[<8035618c>] (driver_register) from [<80009718>] (do_one_initcall+0x8c/0x1d4)
[<80009718>] (do_one_initcall) from [<809e0dbc>] (kernel_init_freeable+0x144/0x1e4)
[<809e0dbc>] (kernel_init_freeable) from [<8070d678>] (kernel_init+0x8/0xe8)
[<8070d678>] (kernel_init) from [<8000f528>] (ret_from_fork+0x14/0x2c)
Code: e1a04001 e0826001 ebf6b1e7 e1a00005 (e5b03004)
---[ end trace 97dbff5c63b8fb2b ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

random: nonblocking pool is initialized

0 Kudos

661 Views
Yuri
NXP Employee
NXP Employee

Hello,

  First, please verify new memory settings (for 256MB), using the Stress test.

If it works (under 256MB) - this means 256 MB is not enough for Linux. 

https://community.nxp.com/docs/DOC-105652 

Regards,

Yuri.

0 Kudos