aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README8
-rw-r--r--common/image.c12
2 files changed, 13 insertions, 7 deletions
diff --git a/README b/README
index 6fe1e0fc2..f6ab85c5c 100644
--- a/README
+++ b/README
@@ -3627,6 +3627,14 @@ List of environment variables (most likely not complete):
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
diff --git a/common/image.c b/common/image.c
index 77ca6e470..8c4137c60 100644
--- a/common/image.c
+++ b/common/image.c
@@ -1288,16 +1288,14 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size)
if (((ulong) desired_addr) == ~0UL) {
/* All ones means use fdt in place */
- desired_addr = fdt_blob;
+ of_start = fdt_blob;
+ lmb_reserve(lmb, (ulong)of_start, of_len);
disable_relocation = 1;
- }
- if (desired_addr) {
+ } else if (desired_addr) {
of_start =
(void *)(ulong) lmb_alloc_base(lmb, of_len, 0x1000,
- ((ulong)
- desired_addr)
- + of_len);
- if (desired_addr && of_start != desired_addr) {
+ (ulong)desired_addr);
+ if (of_start == 0) {
puts("Failed using fdt_high value for Device Tree");
goto error;
}