[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-msdos
Subject:    NIC driver debugging and IO tracing
From:       Peter Cordes <peter () llama ! nslug ! ns ! ca>
Date:       2001-03-13 0:07:41
[Download RAW message or body]

 My message below got a little long, so I'll put a summary of the important
part here:  Do you have to edit and recompile to trace port IO to ports
above 0x2ff?   How do you trace/log an IRQ (and not the timer/keyboard)?
Where are the docs for tracing and stuff, for people who want to debug DOS
stuff, not dosemu itself?  If someone tells me how to do what I want, I
can write up the instructions into a doc.



 I'm trying to get the Linux pcmcia drivers (pcnet_cs, the ne2000 one, in
particular) to support my Surecom ep427x.  It comes with a DOS disk that has
a patched version of a really old pcmcia-cs source file, but things still
don't seem to work.  Also on the disk is a directory called "enabler", with
a program called en190.exe.  If I boot my laptop off a DOS floppy and run
it, the lights on the NIC dongle come on, and I can load a DOS packet driver
(also on the disk), and ping another computer on my network.

 I want to see what the enabler program is doing.  I've got dosemu
installed, and I've allowed IO port access to the ports it tried to use.
The enabler says "Enable PCIC Fail." when I run it inside dosemu.  From
/proc/stat, I see that IRQ 3 and 7 are getting raised when I run the
enabler, so I set $_irqpassing = "3 7" in /etc/dosemu/dosemu.conf.  This
doesn't seem to change anything, though.  (am I doing this wrong?)

 I want to use the IO tracing stuff to log the IO accesses, but nothing
seemed to be getting logged, only (with -D+i) the calls to ioperm.  This is
not very useful, since I don't see the data.  With -D+9T, I don't see
anything (except an IO to 0x200, but I didn't know that's what the 200 > 0
at the end of my log file was until I read the source.  (it would have been
more obvious if there had been more lines like that, but I thought it was
just some weird end of log message.)).

 I've got the debian package of dosemu 1.0.1.0.  I took a look at the source
code, and found out that init_port_traceing (src/emu-i386/ports.c) calls
register_port_traceing( 0x100, 0x2ff ), which explains why only the IO at
0x200 was getting logged.  All the rest were to ports above 0x300.  (mostly
to 0x3e0 and 0x3e1.  This is probably the PC card controller).  Why does the
source code break tracing by doing that, and can I fix it without
recompiling?  I found something in parser.y that calls register_port_io, but
I'm unsure what config file syntax would reach it.

 Another question:  How can I log IRQs, and what DOS programs do with them?
I tried turning on PIC debugging, but that generates a thousand lines every
time I touch a key (and even when I don't, unless I use PC keyboard
support.)  I want something that logs one line when an interrupt is
delivered.  I only want to log the IRQs I'm interrested in, and ignore the
keyboard and timer, for example.  (I don't really know how interrupts are
handled in a lot of detail, so basically I want a line in the log file when
the interrupt gets to the DOS code.  I don't care what dosemu does to it
internally.)

 There should be a README that describes how to use dosemu to trace the
actions of a dos program.  I read all the stuff in the doc directory of the
source distribution, and the man page.  I also noticed that the man page and
the program's help output are out of sync wrt the allowed -D debug switches.
There isn't any good documentation on what exactly the debugging output is
supposed to mean.  That's ok for people who are debugging dosemu, but that's
not very good for people who are using dosemu to debug DOS programs :(

 Thanks,

-- 
#define X(x,y) x##y
Peter Cordes ;  e-mail: X(peter@llama.nslug. , ns.ca)

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BCE
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@vger.kernel.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic