Re: porting from headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 23, 2001 at 09:45:54AM -0400, joshua@babbage.millersv.edu wrote:

> The other day on irc.openprojects.net #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 <wesolows@foobazco.org> http://foobazco.org/~wesolows
------(( 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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux