JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 4: File Formats     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

Introduction

File Formats

addresses(4)

admin(4)

alias(4)

aliases(4)

a.out(4)

au(4)

audit_class(4)

audit_event(4)

audit.log(4)

auth_attr(4)

autofs(4)

bart_manifest(4)

bart_rules(4)

bootparams(4)

cardbus(4)

compver(4)

contents(4)

contract(4)

copyright(4)

core(4)

crypt.conf(4)

crypto_certs(4)

dacf.conf(4)

dat.conf(4)

defaultdomain(4)

default_fs(4)

defaultrouter(4)

depend(4)

device_allocate(4)

device_contract(4)

device_maps(4)

devices(4)

devid_cache(4)

devname_cache(4)

dfstab(4)

dhcp_inittab(4)

dhcp_network(4)

dhcpsvc.conf(4)

dhcptab(4)

dialups(4)

dir(4)

dir_ufs(4)

d_passwd(4)

driver(4)

driver.conf(4)

ds.log(4)

dumpdates(4)

ethers(4)

exec_attr(4)

fbtab(4)

fd(4)

fdi(4)

flash_archive(4)

format.dat(4)

forward(4)

fs(4)

fspec(4)

fstypes(4)

ftp(4)

ftpusers(4)

fx_dptbl(4)

gateways(4)

geniconvtbl(4)

group(4)

gsscred.conf(4)

hba.conf(4)

holidays(4)

hosts(4)

hosts.equiv(4)

ib(4)

idnkit.pc(4)

ike.config(4)

ike.preshared(4)

inetd.conf(4)

inet_type(4)

infiniband_hca_persistent_cache(4)

init.d(4)

inittab(4)

ipaddrsel.conf(4)

ipf(4)

ipf.conf(4)

ipnat(4)

ipnat.conf(4)

ipnodes(4)

ippool(4)

ippool.conf(4)

isa(4)

issue(4)

kadm5.acl(4)

kdc.conf(4)

keytables(4)

krb5.conf(4)

label_encodings(4)

ldapfilter.conf(4)

ldapsearchprefs.conf(4)

ldaptemplates.conf(4)

llc2(4)

logadm.conf(4)

logindevperm(4)

loginlog(4)

magic(4)

md.cf(4)

mddb.cf(4)

mdi_ib_cache(4)

mdi_scsi_vhci_cache(4)

md.tab(4)

mech(4)

meddb(4)

mnttab(4)

mod_ipp(4)

mpapi.conf(4)

named.conf(4)

ncad_addr(4)

nca.if(4)

ncakmod.conf(4)

ncalogd.conf(4)

ncaport.conf(4)

ndmp(4)

ndpd.conf(4)

netconfig(4)

netgroup(4)

netid(4)

netmasks(4)

netrc(4)

networks(4)

nfs(4)

nfslog.conf(4)

nfssec.conf(4)

NISLDAPmapping(4)

nodename(4)

nologin(4)

note(4)

notrouter(4)

nscd.conf(4)

nss(4)

nsswitch.conf(4)

packingrules(4)

pam.conf(4)

passwd(4)

path_to_inst(4)

pci(4)

pcie(4)

pci_unitaddr_persistent(4)

phones(4)

pkginfo(4)

pkgmap(4)

plot(4B)

policy.conf(4)

priv_names(4)

proc(4)

process(4)

prof_attr(4)

profile(4)

project(4)

protocols(4)

prototype(4)

pseudo(4)

publickey(4)

qop(4)

queuedefs(4)

rcmscript(4)

rdc.cf(4)

registration_profile(4)

remote(4)

resolv.conf(4)

rhosts(4)

rmtab(4)

rndc.conf(4)

rpc(4)

rt_dptbl(4)

sasl_appname.conf(4)

sbus(4)

sccsfile(4)

scsi(4)

securenets(4)

sel_config(4)

sendmail(4)

sendmail.cf(4)

service_bundle(4)

service_provider.conf(4)

services(4)

shadow(4)

sharetab(4)

shells(4)

slp.conf(4)

slpd.reg(4)

smb(4)

smbautohome(4)

smhba.conf(4)

snapshot_cache(4)

sndr(4)

sock2path.d(4)

space(4)

ssh_config(4)

sshd_config(4)

submit.cf(4)

sulog(4)

sysbus(4)

syslog.conf(4)

system(4)

telnetrc(4)

term(4)

terminfo(4)

TIMEZONE(4)

timezone(4)

TrustedExtensionsPolicy(4)

ts_dptbl(4)

ttydefs(4)

ttysrch(4)

ufsdump(4)

updaters(4)

user_attr(4)

utmp(4)

utmpx(4)

vfstab(4)

volume-config(4)

volume-defaults(4)

volume-request(4)

wanboot.conf(4)

warn.conf(4)

wtmp(4)

wtmpx(4)

ypfiles(4)

yppasswdd(4)

ypserv(4)

zoneinfo(4)

pci

, pcie

- configuration files for PCI and PCI Express device drivers

Description

The Peripheral Component Interconnect (PCI) bus is a little endian bus. PCI Express (PCIe) and PCI-X are successors to PCI. All three types of devices share the same configuration parameters. What is specified here for PCI devices applies to PCI-X 1.0 devices as well. All three types of devices are self-identifying, which means that these devices provide configuration parameters to the system that allow the system to identify the device and its driver. The configuration parameters are represented in the form of name-value pairs that can be retrieved using the DDI property interfaces. See ddi_prop_lookup(9F) for details.

