9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Dan Cross <crossd@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Missing interrupts in 9pxeload?
Date: Sat,  6 Jun 2009 02:57:25 -0400	[thread overview]
Message-ID: <aa7e41150906052357n734241f9m200d31a8dad4ce43@mail.gmail.com> (raw)
In-Reply-To: <5557ac66b8ce61ab8ec505beefdcd20e@quanstro.net>

On Fri, Jun 5, 2009 at 10:18 PM, erik quanstrom<quanstro@quanstro.net> wrote:
> i think there are two general possiblities.
> (a) the southbridge is not recognized and irq routing is not
> properly initialized
> (b) 9load is stepping on low memory that bios tells us
> is not available.  in general x86 platforms have been shrinking
> the amount of low memory available.
>
> to tell what is going on, i think it would make sense to strip
> everything out of 9load and just get to main() and set up
> a clock interrupt at the default 86Hz and print something each
> time through.  then call HLT.
>
> i can't see how this could fail (i.e. print nothing), but if it does
> at least we know where to start.
>
> if it works, then we can start investigating other possibilties.

Short summary: I got it working.  Short analysis: Well....  That was a
hell of a thing.

Longer analysis: Based on your advice, I started playing around in
9pxeload to disable things and see if I could run with just the clock
enabled.  That worked.  Then, I started to put things back in; I got
to the point where I realized that the rtl8169init() function wasn't
returning correctly.  Looking at it, I saw that the likely culprit was
the switch statement testing ctlr->macv; sure enough, my macv
(0x24800000 - I guess I was a little wrong about exactly what chipset
it is) didn't have a case associated with it.  So, I added one (that
just did break;).  Voila the kernel loaded (and so did the plan9.ini
from /cfg/pxe).  My next step was to add the same case to the
corresponding driver in the kernel.  Now, I got to the 'boot from'
prompt, selected tcp and was able to login.  The VESA video started
up, and I was good to go.  The terminal is running fine.  Hooray.

So that was it; a one line change to add a case statement to a switch
(two if you count the definition of a symbolic constant; three if you
count adding a print() before returning from rtl8169init()).  I knew
it would end up being something like that.

I guess when rtl8169init() returned, it had left interrupts off or
something; certainly, the adapter was only partially setup.  I was a
bit surprised that there wasn't more in the way of an error in that
case.  Oh well.

Now, my next big challenge is to get the VESA video modes to map up to
what the monitor that's running this expects (the monitor can do
1680x1050, but VESA doesn't support that).  I don't suppose anybody
has a "real" driver for the Intel 945?  Or some other way to force it
to change resolution?

        - Dan C.



  reply	other threads:[~2009-06-06  6:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04 20:38 Dan Cross
2009-06-05 18:28 ` erik quanstrom
2009-06-05 20:49   ` Dan Cross
2009-06-05 21:30     ` balaji
2009-06-05 22:18       ` Dan Cross
2009-06-06  2:18         ` erik quanstrom
2009-06-06  6:57           ` Dan Cross [this message]
2009-06-06 15:00             ` erik quanstrom
2009-06-06  2:19     ` erik quanstrom

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=aa7e41150906052357n734241f9m200d31a8dad4ce43@mail.gmail.com \
    --to=crossd@gmail.com \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).