Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Mar 1999 17:57:26 -0800
From:      Ted Faber <faber@ISI.EDU>
To:        mobile@freebsd.org
Subject:   pccardd guts: anyone understand struct dev_mem?
Message-ID:  <199903130157.RAA04121@boreas.isi.edu>

next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----



I've been dredging around the pccard stuff in my <ahem> copious free
time, trying to get the PAO cnw driver to run under 3.1-RELEASE.  In
fact, I've got a version working pretty well.  The code is a strict
port of the PAO stuff, which is ported from linux, and although I have
the netwave docs, I haven't gone over the workings of the driver
enough to feel confident that it should go into the tree, but it
works.

The problem is that to make it work I had to open the guts of the
pccard daemon's memory allocation routines, and make some rather
arbitrary changes.  The driver I have maps the memory rather than
going through the I/O port space, and expects that memory to be mapped
to a specific place in card memory as well as being mapped 8 bit, 1
wait state.  Getting the offest into card memory was a matter of
deleting one line in cardd.c .  The flags are more problematic, but I
believe that the raw information I need is in the CIS, and better yet,
I think that pccardd reads it properly.  But it stuffs it into a
struct dev_mem, and ignores it.  The struct is undocumented, and the
names are too cryptic.

My questions are:

Does anyone know why the card memory address is arbitrarily reset to
0x4000 around line 520 of cardd.c ?  If not, can we take it out?  The
correct value seems to have been read from the CIS and works.

Can anyone explain what the fields in struct dev_mem are (from
cardd.h) or point me toward any additional documentation of the CIS
tuples that might help me parse it?  I've looked at readcis.[ch] in
usr.sbin/pccard/pccardd, and cis.h in /sys/pccard/ , but the first 2
are opaque to me and uncommented, and cis.h is close, but not quite
enough.

Once I have something that I think recognizes the memory parameters in
the CIS, I'm happy to roll a patch and hand it to people to test.

Thanks!

- ----------------------------------------------------------------------
Ted Faber                                                faber@isi.edu
USC/ISI Computer Scientist                   http://www.isi.edu/~faber
(310) 822-1511 x190      PGP Key: http://www.isi.edu/~faber/pubkey.asc


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNunGBYb4eisfQ5rpAQERzAP9Gy9Aprtvpz+cRiF8sTD4kDaFOgE2Kskf
wstrP1uhtynVx6S5blpTQmL8zUyN4Dc7r4rqOOzKqgNvd5m5HhpGr+/zCZiHuUoo
9DJ/f7KHogYUDR8r8Eq2UAZ/bqNawVALGEF6Z8PgYG5eTSeNP/ld7bZ+31ueyzB/
ce7nXIIu+Jw=
=bbIO
-----END PGP SIGNATURE-----



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




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