Subject: [Fwd: Fwd: XBOX boots kernel, but I need help...]
To: None <port-i386@netbsd.org>
From: Andrew Gillham <gillham@roadsign.com>
List: port-i386
Date: 12/13/2006 11:05:11
[Sorry if this ends up a dupe, but it didn't seem to make it from my 
gmail account]

I could use some help getting my Xbox working with NetBSD/i386 
-current.  I tweaked a few things based on the FreeBSD code.  For 
example I added a PCI quirk for one multifunction device that hangs the 
bus if accessed, a real show stopper issue.

My kernel is booting, I have _very_ minimal diagnostic output to an 
hd44780 LCD (hooked to a mod chip), via low level 'outb' style calls in 
function called from PRINTK, showing the kernel getting all the way up, 
being pingable via my usb ethernet, but no matter what I do with 
boothowto it doesn't seem to be able to go multi-user enough to run 
anything from my NFS root.  For all I know my USB ethernet may be hosing 
after the first few NFS packets, since tcpdump shows a little action and 
then nothing.  I need to analyze the traffic further, but I thought I 
would ask for some help in other areas first.

Since my kernel is coming up enough to mount the root file system, I 
think I can use the LCD output to help get the onboard frame buffer 
working, with some help some someone that knows a lot more than me about 
the kernel. (which is most of you.) :)

Here are my issues at the moment:
1) doesn't seem to try to go multi-user, even with boothowto = 
RB_AUTOBOOT in init_main.c, am I missing the obvious here?

2) The LCD "driver" I am using is just a function I created based on 
reading some c++ code for Xbox Media Center that talks to the chipset.  
I haven't been able to get the in tree tslcd, toasterlcd, hd47780 
driver, etc to talk to it as it is wired up the same way and I am not 
knowledgeable enough to tweak the routines.  I *think* the outb calls 
are just writing to the two main hd47780 registers and I created a x3lcd 
driver based on tslcd with writereg & readreg modded to inb/outb the two 
locations, but the driver just reports "LCD is not responding" and I am 
stuck with my diagnostic code.  Note that trying to have x3lcd attach 
without my code running does work either, and of course I can't tell 
what it is doing. :)

3) The nfe driver seems to be able to send a packet, e.g. DHCP, but just 
starts reporting 'watchdog timeout' and is unable to receive anything.  
So I am using a USB ethernet for now.  I make a couple of changes based 
on some OpenBSD fixes for this, but no luck.  I'm not sure what is doing 
on, and of course I have this 4x40 LCD to get output on, with the lines 
out of order. :)  If anyone is aware of a solution to the watchdog 
timeout I would appreciate hearing about it.

4) I'm not sure how to map the 4MB frame buffer the Cromwell BIOS sets 
up.  It is located roughly from 60-64MB and the FreeBSD driver just 
seems to map this 4MB to some place accessible to the frame buffer 
driver.  I am quite ignorant on the whole UVM thing and not sure how to 
map a specific chunk of physical memory space via bus_space or whatever 
so a dumb FB driver could use it.  Since my kernel is booting and seems 
to be staying up and I have 4 lines of LCD output for debugging , I 
think I can work on getting a real frame buffer driver going and get a 
real wscons console at some point.

I could use some help with these items.  I'm not really much of a coder, 
so I would need specifics, pointers to actual working code on some of 
these.  Anyone have some time to help get the Xbox booting?

-Andrew