xref: /titanic_51/usr/src/uts/common/io/pshot.conf (revision 78add226e8da271dde8f3b5a91d340d1bf010151)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*78add226Sjmcp# Common Development and Distribution License (the "License").
6*78add226Sjmcp# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22*78add226Sjmcp# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
237c478bd9Sstevel@tonic-gate#
247c478bd9Sstevel@tonic-gate
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate# pshot is a pseudo driver for use in tests, together with another
277c478bd9Sstevel@tonic-gate# pseudo driver, gen_drv.  These drivers' binaries are contained
28*78add226Sjmcp# in the system/io/tests package (formerly known as SUNWiotu
29*78add226Sjmcp# and SUNWiotux).
307c478bd9Sstevel@tonic-gate# These packages are not bundled as part of Solaris however.
317c478bd9Sstevel@tonic-gate#
327c478bd9Sstevel@tonic-gate# Once installed, these drivers may be enabled by running add_drv:
337c478bd9Sstevel@tonic-gate#
347c478bd9Sstevel@tonic-gate#	add_drv -i 'SUNW,pshot' pshot
357c478bd9Sstevel@tonic-gate#	add_drv -i 'SUNW,gen_drv' gen_drv
367c478bd9Sstevel@tonic-gate#
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gatename="pshot" class="root";
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gate#
427c478bd9Sstevel@tonic-gate# How to add support for devices not included with the stock package, by
437c478bd9Sstevel@tonic-gate# certain array properties:
447c478bd9Sstevel@tonic-gate# (see pshot.h for the values of the <PSHOT_PROP_DEV.*> property names)
457c478bd9Sstevel@tonic-gate#
467c478bd9Sstevel@tonic-gate#
477c478bd9Sstevel@tonic-gate# corresponding         |   pshot_device_t array elements
487c478bd9Sstevel@tonic-gate# pshot_device_t        |
497c478bd9Sstevel@tonic-gate# member by prop name   |   [0]            [1]           [2]
507c478bd9Sstevel@tonic-gate# ----------------------|--------------|-------------|-----------------------
517c478bd9Sstevel@tonic-gate# <PSHOT_PROP_DEVNAME>  ="disk",        "tape",       "testdev";
527c478bd9Sstevel@tonic-gate# <PSHOT_PROP_DEVNT>    ="DDI_NT_BLOCK","DDI_NT_TAPE","ddi_testdev_nodetype";
537c478bd9Sstevel@tonic-gate# <PSHOT_PROP_DEVCOMPAT>="testdrv",     "testdrv",    "testdrv";
547c478bd9Sstevel@tonic-gate#
557c478bd9Sstevel@tonic-gate#
567c478bd9Sstevel@tonic-gate# this example adds 3 devices that may be parented by pshot:
577c478bd9Sstevel@tonic-gate#			dev1		dev2		dev3
587c478bd9Sstevel@tonic-gate#			----		----		----
597c478bd9Sstevel@tonic-gate# node name:		disk		tape		testdev
607c478bd9Sstevel@tonic-gate# node type:		DDI_NT_BLOCK	DDI_NT_TAPE	"ddi_testdev_nodetype"
617c478bd9Sstevel@tonic-gate# compatible driver:	testdrv		testdrv		testdrv
627c478bd9Sstevel@tonic-gate#
637c478bd9Sstevel@tonic-gate# if any of these properties are specified, then:
647c478bd9Sstevel@tonic-gate# - all the members must be specified
657c478bd9Sstevel@tonic-gate# - the number of elements for each string array property must be the same
667c478bd9Sstevel@tonic-gate# - no empty strings allowed
677c478bd9Sstevel@tonic-gate# - nodetypes (PSHOT_PROP_DEVNT) must be the nodetype name as specified in
687c478bd9Sstevel@tonic-gate#   sys/sunddi.h -- caveat: see below
697c478bd9Sstevel@tonic-gate#
707c478bd9Sstevel@tonic-gate# Current implementation allows for overriding of stock devices
717c478bd9Sstevel@tonic-gate#	e.g. if the "disk" device is bound to the "gen_drv" driver, you may
727c478bd9Sstevel@tonic-gate#	override that with your own driver,
737c478bd9Sstevel@tonic-gate# as well as custom nodetypes
747c478bd9Sstevel@tonic-gate#	i.e. if a value for <PSHOT_PROP_DEVNT> does not not match a known
757c478bd9Sstevel@tonic-gate#	nodetype name, such as "DDI_NT_BLOCK" etc., then the supplied value
767c478bd9Sstevel@tonic-gate#	will be used verbatim
777c478bd9Sstevel@tonic-gate#
787c478bd9Sstevel@tonic-gate# In addition, the current implementation only require that these properties
797c478bd9Sstevel@tonic-gate# be specified for a single pshot instance in order to apply globably, so it's
807c478bd9Sstevel@tonic-gate# possible to unclutter a device tree snapshot by applying these properties
817c478bd9Sstevel@tonic-gate# just to the root pshot instance with a physically single long line of
827c478bd9Sstevel@tonic-gate# property assignments:
837c478bd9Sstevel@tonic-gate#    name="pshot" parent="/" <PSHOT_PROP_DEVNAME>="..",".." <PSHOT_PROP*>= ..;
847c478bd9Sstevel@tonic-gate#
85