FreeBSD-5.3/usr.sbin/pccard/pccardc/pccardc.8

Compare this file to the similar file:
Show the results in this format:

.\"
.\" 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>
.\"
.\" $FreeBSD: src/usr.sbin/pccard/pccardc/pccardc.8,v 1.20 2004/07/02 23:12:51 ru Exp $
.\"
.Dd November 14, 1998
.Dt PCCARDC 8
.Os
.Sh NAME
.Nm pccardc
.Nd PC-CARD (PCMCIA) management and monitoring tool
.Sh SYNOPSIS
.Nm
.Ar subcommand
.Op Ar arg ...
.Sh DESCRIPTION
The
.Nm
utility controls PC-CARD slots and configures and displays information
about PCMCIA cards.
It understands the following subcommands:
.Pp
.Bl -tag -width dumpcisfile -compact
.It Ic beep
Set beep type
.It Ic dumpcis
Print card CIS(s)
.It Ic dumpcisfile
Print card CIS(s) from files
.It Ic enabler
Device driver enabler
.It Ic help
Print command summary
.It Ic pccardmem
Allocate memory for pccard driver
.It Ic power
Power on/off slots and leaves them disabled
.It Ic rdattr
Read attribute memory
.It Ic rdmap
Read pcic mappings
.It Ic rdreg
Read pcic register
.It Ic wrattr
Write byte to attribute memory
.It Ic wrreg
Write pcic register
.El
.Bl -enum
.It
.Ic beep Ar beep_mode
.Pp
Specifies the sound made upon card insertion or removal.
This subcommand corresponds to
.Va pccard_beep
in
.Xr rc.conf 5 .
Allowed values for
.Ar beep_mode
are:
.Pp
.Bl -tag -width Ds -compact
.It Li 0
silent mode
.It Li 1
simple beep mode
.It Li 2
melody mode
.El
.It
.Ic 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
.Ic dumpcisfile
.Ar
.Pp
Displays CIS(s) in the same format as
.Ic dumpcis ,
but does so using
one or more files
as the input CIS data instead of physical PC-CARD cards.
.It
.Ic 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
.Ic help
.Pp
Prints help for
.Nm .
.It
.Ic 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, and most machines
have other ROMs or devices at other places in the ISA I/O memory
address range, generally 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
.Va pccard_mem
in
.Xr rc.conf 5 .
.It
.Ic power Ar slot power_mode
.Pp
Changes the state of the power supply of the card in the specified
.Ar slot :
.Pp
.Bl -tag -width Ds
.It Li 0
Turn off a power supply.
If a card becomes unstable when it is removed at
activate state,
this can force it into inactive state first and remove it safely.
The slot will remain disabled until you eject the card with the system
running or reenable the card with another
.Ic pccardc power
power command.
The slot will even remain disabled when you suspend and resume the
computer.
.It Li 1
Turn on a power supply and set it into active state
(the system treats the card as if it was just inserted).
.El
.Pp
.It
.Ic 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
.Ic 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
.Ic rdreg
.Op Ar slot
.Pp
Displays the 64 registers of the card in
.Ar slot
(all slots by default).
.It
.Ic 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
.Ic 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
.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
.An -nosplit
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
.Ic enabler
and
.Ic wrattr .
Misuse can make the system unstable or damage the card.