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.

AM5728: 4GB DDR3 not recognised in u-boot

Part Number: AM5728

Hello,

I have a custom board based on TI's AM5728 EVM. I am using the latest Linux PSDK 6.03 on it.

With reference to the thread -  https://e2e.ti.com/support/processors-group/processors/f/processors-forum/854792/am5726-4gb-ddr3-not-recognized-in-linux, I am trying to increase RAM size to 4 GB and I have done all the changes as suggested.

The uBoot starts and it returns the following info:

=> bdinfo
arch_number = 0x00000000
boot_params = 0x80000100
DRAM bank   = 0x00000000
-> start    = 0x80000000
-> size     = 0x7f000000
DRAM bank   = 0x00000001
-> start    = 0x00000000
-> size     = 0x80000000
baudrate    = 115200 bps
TLB addr    = 0xfeff0000
relocaddr   = 0xfef63000
reloc off   = 0x7e763000
irq_sp      = 0xfcf21a30
sp start    = 0xfcf21a20
Early malloc usage: 11d0 / 2000
fdt_blob    = 0xfcf21a48

 

According to the above thread, CONFIG_PHYS_64BIT=y,  needs to be set in .config to make "start" & "size" 64-bit variable. I have already enabled this in my .config.

But still, I am getting DRAM bank 2's "start" address wrong.  Also, I am getting following output when I run meminfo command -

=> meminfo

DRAM: 2 GiB

I don't understand why am I still getting RAM size as 2 GiB? Can you suggest what am I missing here?

Regards,

