Skip to contentSkip to conversation

common/image.c: align usage of fdt_high with initrd_high

PATCH Superseded Shawn Guo 2 participants 2 messages Dec 30, 2011 – Jan 5, 2012

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Shawn Guo

author
#0 lore raw

PATCH 1/1 common/image.c: align usage of fdt_high with initrd_high

The commit message of a28afca (Add uboot "fdt_high" enviroment variable) states that fdt_high behaves similarly to the existing initrd_high. But fdt_high actually has an outstanding difference from initrd_high. The former specifies the start address, while the later specifies the end address.

As fdt_high and initrd_high will likely be used together, it'd be nice to have them behave same. The patch changes the behavior of fdt_high to have it aligned with initrd_high.

---
 common/image.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
common/image.c +2 -4
index 77ca6e4..12ceacf 100644
@@ -1294,10 +1294,8 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size)
 		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;
 			}
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 common/image.c: align usage of fdt_high with initrd_high

Dear Shawn Guo,

Quoted 9 lines · In message <[email protected]> you wrote:

The commit message of a28afca (Add uboot "fdt_high" enviroment variable) states that fdt_high behaves similarly to the existing initrd_high. But fdt_high actually has an outstanding difference from initrd_high. The former specifies the start address, while the later specifies the end address.

As fdt_high and initrd_high will likely be used together, it'd be nice to have them behave same. The patch changes the behavior of fdt_high to have it aligned with initrd_high.

Can you please also update the documentation to avoid any such confusion? Thanks.

Best regards,

Wolfgang Denk

Signature · 9 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"IBM uses what I like to call the 'hole-in-the-ground  technique'  to
destroy  the  competition.....  IBM digs a big HOLE in the ground and
covers it with leaves. It then puts a big POT OF GOLD nearby. Then it
gives the call, 'Hey, look at all this gold, get over here fast.'  As
soon  as  the competitor approaches the pot, he falls into the pit"
                                                     - John C. Dvorak