All of lore.kernel.org
 help / color / mirror / Atom feed
From: pacman@kosh.dhis.org
To: olaf@aepfle.de (Olaf Hering)
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: Pegasos OHCI bug (was Re: PROBLEM: memory corrupting bug,
Date: Wed, 27 Oct 2010 16:04:57 -0500 (GMT+5)	[thread overview]
Message-ID: <20101027210457.23673.qmail@kosh.dhis.org> (raw)
In-Reply-To: <20101027101351.GA28218@aepfle.de>

Olaf Hering writes:
> 
> On Wed, Oct 27, pacman@kosh.dhis.org wrote:
> 
> > |1. How do I locate all usb nodes in the device tree?
> > |
> > |2. How do I know if a particular usb node is OHCI?
> 
> In the installed system, run 'lspci | grep -i usb', this gives the pci
> bus numbers.  Then run 'find /sys -name devspec', and look or the bus

Once the system is running, I have no problem figuring it out. What I meant
was how do I write some code to identify OHCI devices correctly, from within
the limited environment of the Forth interpreter, which will work in the
general case.

I already know that /pci@80000000/usb@5 and /pci@80000000/usb@5,1 are the
problem nodes on my machine. And I've learned enough about OF to do a full
recursive device tree search to find the USB nodes, so the first question is
answered.

But the UHCI and OHCI nodes look very much alike in the OF properties. "name"
is just "usb" and there's no "compatible".

The big question that I'm still stumbling over is how to access the device
registers. The "reg" property looks like this:
             phys                 size
 -------------------------- -----------------
 00002800 00000000 00000000 00000000 00000000
 02002810 00000000 00000000 00000000 00001000
so I take the second group of 5 words, which should be the device registers,
and try to map it to a virtual address. The members are unpacked on the stack
like this:
  00000000 00000000 02002810 00000000 00001000
which looks like this stack diagram from OF spec:
  map-in ( phys.lo ... phys.hi size -- virt )
and the method call goes like this:
  " map-in" $call-parent
The result: "invalid pointer". But I notice it only popped 4 items. I think
maybe the "size" for map-in is not the same as the "size" found in the reg
property. Maybe #size-cells applies in one place but not the other. Thanks
for not documenting that! Try again:
  00000000 00000000 02002810 00001000 " map-in" $call-parent
This one doesn't complain, but leaves me a 0 on the stack as its answer. The
OHCI registers have been mapped to virtual address 0? Doesn't seem likely.

-- 
Alan Curry

  reply	other threads:[~2010-10-27 21:04 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-09  9:57 PROBLEM: memory corrupting bug, bisected to 6dda9d55 pacman
2010-10-09  9:57 ` pacman
2010-10-11 12:52 ` Christoph Lameter
2010-10-11 12:52   ` Christoph Lameter
2010-10-11 14:30 ` Mel Gorman
2010-10-11 14:30   ` Mel Gorman
2010-10-11 20:35   ` pacman
2010-10-11 20:35     ` pacman
2010-10-11 21:00   ` Andrew Morton
2010-10-11 21:00     ` Andrew Morton
2010-10-11 21:00     ` Andrew Morton
2010-10-13 14:40     ` Mel Gorman
2010-10-13 14:40       ` Mel Gorman
2010-10-13 14:40       ` Mel Gorman
2010-10-13 17:52       ` pacman
2010-10-13 17:52         ` pacman
2010-10-13 17:52         ` pacman
2010-10-18 11:33         ` Mel Gorman
2010-10-18 11:33           ` Mel Gorman
2010-10-18 11:33           ` Mel Gorman
2010-10-18 19:10           ` pacman
2010-10-18 19:10             ` pacman
2010-10-18 19:10             ` pacman
2010-10-18 21:10             ` Benjamin Herrenschmidt
2010-10-18 21:10               ` Benjamin Herrenschmidt
2010-10-18 21:33               ` pacman
2010-10-18 21:33                 ` pacman
2010-10-18 21:33                 ` pacman
2010-10-19 10:16                 ` Benjamin Herrenschmidt
2010-10-19 10:16                   ` Benjamin Herrenschmidt
2010-10-19 18:10                   ` pacman
2010-10-19 18:10                     ` pacman
2010-10-19 18:10                     ` pacman
2010-10-19 20:47                     ` Segher Boessenkool
2010-10-19 20:47                       ` Segher Boessenkool
2010-10-19 20:47                       ` Segher Boessenkool
2010-10-19 21:02                       ` Benjamin Herrenschmidt
2010-10-19 21:02                         ` Benjamin Herrenschmidt
2010-10-19 21:02                         ` Benjamin Herrenschmidt
2010-10-20  3:23                         ` pacman
2010-10-20  3:23                           ` pacman
2010-10-20  3:23                           ` pacman
2010-10-20 10:32                           ` Benjamin Herrenschmidt
2010-10-20 10:32                             ` Benjamin Herrenschmidt
2010-10-20 10:32                             ` Benjamin Herrenschmidt
2010-10-20 18:33                             ` pacman
2010-10-20 18:33                               ` pacman
2010-10-20 20:56                               ` Benjamin Herrenschmidt
2010-10-20 20:56                                 ` Benjamin Herrenschmidt
2010-10-22  9:15                                 ` pacman
2010-10-22  9:15                                   ` pacman
2010-10-27  8:57                                 ` Pegasos OHCI bug (was Re: PROBLEM: memory corrupting bug, bisected to 6dda9d55) pacman
2010-10-27  8:57                                   ` pacman
2010-10-27 10:13                                   ` Olaf Hering
2010-10-27 10:13                                     ` Olaf Hering
2010-10-27 21:04                                     ` pacman [this message]
2010-10-27 22:05                                       ` Pegasos OHCI bug (was Re: PROBLEM: memory corrupting bug, Segher Boessenkool
2010-10-27 22:58                                         ` pacman
2010-10-27 22:58                                           ` pacman
2010-10-27 23:33                                           ` Segher Boessenkool
2010-10-27 23:33                                             ` Segher Boessenkool
2010-10-28  1:11                                             ` pacman
2010-10-28 19:50                                               ` Segher Boessenkool
2010-10-28 19:50                                                 ` Segher Boessenkool
2010-10-28 21:07                                                 ` pacman
2010-10-29  0:16                                                   ` Segher Boessenkool
2010-10-29  0:16                                                     ` Segher Boessenkool
2010-11-05  6:43                                                     ` pacman
2010-11-05  6:43                                                       ` pacman
2010-11-29  5:44                                                       ` Benjamin Herrenschmidt
2010-10-27 13:27                                   ` Pegasos OHCI bug (was Re: PROBLEM: memory corrupting bug, bisected to 6dda9d55) Benjamin Herrenschmidt
2010-10-27 13:27                                     ` Benjamin Herrenschmidt
2010-10-19 20:58                     ` PROBLEM: memory corrupting bug, bisected to 6dda9d55 Benjamin Herrenschmidt
2010-10-19 20:58                       ` Benjamin Herrenschmidt
2010-10-18 19:37           ` Andrew Morton
2010-10-18 19:37             ` Andrew Morton
2010-10-18 19:37             ` Andrew Morton
2010-10-18 21:02             ` Benjamin Herrenschmidt
2010-10-18 21:02               ` Benjamin Herrenschmidt
2010-10-18 21:55             ` Thomas Gleixner
2010-10-18 21:55               ` Thomas Gleixner
2010-10-18 21:55               ` Thomas Gleixner
2010-10-19 16:24               ` Helmut Grohne
2010-10-19 16:24                 ` Helmut Grohne
2010-10-19 16:24                 ` Helmut Grohne
2010-10-19 16:42                 ` Thomas Gleixner
2010-10-19 16:42                   ` Thomas Gleixner
2010-10-19 16:42                   ` Thomas Gleixner
2010-10-18 20:59       ` Benjamin Herrenschmidt
2010-10-18 20:59         ` Benjamin Herrenschmidt
2010-10-18 20:59         ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101027210457.23673.qmail@kosh.dhis.org \
    --to=pacman@kosh.dhis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=olaf@aepfle.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.