Devashish

  • Hi Devashish,

    There are multiple changes in that thread before that change finally got it working. Have you tried all the changes in the e2e?

    - Keerthy

  • Hi Keerthy,

    Yes, I think I have done all the changes that are relevant to me. For your perusal, I am pointing them out here -

    1.   In the board/ti/am57xx/board.c following changes are done -

    static const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
    .dmm_lisa_map_0 = 0x00000000,
    .dmm_lisa_map_1 = 0x00000000,
    .dmm_lisa_map_2 = 0x80740300,
    .dmm_lisa_map_3 = 0xFF020100,
    .is_ma_present = 0x1
    };

    Also changed the content of the following structures, values of which were generated using EMIF tool.

    const struct emif_regs beagle_x15_emif1_ddr3_532mhz_emif_regs

    static const u32 beagle_x15_emif1_ddr3_ext_phy_ctrl_const_regs[]

    const struct emif_regs beagle_x15_emif2_ddr3_532mhz_emif_regs

    static const u32 beagle_x15_emif2_ddr3_ext_phy_ctrl_const_regs[]

    const struct ctrl_ioregs AM572x_DDR3L_532MHz_TI_AM572x_EVM_ctrl_ioregs

    Also added following function -

    int dram_init_banksize(void){
    u64 ram_size;

    ram_size = 0x100000000;

    gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
    gd->bd->bi_dram[0].size = get_effective_memsize();
    gd->bd->bi_dram[1].start = 0x200000000;
    gd->bd->bi_dram[1].size = ram_size - CONFIG_MAX_MEM_MAPPED;

    return 0;
    }

    2. In include/configs/am57xx_evm.h following changes done -

    #define CONFIG_VERY_BIG_RAM
    #define CONFIG_MAX_MEM_MAPPED 0x80000000
    #define CONFIG_NR_DRAM_BANKS 2

    3. In .config following feature was enabled -

    CONFIG_PHYS_64BIT=y

    Regards,

    Devashish

  • Hi Devashish,

    Are you able to boot to Linux? Can you share the full boot logs.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Please find the attached boot logs (u-boot + kernel). 

    U-Boot SPL 2019.01-g323d514-dirty (May 18 2021 - 16:12:27 +0530)
    DRA752-GP ES2.0
    
    Trying to boot from MMC1
    env_init: Environment FAT init done (ret=-2)
    env_init: Environment MMC init done (ret=-2)
    Loading Environment from FAT... 
    
     Reading file uboot.env 
    *** Warning - bad CRC, using default environment
    
    U-Boot 2019.01-g323d514-dirty (May 18 2021 - 16:12:27 +0530)
    
    U-Boot code: 80800000 -> 808728C0  BSS: -> 8088EF68
    CPU  : DRA752-GP ES2.0
    Model: TI AM5728 BeagleBoard-X15
    Board: AM572x EVM REV 
    DRAM:  >>sdram_init()
    Monitor len: 0008EF68
    Ram size: 7F000000
    Ram top: FF000000
    TLB table from feff0000 to feff5000
    Reserving 571k for U-Boot at: fef61000
    Reserving 32896k for malloc() at: fcf41000
    Reserving 112 Bytes for Board Info at: fcf40f90
    Reserving 232 Bytes for Global Data at: fcf40ea8
    Reserving 136288 Bytes for FDT at: fcf1fa48
    
    RAM Configuration:
    Bank #0: 80000000 2 GiB
    Bank #1: 200000000 2 GiB
    
    DRAM:  4 GiB
    New Stack Pointer is: fcf1fa20
    Relocation Offset is: 7e761000
    Relocating to fef61000, new gd at fcf40ea8, sp at fcf1fa20
    Loading Environment from FAT... 
    
     Reading file uboot.env 
    *** Warning - bad CRC, using default environment
    
    omap24_i2c_findpsc: speed [kHz]: 400 psc: 0x9 sscl: 0x9 ssch: 0x3
    omap24_i2c_findpsc: speed [kHz]: 400 psc: 0x9 sscl: 0x9 ssch: 0x3
    Timed out in wait_for_event: status=1000
    Check if pads/pull-ups of bus are properly configured
    dm_i2c_probe: bus='i2c@48070000', address 50, ret=1
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 58, ret=1
    Cannot detect I2C chip 58 on bus 0
    unable to get I2C bus. ret 1
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 58, ret=1
    Cannot detect I2C chip 58 on bus 0
    unable to get I2C bus. ret 1
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 58, ret=1
    Cannot detect I2C chip 58 on bus 0
    unable to get I2C bus. ret 1
    Warning: fastboot.board_rev: unknown board revision
    Timed out in wait_for_bb: status=1000
    i2c_get_chip_for_busnum: bus='i2c@48070000', address 38, ret=1
    Cannot detect I2C chip 38 on bus 0
    am57x_idk_lcd_detect: Failed to get I2C device 0/56 (ret 1)
    Net:   Could not get PHY for ethernet@48484000: addr 1
    
    Warning: ethernet@48484000 using MAC address from ROM
    eth0: ethernet@48484000
    Hit any key to stop autoboot:  2  1  0 
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    ** Unable to read file boot.scr **
    1521 bytes read in 2 ms (742.2 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc0 ...
    Running uenvcmd ...
    1 bytes read in 1 ms (1000 Bytes/s)
    Already setup.
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    4448768 bytes read in 199 ms (21.3 MiB/s)
    88425 bytes read in 7 ms (12 MiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 8ffe7000, end 8ffff968 ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.19.94-gbe5389fd85 (root@cdot-ProLiant-BL460c-Gen9) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #4 SMP PREEMPT Tue May 18 11:29:32 IST 2021
    [    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 AM5728 BeagleBoard-X15 rev C
    [    0.000000] Memory policy: Data cache writealloc
    [    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-memory@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-memory@99000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009d000000, size 32 MiB
    [    0.000000] OF: reserved mem: initialized node ipu1-memory@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 dsp2-memory@9f000000, compatible id shared-dma-pool
    [    0.000000] cma: Reserved 24 MiB at 0x00000000fd800000
    [    0.000000] OMAP4: Map 0x000000027fd00000 to (ptrval) for dram barrier
    [    0.000000] Hit pending asynchronous external abort (FSR=0x00001211) during first unmask, this is most likely caused by a firmware/bootloader bug.
    [    0.000000] DRA752 ES2.0
    [    0.000000] random: get_random_bytes called from start_kernel+0xb4/0x470 with crng_init=0
    [    0.000000] percpu: Embedded 15 pages/cpu s32396 r8192 d20852 u61440
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 984384
    [    0.000000] Kernel command line: console=ttyS2,115200n8 root=PARTUUID=128e7abf-02 rw rootfstype=ext4 rootwait
    [    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: 3735928K/3944448K available (10240K kernel code, 335K rwdata, 2800K rodata, 2048K init, 268K bss, 52872K reserved, 155648K 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 : 0x(ptrval) - 0x(ptrval)   (12256 kB)
    [    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
    [    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 336 kB)
    [    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 269 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] 	Tasks RCU enabled.
    [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    [    0.000000] GIC: Using split EOI/Deactivate mode
    [    0.000000] OMAP clockevent source: timer1 at 32786 Hz
    [    0.000000] arch_timer: 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.000019] Switching to timer-based delay loop, resolution 162ns
    [    0.000291] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000301] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000717] Console: colour dummy device 80x30
    [    0.000762] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
    [    0.000776] pid_max: default: 32768 minimum: 301
    [    0.000901] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.000914] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.001480] CPU: Testing write buffer coherency: ok
    [    0.001518] CPU0: Spectre v2: using ICIALLU workaround
    [    0.001736] /cpus/cpu@0 missing clock-frequency property
    [    0.001758] /cpus/cpu@1 missing clock-frequency property
    [    0.001771] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.059915] Setting up static identity map for 0x80200000 - 0x80200060
    [    0.079920] rcu: Hierarchical SRCU implementation.
    [    0.100107] EFI services will not be available.
    [    0.119971] smp: Bringing up secondary CPUs ...
    [    0.200353] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    [    0.200359] CPU1: Spectre v2: using ICIALLU workaround
    [    0.200483] smp: Brought up 1 node, 2 CPUs
    [    0.200495] SMP: Total of 2 processors activated (24.59 BogoMIPS).
    [    0.200504] CPU: All CPU(s) started in HYP mode.
    [    0.200512] CPU: Virtualization extensions available.
    [    0.201100] devtmpfs: initialized
    [    0.217169] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    0.217427] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.217446] futex hash table entries: 512 (order: 3, 32768 bytes)
    [    0.220169] pinctrl core: initialized pinctrl subsystem
    [    0.220721] DMI not present or invalid.
    [    0.221002] NET: Registered protocol family 16
    [    0.222151] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.223103] omap_hwmod: l3_main_2 using broken dt data from ocp
    [    0.416649] cpuidle: using governor ladder
    [    0.416685] cpuidle: using governor menu
    [    0.427154] OMAP GPIO hardware version 0.1
    [    0.450757] No ATAGs?
    [    0.450829] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.450844] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.451687] OMAP DMA hardware revision 0.0
    [    0.463162] edma 43300000.edma: memcpy is disabled
    [    0.466577] edma 43300000.edma: TI EDMA DMA engine driver
    [    0.473834] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver (LinkedList1/2/3 supported)
    [    0.474614] evm_5v0: supplied by main_12v0
    [    0.477886] omap-iommu 40d01000.mmu: 40d01000.mmu registered
    [    0.478063] omap-iommu 40d02000.mmu: 40d02000.mmu registered
    [    0.478308] omap-iommu 58882000.mmu: 58882000.mmu registered
    [    0.478552] omap-iommu 55082000.mmu: 55082000.mmu registered
    [    0.478925] omap-iommu 41501000.mmu: 41501000.mmu registered
    [    0.479097] omap-iommu 41502000.mmu: 41502000.mmu registered
    [    0.479374] iommu: Adding device 58820000.ipu to group 1
    [    0.479454] iommu: Adding device 55020000.ipu to group 2
    [    0.479579] iommu: Adding device 40800000.dsp to group 0
    [    0.479800] iommu: Adding device 41000000.dsp to group 3
    [    0.480995] SCSI subsystem initialized
    [    0.482037] palmas 0-0058: Irq flag is 0x00000008
    [    1.521264] omap_i2c 48070000.i2c: controller timed out
    [    1.551288] palmas 0-0058: POLARITY_CTRL update failed: -110
    [    1.551659] palmas: probe of 0-0058 failed with error -110
    [    1.551908] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [    1.552441] omap_i2c 48060000.i2c: bus 2 rev0.12 at 400 kHz
    [    1.552620] media: Linux media interface: v0.10
    [    1.552665] videodev: Linux video capture interface: v2.00
    [    1.552739] pps_core: LinuxPPS API ver. 1 registered
    [    1.552748] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    1.552770] PTP clock support registered
    [    1.552800] EDAC MC: Ver: 3.0.0
    [    1.553590] omap-mailbox 48840000.mailbox: omap mailbox rev 0x400
    [    1.553850] omap-mailbox 48842000.mailbox: omap mailbox rev 0x400
    [    1.561477] Advanced Linux Sound Architecture Driver Initialized.
    [    1.562283] clocksource: Switched to clocksource arch_sys_counter
    [    1.570716] NET: Registered protocol family 2
    [    1.571335] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
    [    1.571365] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    1.571404] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
    [    1.571472] TCP: Hash tables configured (established 4096 bind 4096)
    [    1.571550] UDP hash table entries: 256 (order: 1, 8192 bytes)
    [    1.571574] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
    [    1.571698] NET: Registered protocol family 1
    [    1.592129] RPC: Registered named UNIX socket transport module.
    [    1.592139] RPC: Registered udp transport module.
    [    1.592148] RPC: Registered tcp transport module.
    [    1.592157] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    1.593179] hw perfevents: no interrupt-affinity property for /pmu, guessing.
    [    1.593394] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [    1.594336] Initialise system trusted keyrings
    [    1.594465] workingset: timestamp_bits=14 max_order=20 bucket_order=6
    [    1.599523] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    1.610027] NFS: Registering the id_resolver key type
    [    1.610050] Key type id_resolver registered
    [    1.610060] Key type id_legacy registered
    [    1.610101] ntfs: driver 2.1.32 [Flags: R/O].
    [    1.611749] Key type asymmetric registered
    [    1.611761] Asymmetric key parser 'x509' registered
    [    1.611813] bounce: pool size: 64 pages
    [    1.611846] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
    [    1.611857] io scheduler noop registered
    [    1.611866] io scheduler deadline registered
    [    1.611963] io scheduler cfq registered (default)
    [    1.611973] io scheduler mq-deadline registered
    [    1.611983] io scheduler kyber registered
    [    1.617555] pinctrl-single 4a003400.pinmux: 282 pins, size 1128
    [    1.621278] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.1
    [    1.621706] dra7-pcie 51000000.pcie: host bridge /ocp/axi@0/pcie@51000000 ranges:
    [    1.621748] dra7-pcie 51000000.pcie:    IO 0x20003000..0x20012fff -> 0x00000000
    [    1.621776] dra7-pcie 51000000.pcie:   MEM 0x20013000..0x2fffffff -> 0x20013000
    [    2.622043] dra7-pcie 51000000.pcie: Phy link never came up
    [    2.622184] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00
    [    2.622199] pci_bus 0000:00: root bus resource [bus 00-ff]
    [    2.622212] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
    [    2.622223] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
    [    2.627918] PCI: bus0: Fast back to back transfers disabled
    [    2.633124] PCI: bus1: Fast back to back transfers enabled
    [    2.633168] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff 64bit]
    [    2.633189] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
    [    2.633513] pcieport 0000:00:00.0: Signaling PME with IRQ 166
    [    2.633640] pcieport 0000:00:00.0: AER enabled with IRQ 166
    [    2.682246] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    2.685872] console [ttyS2] disabled
    [    2.685928] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 45, base_baud = 3000000) is a 8250
    [    3.694088] console [ttyS2] enabled
    [    3.699661] omap_rng 48090000.rng: Random Number Generator ver. 20
    [    3.700128] random: fast init done
    [    3.709462] random: crng init done
    [    3.719435] brd: module loaded
    [    3.728931] loop: module loaded
    [    3.736008] libphy: Fixed MDIO Bus: probed
    [    3.802315] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [    3.810011] libphy: 48485000.mdio: probed
    [    3.815160] mdio_bus 48485000.mdio: MDIO device at address 1 is missing.
    [    3.822987] mdio_bus 48485000.mdio: MDIO device at address 2 is missing.
    [    3.830257] cpsw 48484000.ethernet: Detected MACID = d0:03:eb:6c:50:22
    [    3.836897] cpsw 48484000.ethernet: initialized cpsw ale version 1.4
    [    3.843301] cpsw 48484000.ethernet: ALE Table size 1024
    [    3.848596] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies)
    [    3.856617] cpsw 48484000.ethernet: cpsw: Detected MACID = d0:03:eb:6c:50:23
    [    3.864932] i2c /dev entries driver
    [    4.952338] omap_i2c 48070000.i2c: controller timed out
    [    4.982311] tmp102 0-0048: error reading config register
    [    4.987747] tmp102: probe of 0-0048 failed with error -110
    [    4.996613] sdhci: Secure Digital Host Controller Interface driver
    [    5.002852] sdhci: Copyright(c) Pierre Ossman
    [    5.008080] sdhci-pltfm: SDHCI platform and OF driver helper
    [    5.014714] omap_gpio 4805d000.gpio: Could not set line 27 debounce to 200000 microseconds (-22)
    [    5.023575] sdhci-omap 4809c000.mmc: Got CD GPIO
    [    5.028426] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.6
    [    5.035212] sdhci-omap 4809c000.mmc: failed to set system capabilities
    [    5.041840] sdhci-omap 4809c000.mmc: Dropping the link to regulator.6
    [    5.048813] sdhci-omap 480b4000.mmc: failed to set system capabilities
    [    5.056051] ledtrig-cpu: registered to indicate activity on CPUs
    [    5.067097] NET: Registered protocol family 10
    [    5.072562] Segment Routing with IPv6
    [    5.076300] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    5.082769] NET: Registered protocol family 17
    [    5.087430] Key type dns_resolver registered
    [    5.091850] Registering SWP/SWPB emulation handler
    [    5.096689] omap_voltage_late_init: Voltage driver support not added
    [    5.103089] Power Management for TI OMAP4+ devices.
    [    5.108696] Loading compiled-in X.509 certificates
    [    5.139570] dmm 4e000000.dmm: workaround for errata i878 in use
    [    5.147279] dmm 4e000000.dmm: initialized all PAT entries
    [    5.154650] omap_gpio 4805d000.gpio: Could not set line 27 debounce to 200000 microseconds (-22)
    [    5.163503] sdhci-omap 4809c000.mmc: Got CD GPIO
    [    5.168370] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.6
    [    5.175167] sdhci-omap 4809c000.mmc: failed to set system capabilities
    [    5.181812] sdhci-omap 4809c000.mmc: Dropping the link to regulator.6
    [    5.189003] sdhci-omap 480b4000.mmc: failed to set system capabilities
    [    5.197038] omap_gpio 4805d000.gpio: Could not set line 27 debounce to 200000 microseconds (-22)
    [    5.205914] sdhci-omap 4809c000.mmc: Got CD GPIO
    [    5.210757] sdhci-omap 4809c000.mmc: Linked as a consumer to regulator.6
    [    5.217546] sdhci-omap 4809c000.mmc: failed to set system capabilities
    [    5.224194] sdhci-omap 4809c000.mmc: Dropping the link to regulator.6
    [    5.231326] sdhci-omap 480b4000.mmc: failed to set system capabilities
    [    5.238433] hctosys: unable to open rtc device (rtc0)
    [    5.244238] ALSA device list:
    [    5.247221]   No soundcards found.
    [    5.251473] Waiting for root device PARTUUID=128e7abf-02...
    [   35.672377] vdd_3v3: disabling
    [   35.675448] aic_dvdd_fixed: disabling
    [   35.679130] pbias_mmc_omap5: disabling

    Regards,

    Devashish

  • Hi Devashish,

    From your logs:

    DRAM: 4 GiB
    New Stack Pointer is: fcf1fa20

    The above clearly is indicating that u-boot has recognized 4 GB memory. You can boot to kernel
    & check there as well.

    I believe your 4GB configuration is working.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Please answer the following queries -

    1. How can I know the complete address range of 4 GB memory?

    2. I would like to test this 4 GB memory with mtest command on u-boot. What address should I specify in mtest command?

    3. As you said, u-boot has recognized 4 GB RAM, but why meminfo command is still showing DRAM = 2GB (see initial post)?

    4. bdinfo command is showing the "start" address of bank 2 as 0x00000000. But I have configured bank 2's "start" address as 0x200000000 in the board.c file in u-boot. See gd->bd->bi_dram[1].start = 0x200000000; in following snippet. What is the reason for this behavior?

    int dram_init_banksize(void){
    u64 ram_size;
    
    ram_size = 0x100000000;
    
    gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
    gd->bd->bi_dram[0].size = get_effective_memsize();
    gd->bd->bi_dram[1].start = 0x200000000;
    gd->bd->bi_dram[1].size = ram_size - CONFIG_MAX_MEM_MAPPED;
    
    return 0;
    }

    Regards,

    Devashish

  • Devashish,

    4. bdinfo command is showing the "start" address of bank 2 as 0x00000000. But I have configured bank 2's "start" address as 0x200000000 in the board.c file in u-boot. See gd->bd->bi_dram[1].start = 0x200000000; in following snippet. What is the reason for this behavior?

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/854792/am5726-4gb-ddr3-not-recognized-in-linux

    Even in the working resolved query above the same discrepancy is there.

    gd->bd->bi_dram[1].start = 0x200000000;


    => bdinfo
    arch_number = 0x00000000
    boot_params = 0x80000100
    DRAM bank   = 0x00000000
    -> start    = 0x80000000
    -> size     = 0x80000000
    DRAM bank   = 0x00000001
    -> start    = 0x00000000

    So bdinfo is not able to pick that.

    2. I would like to test this 4 GB memory with mtest command on u-boot. What address should I specify in mtest command?

    Highly recommend not to use u-boot. mtest it is known be very slow. Use memtester from kernel.

    3. As you said, u-boot has recognized 4 GB RAM, but why meminfo command is still showing DRAM = 2GB (see initial post)?

    Please try to boot to kernel as per the original thread you referred and confirm with cat /proc/meminfo

    If you are intending to debug the meminfo on u-boot recommend posting to u-boot forums: u-boot@lists.denx.de

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Thanks for responding.

    I am currently facing some issues in booting kernel on the custom board. I will get back to you after testing with cat /proc/meminfo on kernel.

    Regards,

    Devashish

  • Hi Keerthy,

    I was able to resolve issues related to the kernel. I am getting the following output now -

    root@am57xx-evm:~# cat /proc/meminfo 
    MemTotal:        3893624 kB
    MemFree:         3739584 kB
    MemAvailable:    3786372 kB
    Buffers:           14080 kB
    Cached:            80556 kB
    SwapCached:            0 kB
    Active:            44588 kB
    Inactive:          67296 kB
    Active(anon):      18560 kB
    Inactive(anon):    16568 kB
    Active(file):      26028 kB
    Inactive(file):    50728 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    HighTotal:       3388416 kB
    HighFree:        3286708 kB
    LowTotal:         505208 kB
    LowFree:          452876 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:                 0 kB
    Writeback:             0 kB
    AnonPages:         17248 kB
    Mapped:            27296 kB
    Shmem:             17884 kB
    Slab:              34328 kB
    SReclaimable:      14592 kB
    SUnreclaim:        19736 kB
    KernelStack:         768 kB
    PageTables:          772 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:     1946812 kB
    Committed_AS:     170904 kB
    VmallocTotal:     245760 kB
    VmallocUsed:           0 kB
    VmallocChunk:          0 kB
    Percpu:              288 kB
    CmaTotal:         155648 kB
    CmaFree:          154860 kB
    

    root@am57xx-evm:~# free -h
                  total        used        free      shared  buff/cache   available
    Mem:          3.7Gi        43Mi       3.6Gi        17Mi       106Mi       3.6Gi
    Swap:            0B          0B          0B
    

    From the outputs of the above commands, it is clear that 4 GB memory is detected by the kernel. But I am unable to get the address space (start address - end address) of the memory. I would like to test this memory for any bad sectors or leakage. Using the memtester command, I am only able to test 2.9 GB of memory. 

    root@am57xx-evm:~# memtester 4095 1
    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 4095MB (4293918720 bytes)
    got  2925MB (3067592704 bytes), trying mlock ...
    locked.
    Loop 1/1:
      Stuck Address       : setting   0
    
    

    How can I test the complete memory? This is critical for my board evaluation procedure.

    Regards,

    Devashish

  • Hi Devashish,

    https://www.systutorials.com/docs/linux/man/8-memtester/

    There is a clear mention of OOM getting invoked:

    "Note that it is up to you to know how much memory you can safely allocate for testing. If you attempt to allocate more memory than is available, memtester should figure that out, reduce the amount slightly, and try again. However, this can lead to memtester successfully allocating and mlocking essentially all free memory on the system -- if other programs are running, this can lead to excessive swapping and slowing the system down to the point that it is difficult to use. If the system allows allocation of more memory than is actually available (overcommit), it may lead to a deadlock, where the system halts. If the system has an out-of-memory process killer (like Linux), memtester or another process may be killed by the OOM killer."

    So memtester does not need any start address or end address. You only need to give the size.

    What is happening if you give more than 2.9 GB?

    Do note that there will some memory taken up by Linux and the process running. You can never test full 4GB.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    What is happening if you give more than 2.9 GB?

    As you can see in the previous reply, I gave 4095 MB as a parameter to memtester command. But it was able to test only 2.9 GB of memory.

    Do note that there will some memory taken up by Linux and the process running. You can never test full 4GB.

    That is the reason I wanted to test memory at u-boot (which you denied). U-boot will comparatively reserve less memory than kernel and hence it might be possible to test a larger part of memory at u-boot. But I am unable to test the upper half of 4 GB (extended 2GB) at u-boot because the start address of bank 2 is not correctly configured in bdinfo command. Therefore, it is not possible to use mtest command.

    => bdinfo
    arch_number = 0x00000000
    boot_params = 0x80000100
    DRAM bank   = 0x00000000
    -> start    = 0x80000000
    -> size     = 0x7f000000
    DRAM bank   = 0x00000001
    -> start    = 0x00000000
    -> size     = 0x80000000
    baudrate    = 115200 bps
    TLB addr    = 0xfeff0000
    relocaddr   = 0xfef63000
    reloc off   = 0x7e763000
    irq_sp      = 0xfcf21a30
    sp start    = 0xfcf21a20
    Early malloc usage: 11d0 / 2000
    fdt_blob    = 0xfcf21a48

    I have set the start address to 0x200000000 but it is showing 0x00000000.

    Kindly suggest how can I test the memory at u-boot. 

    Is there any other way by which complete memory (4 GB) can be tested?

    Regards,

    Devashish

  • Devashish,

    Please read through public documentation on u-boot mtest yourself: https://github.com/ARM-software/u-boot/blob/master/doc/README.memory-test

    Best Regards,
    Keerthy

  • Hi Keerthy,

    I understand that mtest should not be used for testing memory at u-boot.

    Also, it is not possible for me to use the POST (Power-on-self-test) method mentioned in the link you attached because it is not supported in my SDK (TI Linux PSDK 6.03 for AM5728).

    Any other way in which I can test the memory?

    Regards,

    Devashish

  • Devashish,

    You are already validating the 3GB memory. The Linux occupied memory as long as you do not see crash overnight or even multiple days.
    That memory is validated as well. You need to write your own bare metal code to check full 4GB without Linux.

    Best Regards,
    Keerthy

  • Hi Keerthy,

    I am now trying to evaluate memory using board tester software (RTOS Diagnostics) present in Processor RTOS SDK. 

    https://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_board.html#memory-ddr-test

    I'll let you know after testing it.

    Regards,

    Devashish