Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 1996 00:54:42 -0400 (EDT)
From:      "Brian T. Schellenberger - Personal Account" <babbleon@mercury.interpath.com>
To:        freebsd-hackers@freebsd.org, freebsd-hardware@freebsd.org
Subject:   Uknown CD-ROM : debugging a driver
Message-ID:  <199605080454.AAA29669@mercury.interpath.com>

next in thread | raw e-mail | index | archive | help


Ok, this is a little weird, but I have an unknown make of CD-ROM.

I own a ProStar 9400 and the people in technical support claim not to 
*know* who make the driver or how to get in contact with them, and there's
no clear ID on it.  (The only thing is a label saying that it is model
CDR-9502, Made in Taiwan.  The only maufacturer logo to be found is on
two little Philips chips inside, but I've called Philips and they deny
making it.)

But FreeBSD things thinks an "?uknown" sort of mcd drive, so I thought
I'd start with that driver and hack at it, sort of poking around to see
what happens.

I started out by putting a few printf statements about, but that gets
sorta of tedious as I have to reboot each time I rebuild, so I got the
clever idea to change all occurances of inb and outb in mcd.c to print
out the address and value read/written, by creating BTSinb and BTSoutb,
and globbally changing to use those.  They are included below for your
edification and amusement.

However, with this change, the system won't boot, going into an infinite
loop as we "inb" a 222 from location 301 over and over.  My CD-ROM is at
300, so I think that this is the probe of the non-existant next device,
but I'm only guessing here.

QUESTIONS:
  - I'm surely not the first to do this sort of thing.  How does one
    usually do it?
  - Where is doc on ddb, if that's the best way to look at this?
  - For that matter, where is ddb itself?
    I have a man page, but no command, and I did a string search in
    ftp://ftp.freebsd.org/pub/FreeBSD/packages-2.1/all for "ddb" and
    found nothing.
  - I want to watch the probing along with the open &c.
    How can I get FreeBSD to probe for a device *after* the system
    has booted and the rest of it is sane rather than before?

================ The failed attempt to show all i/o traffic: ==============
(in i386/isa/mcd.c):

static int inbval;

#define BTSinb(a)  ( inbval = inb(a), \
                     printf("MCD inb: addr=%p in=%c (%d)\n", a, inbval, inbval), \
                     inbval )
#define BTSoutb(a,b) ( printf("MCD outb: addr=%p, out=%c (%d)\n", a, b, b), \
                       outb(a, b) )



-- 
Brian T. Schellenberger, the Man from Babble-On.

"Someday I'll get around to importing all the cool quotes from my other
account's .sig files."      http://mercury.interpath.com/~babbleon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605080454.AAA29669>