/* Copyright (c) 1996,1997, by Sun Microsystems, Inc.
 *All Rights Reserved.
 */

	ident	"@(#)README	1.4	97/09/02 SMI"

DRIVER NAME:

	pcsram.c - Solaris PC Card Memory Sample Driver

ARCHITECTURES:

	SPARC, x86

DESCRIPTION OF DRIVER:

	This is a simple Solaris PCMCIA memory client driver.

	The sample memory driver is a part pf the Solaris
	PCMCIA Device Driver Developer's Kit (DDK).

	This sample driver can be used to support disk-like
	I/O access to a standard PCMCIA Non-Volatile Static
	RAM (SRAM) with Card Structure Information (CIS).

	Note that this sample driver will not support any
	memory card that does not have CIS.

	This is a a block device driver which also provides
	a raw character driver interface.

	The sample driver only supports single partition s2.

	fdformat(1) is the only utility that can be used for
	formatting a SRAM memory card.

	format(1M) utility does not support PCMCIA memory card.

	Note that the label and DKIO ioctl features of the
	drivers are not strictly DDI/DKI-compliant, but also
	that there is no strictly DDI/DKI-compliant means to
	deal with disk labelling and ioctl's.

SOURCE FILES:

        README          this file
        Makefile        Makefile for pcsram driver
        Install.sh      driver installation script
        Remove.sh       driver removal script
	pcsram.c	driver source code
	pcsram.h	driver data structure header file

COMPILING/LOADING:

	To compile and link the driver:

		use the Makefile provided in the driver subdirectory,
		driver_dev/sample_drvs/pcsram; the executable files
		will be built in an architecture-specific subdirectory
		depending on the architecture of the build machine
		(i.e., pcsram/i386 or pcsram/ppc or pcsram/sparc)

	To install the driver:

		1. In order to use this sample memory driver, the
		   released PCMCIA memory card nexus driver
		   pcmem(7D) and memory card device driver
		   pcram(7D) which are from SUNWpcmem package
		   must be removed to avoid any conflict between
		   pcmem/pcram and this sample DDK driver pcsram
		   and do following steps:

			# pkgrm SUNWpcmem
			# reboot

		   Note that the above reboot step is required in order
		   to unload PCMCIA memory card nexus driver (pcmem).

		2. Insert a PCMCIA SRAM memory card and use the 
		   installation script to install the driver:

			# sh Install.sh

	To test the driver:

		The symbolic link of a memory card in /dev/[r]dsk
		has a form of cNdSs2 where:  
		
			cN  is a arbitrary number which is assigned
			    by disks(1M) program.
			dS  is the number of the disk attached to 
			    the PCMCIA controller and S represents
			    a PCMCIA socket number.

		for example:

			cNd1s2		memory card in socket #1
			cNd3s2          memory card in socket #3

		To format a SRAM memory card in the socket #1 with
		a UFS file system, use fdformat(1) utility:

			# /usr/bin/fdformat /dev/dsk/c1d1s2
			# /usr/sbin/newfs /dev/dsk/c1d1s2
			# /usr/sbin/mount -F ufs /dev/dsk/c1d1s2 /mnt

		To create a DOS file system:

			# /usr/bin/fdformat -t dos /dev/dsk/c1d1s2
			# /usr/sbin/mount -F pcfs /dev/dsk/c1d1s2 /mnt

		Note that you must use a DOS file system to transfer
		data between platforms.

		After finishing using the memory card, you must
		unmount the file system by doing:

			# umount /mnt

	To uninstall the driver:

		1. Use the removal script to uninstall the driver:

			# sh Remove.sh

		2. Restore the released pcmem(7D)/pcram(7D) memory
		   card drivers.  From the Solaris Distribution
		   Software CDROM, go to the appropriate directory
		   that contains SUNWpcmem package and do: 

			# pkgadd -d `pwd` SUNWpcmem
                	# reboot

REFERENCES:
	
        SunOS 5.6 Writing Device Drivers
