Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Matej Kupljen <matej.kupljen@ultra.si>
To: Jordan Crouse <jordan.crouse@amd.com>
Cc: linux-mips@linux-mips.org, linux-usb-devel@lists.sourceforge.net,
	matthias.lenk@amd.com
Subject: Re: ALCHEMY:  AU1200 USB Host Controller (OHCI/EHCI)
Date: Tue, 03 Jan 2006 22:45:22 +0100	[thread overview]
Message-ID: <1136324722.12175.20.camel@orionlinux.starfleet.com> (raw)
In-Reply-To: <20060103155447.GI15770@cosmic.amd.com>

Hi

> > I tried you patch, and this is what I get on 2.6.16-rc5:

I meant, 2.5.15-rc5 of course, and NOT 2.6.15-rc5. Sorry.

> Well, thats a fun one.  I'm assuming you tried to boot with a device
> plugged in.  I'm a bit confused by the __reqest_region coming from
> usb_create_hcd - I quickly glanced at the function, and I don't see anything
> that would have called request_region / request_mem_region.  However,
> there *is* a request_mem_region call immediately after the usb_create_hcd
> call in usb_ehci_au1xxx_probe, and I wonder that might be the guilty party.

I set up my BDI and tried to debug this. This is what I can tell you,
and maybe you can then be able to help me:

I get past the request_mem_region and ioremap in ehci-au1xxx.c.
I get to line 144:
if ((retval = driver->reset (hcd)) < 0) {

now, driver->reset points to the 
(gdb) p driver->reset
$6 = (int (*)(struct usb_hcd *)) 0x803505d4 <ehci_init>

I step into the call and I get to ehci_init in
drivers/usb/host/ehci-hcd.c. 

If I continue, i get to the  ehci_mem_init in the
drivers/usb/host/ehci-mem.c

On line:
228  memset (ehci->pshadow, 0, ehci->periodic_size * sizeof (void *));

If I do next in gdb, I end up in include/asm-mips/io.h, line
425 BUILDIO_MEM(l, u32) 
(Well, I am lost here now)

Now if I disassemble at $pc:
(gdb) x/20i $pc
0x80350760 <ehci_init+396>:     lw      v1,0(s0)
0x80350764 <ehci_init+400>:     lw      a2,8(v1)
0x80350768 <ehci_init+404>:     andi    v0,a2,0x80
0x8035076c <ehci_init+408>:     beqz    v0,0x80350888 <ehci_init+692>
0x80350770 <ehci_init+412>:     srl     v0,a2,0x4
0x80350774 <ehci_init+416>:     li      v0,8
0x80350778 <ehci_init+420>:     sw      v0,40(s0)
0x8035077c <ehci_init+424>:     lw      v0,24(s0)
0x80350780 <ehci_init+428>:     lw      a1,16(s0)
0x80350784 <ehci_init+432>:     li      v1,-2
0x80350788 <ehci_init+436>:     and     v0,v0,v1
0x8035078c <ehci_init+440>:     li      v1,-1
0x80350790 <ehci_init+444>:     sw      v1,48(s0)
0x80350794 <ehci_init+448>:     sw      v0,24(s0)
0x80350798 <ehci_init+452>:     sw      zero,20(s0)
0x8035079c <ehci_init+456>:     sw      zero,72(a1)
0x803507a0 <ehci_init+460>:     lw      a0,16(s0)
0x803507a4 <ehci_init+464>:     li      v1,-32
0x803507a8 <ehci_init+468>:     li      a1,1
0x803507ac <ehci_init+472>:     lw      v0,68(a0)
(gdb) p $s0
$9 = 0x8053c0d0
(gdb) x/x $s0
0x8053c0d0:     0x00000000

So I guess, that the instruction at 0x80350764 is loading from location
0 and offset 8, which can be seen also in the original post:

[4294668.602000] CPU 0 Unable to handle kernel paging request at virtual
address 00000008, epc == 80350764, ra == 80350760

What is going on here?
Is this some stack corruption, because of all this strange jumps
over the source code (I know optimisation is turned on, but still).

I hope this can help someone, I still have a lot of learning
to do to figure this out.

BR,
Matej

-- 
Matej Kupljen <matej.kupljen@ultra.si>
Ultra d.o.o.

  reply	other threads:[~2006-01-03 20:39 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-08 21:00 ALCHEMY: AU1200 USB Host Controller (OHCI/EHCI) Jordan Crouse
2005-12-10  5:13 ` [linux-usb-devel] " David Brownell
2005-12-10  6:42   ` Pete Popov
2005-12-12 10:51 ` Bora Sahin
2006-01-03 14:25 ` Matej Kupljen
2006-01-03 15:54   ` Jordan Crouse
2006-01-03 21:45     ` Matej Kupljen [this message]
2006-01-04  7:18       ` Matej Kupljen
2006-01-04 12:50       ` Sathesh Babu Edara
2006-01-04 12:50         ` Sathesh Babu Edara
2006-01-04 13:06         ` Kevin D. Kissell
2006-01-09  4:54           ` LL and SC instruction simulation Sathesh Babu Edara
2006-01-09  4:54             ` Sathesh Babu Edara
2006-01-09  7:43           ` Sathesh Babu Edara
2006-01-09  7:43             ` RE: Sathesh Babu Edara
2006-01-09  7:49             ` LL and SC instruction simulation Sathesh Babu Edara
2006-01-09  7:49               ` Sathesh Babu Edara
2006-01-09 14:54               ` Ralf Baechle
2006-01-09 15:17                 ` Kevin D. Kissell
2006-01-09 15:17                   ` Kevin D. Kissell
2006-01-09 15:21                   ` Ralf Baechle
2006-01-09 15:30                     ` Ralf Baechle
2006-01-09 15:47                       ` Kevin D. Kissell
2006-01-09 15:47                         ` Kevin D. Kissell
2006-01-09 15:51                         ` Ralf Baechle
2006-01-09  9:00             ` Kevin D. Kissell
2006-01-09  9:00               ` Re: Kevin D. Kissell
2006-01-09 21:23               ` [processor frequency] Wolfgang Denk
2006-01-09 21:53                 ` Kevin D. Kissell
2006-01-09 23:01                   ` Wolfgang Denk
2006-01-04 12:12     ` ALCHEMY: AU1200 USB Host Controller (OHCI/EHCI) Matej Kupljen
2006-01-04 12:32       ` Matthias Lenk
2006-01-04 13:07         ` Matej Kupljen
2006-01-04 13:54           ` bora.sahin
2006-01-04 14:17             ` Matej Kupljen

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=1136324722.12175.20.camel@orionlinux.starfleet.com \
    --to=matej.kupljen@ultra.si \
    --cc=jordan.crouse@amd.com \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=matthias.lenk@amd.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox