[geeks] PCI help sought
Mouse
mouse at Rodents-Montreal.ORG
Tue Nov 1 23:17:44 CDT 2016
I'm trying to write bare-metal code to talk to an Ethernet on a peecee.
The basic chip - a Realtek 8139 - is simple; I have code to talk to a
Dreamcast BBA, which is an 8139 behind a little custom glue.
I've written code which walks the PCI configuration space stuff,
finding and identifying the Ethernet in question. But as soon as I try
to touch anything that's not configuration space, it crashes. The
hardware is, as far as I can tell, good; NetBSD finds it and uses it
just fine.
Obviously I'm doing something wrong in my code. I'm wondering if
anyone here might have the expertise and inclination to help me figure
out what.
My code is for compilation with Open Watcom and is to be run from DOS.
I've been using FreeDOS for it, but I have no reason to think that's
relevant.
It's all on ftp.rodents-montreal.org in /mouse/misc/dos-pci/ - pci.c is
the program, needing pci.h and rtk.h, and pci.out is the output when
running it on one of my test machines. I have it using memory space to
(try to) access the chip; I also tried using I/O space, which failed at
the same point - the first access to non-configuration space - in
apparently the same way.
Mouse
More information about the geeks
mailing list