ia64/xen-unstable

changeset 10845:df80de098d15

[PCI] Two policy files written in what is intended to be human-readable SXP.

1. xend-pci-quirks.sxp:

Specifies which PCI device(s) may write to a set of PCI configuration
space registers. A quirky PCI device is identified by its vendor ID,
device ID, subvendor ID, and subdevice ID. If a matching entry is
found, the corresponding fields will be sent to the PCI bus manager.
Fields are composed of a register, size, and mask -- although the mask
field is currently unused.

The included policy file is for a range of tg3 devices, which is the
only type of quirky device I know about. Users with other quirky
devices are invited to either add entries to this policy file or add
an entry in the permissive file, described next. In either case, send an
email to the xen-devel list to make the device known.

2. xend-pci-permissive.sxp

Lists PCI devices that pciback should not prevent from writing to
their configuration space. This can be necessary if, for example, a new
Tigon3 devices is released with different PCI vendor/device values
such that no entry in xend-pci-quirks.sxp is triggered.

Signed-off-by: Chris Bookholt <hap10@tycho.ncsc.mil>
author kfraser@localhost.localdomain
date Fri Jul 28 12:59:48 2006 +0100 (2006-07-28)
parents 8cd577110904
children a438506e241d
files tools/examples/Makefile tools/examples/xend-pci-permissive.sxp tools/examples/xend-pci-quirks.sxp
line diff
     1.1 --- a/tools/examples/Makefile	Fri Jul 28 12:57:55 2006 +0100
     1.2 +++ b/tools/examples/Makefile	Fri Jul 28 12:59:48 2006 +0100
     1.3 @@ -18,6 +18,8 @@ XEN_CONFIGS += xmexample1
     1.4  XEN_CONFIGS += xmexample2
     1.5  XEN_CONFIGS += xmexample.hvm
     1.6  XEN_CONFIGS += xmexample.vti
     1.7 +XEN_CONFIGS += xend-pci-quirks.sxp
     1.8 +XEN_CONFIGS += xend-pci-permissive.sxp
     1.9  
    1.10  # Xen script dir and scripts to go there.
    1.11  XEN_SCRIPT_DIR = /etc/xen/scripts
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tools/examples/xend-pci-permissive.sxp	Fri Jul 28 12:59:48 2006 +0100
     2.3 @@ -0,0 +1,27 @@
     2.4 +###############################################################################
     2.5 +# Configuration file for granting quiry PCI devices full write access to their 
     2.6 +# configuration space.  This file should only be used when you are unable to 
     2.7 +# determine the exact registers required by your device.  Even so, it should 
     2.8 +# be used only temporarily.
     2.9 +# 
    2.10 +# SEND A MESSAGE TO xen-devel@lists.xensource.com IF YOU USE THIS FILE.
    2.11 +# 
    2.12 +# Using this file should NOT be necessary.  If you must use it to make some
    2.13 +# device work, send a message to the above list with as much information about 
    2.14 +# your device as possible so the developers can make accomodations for it.  
    2.15 +# Once developers make the necessary updates you can remove the corresponding
    2.16 +# entry for your device. 
    2.17 +###############################################################################
    2.18 +# Entries are formated as follows:  <vendor>:<device>[:<subvendor>:<subdevice>]
    2.19 +# 
    2.20 +# Example: Appending to an existing list
    2.21 +#  
    2.22 +# (unconstrained_dev_ids
    2.23 +#     ('XXXX:XXXX:XXXX:XXXX'	# existing entry
    2.24 +#      'YYYY:YYYY:YYYY:YYYY' 	# new entry 1
    2.25 +#      'ZZZZ:ZZZZ')		# new entry 2
    2.26 +# )
    2.27 +###############################################################################
    2.28 +(unconstrained_dev_ids
    2.29 +     #('0123:4567:89AB:CDEF')
    2.30 +)
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tools/examples/xend-pci-quirks.sxp	Fri Jul 28 12:59:48 2006 +0100
     3.3 @@ -0,0 +1,96 @@
     3.4 +###############################################################################
     3.5 +# Configuration file for quirky PCI devices that require write-access to 
     3.6 +# parts of the configuration space.  Use this file to specific PCI device
     3.7 +# IDs and the configuration space fields to which those devices must be
     3.8 +# able to write.
     3.9 +#
    3.10 +# Length is important, so be sure to match new entries with the 
    3.11 +# lengths of comparable existing entries. 
    3.12 +#
    3.13 +# Additions to this file take effect as soon as a new domain with a 
    3.14 +# matching device is started.  However, to remove a field that was 
    3.15 +# previously applied to a device you must unbind the device from 
    3.16 +# pciback.
    3.17 +###############################################################################
    3.18 +# This is a bogus entry to show how a new device would be added to the list
    3.19 +#
    3.20 +# (new_quirky_dev_name
    3.21 +#    (pci_ids 
    3.22 +#       ('0123:4567:890A:BCEF') 
    3.23 +#    )
    3.24 +#
    3.25 +#    (pci_config_space_fields 
    3.26 +#       ('12345678:1:00000000')
    3.27 +#    )
    3.28 +# )
    3.29 +###############################################################################
    3.30 +
    3.31 +(tg3
    3.32 +    (pci_ids
    3.33 +	# Entries are formated as follows:  
    3.34 +	#     <vendor>:<device>[:<subvendor>:<subdevice>]
    3.35 +        ('14e4:1644'   # Broadcom Tigon3 5700
    3.36 +    	 '14e4:1645'   # Broadcom Tigon3 5701
    3.37 +         '14e4:1646'   # Broadcom Tigon3 5702
    3.38 +         '14e4:1647'   # Broadcom Tigon3 5703
    3.39 +         '14e4:1648'   # Broadcom Tigon3 5704
    3.40 +         '14e4:164d'   # Broadcom Tigon3 5702FE
    3.41 +         '14e4:1653'   # Broadcom Tigon3 5705
    3.42 +         '14e4:1654'   # Broadcom Tigon3 5705_2
    3.43 +         '14e4:165d'   # Broadcom Tigon3 5705M
    3.44 +         '14e4:165e'   # Broadcom Tigon3 5705M_2
    3.45 +         '14e4:16a6'   # Broadcom Tigon3 5702X
    3.46 +         '14e4:16a7'   # Broadcom Tigon3 5703X
    3.47 +         '14e4:16a8'   # Broadcom Tigon3 5704S
    3.48 +         '14e4:16c6'   # Broadcom Tigon3 5702A3
    3.49 +         '14e4:16c7'   # Broadcom Tigon3 5703A3
    3.50 +         '14e4:1696'   # Broadcom Tigon3 5782
    3.51 +         '14e4:169c'   # Broadcom Tigon3 5788
    3.52 +         '14e4:169d'   # Broadcom Tigon3 5789
    3.53 +         '14e4:170d'   # Broadcom Tigon3 5901
    3.54 +         '14e4:1649'   # Broadcom Tigon3 5704S_2
    3.55 +         '14e4:166e'   # Broadcom Tigon3 5705F
    3.56 +         '14e4:1658'   # Broadcom Tigon3 5720
    3.57 +         '14e4:1659'   # Broadcom Tigon3 5721
    3.58 +         '14e4:1676'   # Broadcom Tigon3 5750
    3.59 +         '14e4:1677'   # Broadcom Tigon3 5751
    3.60 +         '14e4:167c'   # Broadcom Tigon3 5750M
    3.61 +         '14e4:167d'   # Broadcom Tigon3 5751M
    3.62 +         '14e4:167e'   # Broadcom Tigon3 5751F
    3.63 +         '14e4:1600'   # Broadcom Tigon3 5752
    3.64 +         '14e4:1601'   # Broadcom Tigon3 5752M
    3.65 +         '14e4:16f7'   # Broadcom Tigon3 5753
    3.66 +         '14e4:16fd'   # Broadcom Tigon3 5753M
    3.67 +         '14e4:16fe'   # Broadcom Tigon3 5753F
    3.68 +         '14e4:1668'   # Broadcom Tigon3 5714
    3.69 +         '14e4:1678'   # Broadcom Tigon3 5715
    3.70 +         '14e4:166a'   # Broadcom Tigon3 5780
    3.71 +         '14e4:166b'   # Broadcom Tigon3 5780S
    3.72 +         '14e4:16dd'   # Broadcom Tigon3 5781
    3.73 +         '1148:4400'   # Syskonnect 9DXX
    3.74 +         '1148:4500'   # Syskonnect 9MXX
    3.75 +         '173b:03e8'   # Altima AC1000
    3.76 +         '173b:03e9'   # Altima AC1001
    3.77 +         '173b:03eb'   # Altima AC1003
    3.78 +         '173b:03ea'   # Altima AC9100
    3.79 +         '106b:1645')  # Apple Tigon3
    3.80 +    )
    3.81 +
    3.82 +    (pci_config_space_fields
    3.83 +	# Entries are formated as follows:  
    3.84 +    	#     <register>:<size>:<mask>
    3.85 +    	# size is measured in bytes (1,2,4 are valid sizes)
    3.86 +    	# mask is currently unused; use all zero's
    3.87 +        ('00000078:4:00000000'   # TG3PCI_REG_BASE_ADDR
    3.88 +         '0000007c:4:00000000'   # TG3PCI_MEM_WIN_BASE_ADDR
    3.89 +         '00000080:4:00000000'   # TG3PCI_REG_DATA
    3.90 +         '00000084:4:00000000'   # TG3PCI_MEM_WIN_DATA
    3.91 +         '00000090:4:00000000'   # TG3PCI_MISC_LOCAL_CTRL
    3.92 +         '00000068:4:00000000'   # TG3PCI_MISC_HOST_CTRL
    3.93 +         '0000009C:4:00000000'   # TG3PCI_STD_RING_PROD_IDX + TG3_64BIT_REG_LOW
    3.94 +         '00000098:4:00000000'   # TG3PCI_STD_RING_PROD_IDX + TG3_64BIT_REG_HIGH
    3.95 +         '000000a4:4:00000000'   # TG3PCI_RCV_RET_RING_CON_IDX + TG3_64BIT_REG_LOW
    3.96 +         '000000a0:4:00000000'   # TG3PCI_RCV_RET_RING_CON_IDX + TG3_64BIT_REG_HIGH
    3.97 +         '00000070:4:00000000')  # TG3PCI_PCISTATE
    3.98 +    )
    3.99 +)