freebsd-nq/usr.sbin/pccard/pccardc/pccardc.8
1999-06-30 04:16:08 +00:00

236 lines
6.0 KiB
Groff

.\"
.\" Copyright (c) 1998 Toshihiko ARAI <toshi@jp.FreeBSD.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. The name of the author may not be used to endorse or promote products
.\" derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" Translated to English by Hiroki Sato <hrs@geocities.co.jp>
.\"
.\" $Id: pccardc.8,v 1.2 1999/05/10 22:01:38 kuriyama Exp $
.\"
.Dd November 14, 1998
.Dt PCCARDC 8
.Os FreeBSD
.Sh NAME
.Nm pccardc
.Nd PC-CARD (PCMCIA) management and monitoring tool
.Sh SYNOPSIS
.Nm pccardc Ar subcommand
.Op Ar arg ...
.Sh DESCRIPTION
.Nm
controls PC-CARD slots and configures and displays information about PCMCIA cards.
.Nm
understands the following subcommands:
.Pp
.Bl -tag -width pccardmem -compact
.It Pa beep
Set beep type
.It Pa dumpcis
Print card CIS(s)
.It Pa enabler
Device driver enabler
.It Pa help
Print command summary
.It Pa pccardmem
Allocate memory for pccard driver
.It Pa rdattr
Read attribute memory
.It Pa rdmap
Read pcic mappings
.It Pa rdreg
Read pcic register
.It Pa wrattr
Write byte to attribute memory
.It Pa wrreg
Write pcic register
.El
.Bl -enum
.It
.Nm beep Ar 0|1
.Pp
Specifies the sound made upon card insertion or removal.
.Pp
.Bl -tag -width Ds -compact
.It Ar 0
silent mode
.It Ar 1
simple beep mode
.El
.It
.Nm dumpcis
.Op Ar slot
.Pp
Displays
.Em CIS
(Card Information Structure) tuple in EEPROM of a PC-CARD card.
.Ar Slot
specifies which slot to read.
When no option is supplied, it displays
the CIS of all of the available cards.
.It
.Nm enabler Ar slot driver
.Op Fl m Ar card addr size
.Op Fl a Ar iobase
.Op Fl i Ar irq
.Pp
This is a "point enabler" which can be used to set
parameters manually to enable a card when
.Xr pccardd 8
cannot allocate drivers to a PC-CARD card properly.
Specify a PC-CARD slot in
.Ar slot
and a device name (such as "ed0" or "sio2") in
.Ar driver ,
along with some or all of the following options:
.Bl -tag -width Ds
.It Fl m Ar card addr size
maps the shared-memory window of the card to host address.
.Ar card
is the starting address of shared-memory (hex) in the card's address space,
.Ar addr
is the address (hex) to map the memory to in the computer's address space, and
.Ar size
is the size of memory window (kb).
.It Fl a Ar iobase
.Ar iobase
specifies the port a number to be mapped to the I/O window (hex)
.It Fl i Ar irq
.Ar irq
specifies the IRQ (decimal from 1 to 15) the card will use for interrupts.
.El
.Pp
For example,
.Bd -literal
enabler 0 ed0 -m 2000 d4000 16 -a 300 -i 3
.Ed
.Pp
assigns the card in slot zero to the first NE2000 ethernet card driver at
port 0x300 and IRQ 3,
mapping the 16KB memory region at 0x2000 in the card to 0xd4000.
.Pp
This allows use of some unrecognized cards with broken CIS tuples,
and is also useful for testing a card that has not yet reported.
However, beware that it frequently cannot recognize new cards properly.
.It
.Nm help
.Pp
Prints help for
.Nm pccardc .
.It
.Nm pccardmem Ar addr
.Pp
Specifies the host address using PC-CARD controller(PCIC)
will use to map cards to.
Because the PCIC needs a contiguous 16KB memory,
you can only use the following four addresses:
.Pp
.Bl -tag -width 0xd0000 -compact
.It Ar 0xd0000
0xd0000-0xd3fff (default)
.It Ar 0xd4000
0xd4000-0xd7fff
.It Ar 0xd8000
0xd8000-0xdbfff
.It Ar 0xdc000
0xdc000-0xdffff
.El
.Pp
You can use "DEFAULT" instead of 0xd0000.
This subcommand corresponds to
.Pa pccard_mem
in
.Xr rc.conf 5 .
.It
.Nm rdattr Ar slot offs length
.Pp
Prints a hex dump
.Ar length
bytes long of the EEPROM of the card in slot
.Ar slot
starting at
.Ar offs .
All parameters are in hex.
.It
.Nm rdmap
.Op Ar slot
.Pp
Displays where the four memory windows and two I/O windows of a PC-CARD slot
are mapped to on the host.
If
.Ar slot
is not supplied, it displays the information for all of slots in the system.
.It
.Nm rdreg
.Op Ar slot
.Pp
Displays the 64 registers of the card in
.Ar slot
(all slots by default).
.It
.Nm wrattr Ar slot offs value
.Pp
Writes a single byte to the card's EEPROM at
an offset address from the top specified in
.Ar offs
(hex),
with a value specified in
.Ar value
(hex).
This is preserved after the card is removed.
.It
.Nm wrreg Ar slot reg value
.Pp
Writes a register of a PC-CARD.
Specify a PC-CARD slot number in
.Ar slot ,
a register number in
.Ar reg
(hex) and
a value in
.Ar value
(hex).
.El
.Pp
.Sh FILES
.Bl -tag -width /etc/rc.conf -compact
.It Pa /etc/rc.conf
configuration file
.El
.Sh SEE ALSO
.Xr rc.conf 5 ,
.Xr pccardd 8
.Sh AUTHORS
The original version was written by
.An Andrew McRae Aq andrew@mega.com.au .
.An Tatsumi Hosokawa Aq hosokawa@mt.cs.keio.ac.jp
fixed bugs and added some features.
This man page was written by
.An Toshihiko ARAI Aq toshi@jp.FreeBSD.org .
.Sh BUGS
Be careful when using
.Nm enabler
and
.Nm wrattr .
Misuse can make the system unstable or damage the card.