您的位置:首页 > 产品设计 > UI/UE

Zynq Reseving Physical Memory Issue

2015-10-14 15:08 525 查看
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”
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  u-boot zynq