[Top] [All Lists]

Re: porting from headers

Subject: Re: porting from headers
From: Keith M Wesolowski <>
Date: Wed, 23 May 2001 08:19:05 -0700
In-reply-to: <>; from on Wed, May 23, 2001 at 09:45:54AM -0400
References: <> <>
User-agent: Mutt/1.2.5i
On Wed, May 23, 2001 at 09:45:54AM -0400, wrote:

> The other day on #mipslinux, someone said that the
> initial O2 port was done using the irix header files to glean enough
> hardware info to make the needed changes.  How would this process
> work?  Could someone post examples of how parts of the header files
> indicate how to get something else to boot on the hardware?

Start with common sense: 

1. It's ARCS, so prom_printf and the ARCS memory map work.  2. It's
got an already-supported MIPS CPU.

That's enough if you don't screw it up to get to the having no root
and must scream point.  Then, you look at the headers and see that it
has two 16550 serial ports, and you know their addresses.  Plug those
into the standard peecee serial driver and you have a serial console.
Likewise the RTC.  You look at crime.h and see the CRIME_TIME
mechanism, along with its frequency, and you guess that you can
calibrate your system timer from that.  Now your timers are right.

You want PCI, that's another matter; you can pull out the config space
pointers and read/write the config space rather easily from the
headers, and likewise it gives you the CPU physical addresses for
device BARs.  But nobody will tell you that most of these spaces need
to be swapped... :-)

Basically the headers give you the addresses of registers and
occasionally their formats.  If you're clever you can figure out how
to go from there.  I'm not so clever so it's been something like 8
months I've been fooling with this.

Keith M Wesolowski <>
------(( Project Foobazco Coordinator and Network Administrator ))------
        "Nothing motivates a man more than to see his boss put
         in an honest day's work." -- The fortune file

<Prev in Thread] Current Thread [Next in Thread>