Subject: Re: JavaStation Krups XServer does not start
To: None <port-sparc@NetBSD.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-sparc
Date: 02/19/2004 05:43:03
--2fHTh5uZTiUOsy+g
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Thu, Feb 19, 2004 at 00:45:04 +0000, Matt Dainty wrote:
> It appears my arm^Wsparc_video.c needs a bit of work as on closer
> inspection, it's doing things that are probably invalid on the Krups
> hardware, such as mmap()ing 0xA000, etc. I've commented out most of it
> for now to just leave it with empty functions. Any pointers here would
> be helpful as I really don't know the Krups hardware that well (yet :-).
Hmm, 0xA0000. That won't work, *sigh*. Fixed PCI I/O space mapping
in msII-ep only maps 0x10000. I actualy not sure if it's possible at
all to access those PCI addresses in Krups at all (coprocessor lives
in that address space too, and nobody knows how to access it; even
JavOS used the video card without acceleration). In Netwinder (IGS
CyberPro 2000, a very simlar card) it can be accessed via memory
mapped io accesses, but IGA1682 in Krups doesn't seem to support it.
May be we really need an Xwscons server...
> Unfortunately, I was hoping that at least scanpci(1) would run to
> iterate over the PCI bus to list the devices, as that should mean the
> the XFree86 PCI code should be working but it wedges the Krups hard.
> From what I can read of the source, the NetBSD PCI code should just open
> /dev/pci0 so it shouldn't need any of the mmap() bits from my
> sparc_video.c file yet anyway.
>
> I also tried a quick test program using libpci to perform
> 'pci_conf_print( fd, 0, 1, 0 )' which should be the framebuffer PCI
> device IIRC, and that also makes my Krups lock up, but the same code
> works okay on my Alpha, (the other PCI NetBSD machine I have).
>
> Is there a bigger problem using /dev/pci0 perhaps?
Doh. I haven't implemented NMIs for Krups ;). The problem is that
when we try to access config registers of the video past offset 64, it
results in an error. Attached kludge should help for now.
SY, Uwe
--
uwe@ptc.spbu.ru | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen
--2fHTh5uZTiUOsy+g
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pci_machdep.diff"
Index: pci_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/sparc/pci_machdep.c,v
retrieving revision 1.8
diff -u --unified -r1.8 pci_machdep.c
--- pci_machdep.c 15 Jul 2003 00:05:07 -0000 1.8
+++ pci_machdep.c 19 Feb 2004 02:20:46 -0000
@@ -314,6 +314,10 @@
return (val);
}
+ /* XXX */
+ if (reg >= 64)
+ return (0);
+
mode1_addr = PCITAG_OFFSET(tag) | reg;
mode1_data_reg_pa = PCI_MODE1_DATA_REG_PA
| (reg & PCI_MODE1_DATA_REG_MASK);
--2fHTh5uZTiUOsy+g--