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:
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
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.
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”
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源码分析及移植-fs2410
- U-BOOT源码分析及移植
- U-Boot启动过程--详细版的完全分析(二)
- Utilities Zynq in a PL only configuration
- U-Boot-2009-03移植笔记(移植准备)
- U-Boot-2009-03移植笔记(点亮第一展灯)
- U_boot 的 bootcmd 和bootargs参数详解
- U-Boot移植全程指导
- u-boot1.1.6-undefined reference to "raise"
- 09课01节 u-boot-1.1.16编译补丁;
- u-boot模仿
- 自定义u-boot启动logo的方法
- 2440 u-boot编译
- u-boot.lds与-Ttext $(TEXT_BASE)
- U-Boot移植(1)--在U-boot中建立自己的开发板
- 追踪uboot下tftp命令的代码执行过程-Nagul
- 嵌入式系统 Boot Loader 技术内幕
- 嵌入式linux系统log文件的几个地方
- 常用的uboot的bootargs设置
- ubuntu12.04的NFS配置