All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] Does ft_dump_blob() work for anyone?
@ 2007-01-23 16:10 Timur Tabi
  2007-01-23 16:40 ` Jerry Van Baren
  2007-01-23 16:42 ` Ben Warren
  0 siblings, 2 replies; 5+ messages in thread
From: Timur Tabi @ 2007-01-23 16:10 UTC (permalink / raw)
  To: u-boot

I'm trying to debug some problems with ft_setup(), and when I call 
ft_dump_blob(), I get output like this:

recieved oftree
/ {
     model = [00 00 00 00 4d 50 43 38 33 34 39 45 4d];
      ** Unknown tag 0x00000000 at 0xfd9d05c
final OF-tree
/memreserve/ 1 0;
/ {
     model = [00 00 00 00 4d 50 43 38 33 34 39 45 4d];
      ** Unknown tag 0x00000000 at 0xfd9d06c
/memreserve/ 1 0;
/ {
     model = [00 00 00 00 4d 50 43 38 33 34 39 45 4d];
      ** Unknown tag 0x00000000 at 0xfd9d06c

Obviously, it's hard to debug OF code without this function working.  I believe 
the bug is somewhere in this code:

		sz = be32_to_cpu(*p++);
		s = (const char *)p_strings + be32_to_cpu(*p++);
		t = (const char *)p;
		p = (const u32 *)_ALIGN((unsigned long)p + sz, 4);


Notice, for instance, the 'model' node, how it displays 4 zeros first. 
Obviously, the value of 't' above is incorrect.

Unfortunately, I don't know the binary layout of the DTB, so this will take me a 
while to debug.  I was just wondering if anyone else is seeing these problems.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Does ft_dump_blob() work for anyone?
  2007-01-23 16:10 [U-Boot-Users] Does ft_dump_blob() work for anyone? Timur Tabi
@ 2007-01-23 16:40 ` Jerry Van Baren
  2007-01-23 17:02   ` Timur Tabi
  2007-01-23 16:42 ` Ben Warren
  1 sibling, 1 reply; 5+ messages in thread
From: Jerry Van Baren @ 2007-01-23 16:40 UTC (permalink / raw)
  To: u-boot

Timur Tabi wrote:
> I'm trying to debug some problems with ft_setup(), and when I call 
> ft_dump_blob(), I get output like this:
> 
> recieved oftree
> / {
>      model = [00 00 00 00 4d 50 43 38 33 34 39 45 4d];
>       ** Unknown tag 0x00000000 at 0xfd9d05c
> final OF-tree
> /memreserve/ 1 0;
> / {
>      model = [00 00 00 00 4d 50 43 38 33 34 39 45 4d];
>       ** Unknown tag 0x00000000 at 0xfd9d06c
> /memreserve/ 1 0;
> / {
>      model = [00 00 00 00 4d 50 43 38 33 34 39 45 4d];
>       ** Unknown tag 0x00000000 at 0xfd9d06c
> 
> Obviously, it's hard to debug OF code without this function working.  I believe 
> the bug is somewhere in this code:
> 
> 		sz = be32_to_cpu(*p++);
> 		s = (const char *)p_strings + be32_to_cpu(*p++);
> 		t = (const char *)p;
> 		p = (const u32 *)_ALIGN((unsigned long)p + sz, 4);
> 
> 
> Notice, for instance, the 'model' node, how it displays 4 zeros first. 
> Obviously, the value of 't' above is incorrect.
> 
> Unfortunately, I don't know the binary layout of the DTB, so this will take me a 
> while to debug.  I was just wondering if anyone else is seeing these problems.

It worked for me 2006-10-31
   <http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/24664>
I have not been using it lately, so I cannot vouch for it still working. 
  You may also want to double-check your dtb version, I was using 
version 16 when it worked.

gvb

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Does ft_dump_blob() work for anyone?
  2007-01-23 16:10 [U-Boot-Users] Does ft_dump_blob() work for anyone? Timur Tabi
  2007-01-23 16:40 ` Jerry Van Baren
@ 2007-01-23 16:42 ` Ben Warren
  1 sibling, 0 replies; 5+ messages in thread
From: Ben Warren @ 2007-01-23 16:42 UTC (permalink / raw)
  To: u-boot

Timur,

On Tue, 2007-01-23 at 10:10 -0600, Timur Tabi wrote:
> I'm trying to debug some problems with ft_setup(), and when I call 
> ft_dump_blob(), I get output like this:

> 
> Notice, for instance, the 'model' node, how it displays 4 zeros first. 
> Obviously, the value of 't' above is incorrect.
> 
> Unfortunately, I don't know the binary layout of the DTB, so this will take me a 
> while to debug.  I was just wondering if anyone else is seeing these problems.
> 

I just added a call to ft_dump_blob() in my 'last_stage_init()', and got
this, which to me looks correct:

 {
    model = "QSPRISM";
    compatible = "QSPRISM";
    #address-cells = <1>;
    #size-cells = <1>;
    cpus {
        #cpus = <1>;
        #address-cells = <1>;
        #size-cells = <0>;
        PowerPC,8349 at 0 {
            device_type = "cpu";
...

The dtb was build on Friday using a same-day git-pull from www.jdl.com.
Sorry I can't help out other than to say that it might just be you...
Here's how the head of mine looks in binary form.  Maybe that would
help:

=> md fe080000
fe080000: d00dfeed 000015fe 00000038 00001438    ...........8...8
fe080010: 00000028 00000010 00000010 feedbeef    ...(............
fe080020: 000001c6 00000000 00000000 00000000    ................
fe080030: 00000000 00000000 00000001 00000000    ................
fe080040: 00000003 00000008 00000000 51535052    ............QSPR
fe080050: 49534d00 00000003 00000008 00000006    ISM.............
fe080060: 51535052 49534d00 00000003 00000004    QSPRISM.........
fe080070: 00000011 00000001 00000003 00000004    ................
fe080080: 00000020 00000001 00000001 63707573    ... ........cpus
fe080090: 00000000 00000003 00000004 0000002c    ...............,
fe0800a0: 00000001 00000003 00000004 00000011    ................
fe0800b0: 00000001 00000003 00000004 00000020    ...............
fe0800c0: 00000000 00000001 506f7765 7250432c    ........PowerPC,
fe0800d0: 38333439 40300000 00000003 00000004    8349 at 0..........
fe0800e0: 00000032 63707500 00000003 00000004    ...2cpu.........
fe0800f0: 0000003e 00000000 00000003 00000004    ...>............

regards,
Ben

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Does ft_dump_blob() work for anyone?
  2007-01-23 16:40 ` Jerry Van Baren
@ 2007-01-23 17:02   ` Timur Tabi
  2007-01-23 17:06     ` Jon Loeliger
  0 siblings, 1 reply; 5+ messages in thread
From: Timur Tabi @ 2007-01-23 17:02 UTC (permalink / raw)
  To: u-boot

Jerry Van Baren wrote:

>   You may also want to double-check your dtb version, I was using 
> version 16 when it worked.

That was my problem.  I was using an old version of dtc that defaults to 
"version 3", whatever that is.  When I forced it to "version 16", everything 
started to work.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] Does ft_dump_blob() work for anyone?
  2007-01-23 17:02   ` Timur Tabi
@ 2007-01-23 17:06     ` Jon Loeliger
  0 siblings, 0 replies; 5+ messages in thread
From: Jon Loeliger @ 2007-01-23 17:06 UTC (permalink / raw)
  To: u-boot

On Tue, 2007-01-23 at 11:02, Timur Tabi wrote:
> Jerry Van Baren wrote:
> 
> That was my problem.  I was using an old version of dtc that defaults to 
> "version 3", whatever that is.  When I forced it to "version 16", everything 
> started to work.

Timur sits in this cube right over here...

I've got him....

*smack*

There.

jdl

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-01-23 17:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-23 16:10 [U-Boot-Users] Does ft_dump_blob() work for anyone? Timur Tabi
2007-01-23 16:40 ` Jerry Van Baren
2007-01-23 17:02   ` Timur Tabi
2007-01-23 17:06     ` Jon Loeliger
2007-01-23 16:42 ` Ben Warren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.