[meta-xilinx] uboot CONFIG_SYS_SDRAM_SIZE allocation error

Arno Steffens star at gmx.li
Thu Dec 1 02:28:59 PST 2016


Thanks Mike and Nathan for feedback.
As this is really effort to test if uboot fails (I have to flash (slow) via xilinx jtag the hole qspi) I am asking once again:

So I will delete (or better said not add) CONFIG_SYS_SDRAM_SIZE?
My devicetree aready looks like this, so I expected this works

  memory {
    device_type = "memory";
    reg = <0x0 0x1f000000>;
  };

I add than (is this optional or required?)
    reserved-memory {
      buffer_fpga: buffer_fpga at 1f000000 {
      reg = <0x1f000000 0x1000000>;
    };

(what meaning does have the name as here "buffer_fpga" - is it free to chose ?)

Than you mentions fdt_high. Honestly, not fully understand what this means.
Do I get it right, that with the default it is load to beyond my physical memory (0x2000.0000)? 
But which address I have to chose - any inbetween 0 and 0x1e00.0000 - so that devicetree fits into the 0x1f00.0000 range for linux?

set fdt_high 0x1e000000  ?

Thanks,
Arno
 

> Gesendet: Donnerstag, 01. Dezember 2016 um 09:44 Uhr
> Von: "Nathan Rossi" <nathan at nathanrossi.com>
> An: "Arno Steffens" <star at gmx.li>
> Cc: meta-xilinx at yoctoproject.org
> Betreff: Re: [meta-xilinx] uboot CONFIG_SYS_SDRAM_SIZE allocation error
>
> On 1 December 2016 at 17:39, Arno Steffens <star at gmx.li> wrote:
> >
> > I switched from an older yocto u-boot (2015.01) to recent one (2016.01). Now I can't boot anymore:
> >
> > Zynq> boot
> > QSPI: Kernel/Devicetree - NFS: rootfs
> > SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
> > device 0 offset 0x4b0000, size 0x10000
> > SF: 65536 bytes @ 0x4b0000 Read: OK
> > device 0 offset 0x4c0000, size 0x380000
> > SF: 3670016 bytes @ 0x4c0000 Read: OK
> > ## Booting kernel from Legacy Image at 02080000 ...
> >    Image Name:   Linux-4.4.0-xilinx
> >    Image Type:   ARM Linux Kernel Image (uncompressed)
> >    Data Size:    3513736 Bytes = 3.4 MiB
> >    Load Address: 00008000
> >    Entry Point:  00008000
> >    Verifying Checksum ... OK
> > ## Flattened Device Tree blob at 02000000
> >    Booting using the fdt blob at 0x2000000
> >    Loading Kernel Image ... OK
> > ERROR: Failed to allocate 0x82a5 bytes below 0x0.
> > device tree - allocation error
> > FDT creation failed! hanging...### ERROR ### Please RESET the board ###
> >
> > --------
> > My guess for reason of that is following, but I can't solve it.
> >
> > My board (based on MicroZed) has 512MB Ram, but 16MB are used for FPGA.
> >
> > I managed that before with
> >  #ifndef __CONFIG_ZYNQ_MICROZED_H
> >  #define __CONFIG_ZYNQ_MICROZED_H
> >
> > -#define CONFIG_SYS_SDRAM_SIZE          (1024 * 1024 * 1024)
> > +#define CONFIG_SYS_SDRAM_SIZE          (496 * 1024 * 1024)
> >
> > In newer Uboot I can't find this definition not in that way. Nevertheless I added this line.
> > (If not, that my last message is "Starting kernel ...")
> >
> > Although digging around, I couldn't find how nowadays this is handled. This seems memory size is not board-specific anymore. How it is handled?
> 
> Current versions of u-boot use the memory size which is provided by
> device trees now (for zynq), so make sure you update the value in your
> u-boot device tree. (you can used 'reserved-memory' for the 16MB FPGA
> segment)
> 
> Also it is additionally worth noting to make sure "fdt_high" is set in
> your environment such that you can load at 0x0200_0000 or above (the
> default is normally set to 0x2000_0000).
> 
> Regards,
> Nathan
> 
> >
> > Thanks
> > --
> > _______________________________________________
> > meta-xilinx mailing list
> > meta-xilinx at yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/meta-xilinx
> 



More information about the meta-xilinx mailing list