The bus properties of PCI devices or logical bus properties of PCIe devices are derived from PCI configuration space, or supplied by the Fcode PROM, if it exists. Therefore, driver configuration files are not necessary for these devices.

On some occasions, drivers for PCI and PCIe devices can use driver configuration files to provide driver private properties through the global property mechanism. See driver.conf(4) for further details. Driver configuration files can also be used to augment or override properties for a specific instance of a driver.

All bus drivers of PCI and PCIe devices recognize the following properties:

reg

An arbitrary length array where each element of the array consists of a 5-tuple of 32-bit values. Each array element describes a logically contiguous mappable resource on the PCI bus or PCIe device tree.

The first three values in the 5-tuple describe the PCI address of the mappable resource. The first tuple contains the following information:

Bits 0 - 7
8-bit register number
Bits 8 - 10
3-bit function number
Bits 11 - 15
5-bit device number
Bits 16 - 23
8-bit bus number
Bits 24 - 25
2-bit address space type identifier
Bits 31 – 28
Register number extended bits 8:11 for extended config space. Zero for conventional configuration space.

The address space type identifier can be interpreted as follows:

0x0
configuration space
0x1
I/O space
0x2
32-bit memory space address
0x3
64-bit memory space address

The bus number is a unique identifying number assigned to each PCI bus or PCIe logical bus within its domain.

The device number is a unique identifying number assigned to each device on a PCI bus or PCIe logical bus. Note that a device number is unique only within the set of device numbers for a particular bus or logical bus.

Each PCI or PCIe device can have one to eight logically independent functions, each with its own independent set of configuration registers. Each function on a device is assigned a function number. For a device with only one function, the function number must be 0.

The register number fields select a particular register within the set of configuration registers corresponding to the selected function. When the address space type identifier indicates configuration space, non-zero register number extended bits select registers in extended configuration space.

The second and third values in the reg property 5-tuple specify the 64-bit address of the mappable resource within the PCI or PCIe address domain. The second 32-bit tuple corresponds to the high order four bytes of the 64-bit address. The third 32-bit tuple corresponds to the low order bytes.

The fourth and fifth 32-bit values in the 5-tuple reg property specify the size of the mappable resource. The size is a 64-bit value, where the fourth tuple corresponds to the high order bytes of the 64-bit size and the fifth corresponds to the low order.

The driver can refer to the elements of this array by index, and construct kernel mappings to these addresses using ddi_regs_map_setup(9F). The index into the array is passed as the rnumber argument of ddi_regs_map_setup(9F).

At a high-level interrupt context, you can use the ddi_get* and ddi_put* family of functions to access I/O and memory space. However, access to configuration space is not allowed when running at a high-interrupt level.

interrupts

This property consists of a single-integer element array. Valid interrupt property values are 1, 2, 3, and 4. This value is derived directly from the contents of the device's configuration-interrupt-pin register.

A driver should use an index value of 0 when registering its interrupt handler with the DDI interrupt interfaces.

All PCI and PCIe devices support the reg property. The device number and function number as derived from the reg property are used to construct the address part of the device name under /devices.

Only devices that generate interrupts support an interrupts property.

Occasionally it might be necessary to override or augment the configuration information supplied by a PCI or PCIe device. This change can be achieved by writing a driver configuration file that describes a prototype device node specification containing the additional properties required.

For the system to merge the prototype node specification into an actual device node, certain conditions must be met.

DD[,F]

where DD is the device number and F is the function number. If the function number is 0, only DD is specified.

Examples

Example 1 Sample Configuration File

An example configuration file called ACME,scsi-hba.conf for a PCI driver called ACME,scsi-hba follows:

#
# Copyright (c) 1995, ACME SCSI Host Bus Adaptor
# ident   "@(#)ACME,scsi-hba.conf  1.1  96/02/04"
name="ACME,scsi-hba" parent="/pci@1,0/pci@1f,4000"
   unit-address="3" scsi-initiator-id=6;
hba-advanced-mode="on";
hba-dma-speed=10;

In this example, a property scsi-initiator-id specifies the SCSI bus initiator id that the adapter should use, for just one particular instance of adapter installed in the machine. The name property identifies the driver and the parent property to identify the particular bus the card is plugged into. This example uses the parent's full path name to identify the bus. The unit-address property identifies the card itself, with device number of 3 and function number of 0.

Two global driver properties are also created: hba-advanced-mode (which has the string value on) and hba-dma-speed (which has the value 10 M bit/s). These properties apply to all device nodes of the ACME,scsi-hba.

Configuration files for PCIe devices are similar. Shown below is an example configuration file called ACME,pcie-widget.conf for a PCIe driver called ACME,pcie-widget.

#
# Copyright (c) 2005, ACME PCIe Widget Adapter
# ident   "@(#)ACME,pcie-widget.conf  1.1  05/11/14"
name="ACME,pcie-widget" parent="/pci@780" unit-address="2,1"
debug-mode=12;

In this example, we provide a property debug-mode for a particular PCIe device. As before, the logical bus is identified by the pathname of the parent of the device. The device has a device number of 2, and a function number of 1.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Architecture
SPARC, x86

See Also

driver.conf(4), attributes(5), ddi_intr_add_handler(9F), ddi_prop_lookup(9F), ddi_regs_map_setup(9F)

Writing Device Drivers

IEEE 1275 PCI Bus Binding

http://playground.sun.com/1275/bindings/pci/pci-express.txt

Notes

PCIe devices support an extended configuration space unavailable to PCI devices. While PCIe devices can be operated using a PCI device driver, operating them using a PCIe device driver can make use of the extended properties and features made available only in the extended configuration space.