
On Sun, 2006-12-17 at 18:13 +0100, Wolfgang Denk wrote:
In message 009301c721f5$69b25ef0$1e67a8c0@Jocke you wrote:
Ahh, found it. It is the addr2info check that relocates the OF tree. addr2info checks if an address is in flash, if so it will relocate it to lower RAM. But since I got my OF tree in high RAM that won't happen. The same would happen if one loaded a OF tree via tftp and placed it high up in RAM. I think that the addr2info check should be replaced with something else that will move the tree to a low enough address if needed.
What would be a good test?
Probably the "initrd_high" code should be generalized here.
Best regards,
Wolfgang Denk
Wolfgang, how about this patch:
Make it possible to use a OF tree embedded in u-boot. Also make sure OF tree is below 8MB.
Signed-off-by: Joakim Tjernlund Joakim.Tjernlund@transmode.se
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 7aae8a6..78f8d15 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -531,8 +531,12 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int fl image_header_t *hdr = &header; #ifdef CONFIG_OF_FLAT_TREE char *of_flat_tree = NULL; +#ifdef CFG_EMBEDDED_FLAT_TREE + ulong of_data = (ulong)oftree_dtb; +#else ulong of_data = 0; #endif +#endif
if ((s = getenv ("initrd_high")) != NULL) { /* a value of "no" or a similar string will act like 0, @@ -745,10 +749,8 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int fl hdr = (image_header_t *)of_flat_tree;
if (*(ulong *)of_flat_tree == OF_DT_HEADER) { -#ifndef CFG_NO_FLASH - if (addr2info((ulong)of_flat_tree) != NULL) + if (of_flat_tree >= (char *) (8*1024*1024)) of_data = (ulong)of_flat_tree; -#endif } else if (ntohl(hdr->ih_magic) == IH_MAGIC) { printf("## Flat Device Tree Image at %08lX\n", hdr); print_image_hdr(hdr); diff --git a/common/ft_build.c b/common/ft_build.c