Zynq Reseving Physical Memory Issue

To have memory in ram for vdma transport image and this part of ram can’t influence the PS normal work,it is necessary to reseve some physical memory.
in general, setting the “mem”env in uboot can get onto Achieve that purpose.but I can’t get kernel to start up,serial port output as follows:

## Booting kernel from Legacy Image at 02080000 ...
   Image Name:   Linux-3.17.0-xilinx
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3451352 Bytes = 3.3 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
   Loading Device Tree to 0fff9000, end 0ffff791 ... OK

Starting kernel ...

until i see this

fdt_high
- if set this restricts the maximum address that the
flattened device tree will be copied into upon boot.
For example, if you have a system with 1 GB memory
at physical address 0x10000000, while Linux kernel
only recognizes the first 704 MB as low memory, you
may need to set fdt_high as 0x3C000000 to have the
device tree blob be copied to the maximum address
of the 704 MB low memory, so that Linux kernel can
access it during the boot procedure.
If this is set to the special value 0xFFFFFFFF then
the fdt will not be copied at all on boot. For this
to work it must reside in writable memory, have
sufficient padding on the end of it for u-boot to
add the information it needs into it, and the memory
must be accessible by the kernel.

and

initrd_high
- restrict positioning of initrd images:
If this variable is not set, initrd images will be
copied to the highest possible address in RAM; this
is usually what you want since it allows for
maximum initrd size. If for some reason you want to
make sure that the initrd image is loaded below the
CONFIG_SYS_BOOTMAPSZ limit, you can set this environment
variable to a value of “no” or “off” or “0”.
Alternatively, you can set it to a maximum upper
address to use (U-Boot will still check that it
does not overwrite the U-Boot stack and data).

For instance, when you have a system with 16 MB
RAM, and want to reserve 4 MB from use by Linux,
you can do this by adding “mem=12M” to the value of
the “bootargs” variable. However, now you must make
sure that the initrd image is placed in the first
12 MB as well - this can be done with

  setenv initrd_high 00c00000

If you set initrd_high to 0xFFFFFFFF, this is an
indication to U-Boot that all addresses are legal
for the Linux kernel, including addresses in flash
memory. In this case U-Boot will NOT COPY the
ramdisk at all. This may be useful to reduce the
boot time on your system, but requires that this
feature is supported by your Linux kernel.

I changed the value of these envs which is same as devicetree “mem=XXXM” setting and the memory’s reg.then kerenl work as usual.

setenv initrd_high 0x10000000
setenv fdt_high 0x10000000

the uboot xilinx provided doesn’t have option like saveenv,so need to recompile uboot for modifiy in permanent.
edit in “include/configs/zynq-common.h”

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值