[ Pobierz całość w formacie PDF ]
.Each device has a uniquename representing both the type of device and the location of that device in the systemaddressing structure.The following example shows a full device pathname for a systemwith SBus architecture, such as a SPARCstation20:/sbus@1f,0/esp@0,40000/sd@3,0:a04 2496 Ch02 8/30/00 1:07 PM Page 39PROM FULL DEVICE NAMES 39This example shows a full device pathname for a PCI bus system such as an Ultra5:/pci@1f,0/pci@1,1/ide@3/diskA full device pathname is a series of node names separated by slashes (/).The root of thetree is the machine node, which is not named explicitly but is indicated by a leading slash(/).Each device pathname has this form:driver-name@unit-address:device-argumentsThe components of the device pathname are described in Table 2-3.Table 2-3 Device Pathname ParametersParameter Descriptiondriver-name A human-readable string consisting of 1 to 31 letters, digits, and the followingpunctuation characters: ,._ + -Uppercase and lowercase characters are distinct.In some cases, the driver nameincludes the name of the device s manufacturer and the device s model name,separated by a comma.Typically, the manufacturer s uppercase, publicly listedstock symbol is used as the manufacturer s name (that is, SUNW,hme0).Forbuilt-in devices, the manufacturer s name is usually omitted (that is, sbus or pci).@ must precede the address parameter and serves as a separator between thedriver name and unit address.unit-address A text string representing the physical address of the device in its parent saddress space.The exact meaning of a particular address depends on the bus towhich the device is attached.In this example:/sbus@1f,0/esp@0,40000/sd@3,0:a1f,0 represents an address on the main system bus, because the SBus isdirectly attached to the main system bus in this example.0,40000 is an SBus slot number.The example shows that the device is in SBusslot 0 and the offset is 40000.3,0 is a SCSI target and logical unit number.In the example, the disk device isattached to a SCSI bus at target 3, logical unit 0.See Appendix C, Overview of SCSI Devices, for more information on SCSI hostadapters, targets, and logical units.device-arguments A text string whose format depends on the particular device.It can be used topass additional information to the device s software.In this example:/sbus@1f,0/scsi@2,1/sd@3,0:aThe argument for the disk device is a. The software driver for this device inter-prets its argument as a disk partition, so the device pathname refers to partition a on that disk.04 2496 Ch02 8/30/00 1:08 PM Page 4040 CHAPTER 2 OPENBOOTThe OpenBoot command show-devs is used to obtain information about devices and to dis-play device pathnames.This command displays all the devices known to the system directlybeneath a given device in the device hierarchy.show-devs used by itself shows the entiredevice tree.The syntax isshow-devs [device path]Example:ok show-devsThe system outputs the following information:/TI,TMS390Z50@f,f8fffffc/eccmemctl@f,0/virtual-memory@0,0/memory@0,0/obio/iommu@f,e0000000/openprom/aliases/options/packages/obio/power@0,a01000/obio/auxio@0,800000/obio/SUNW,fdtwo@0,700000/obio/interrupt@0,400000/obio/counter@0,300000/obio/eeprom@0,200000/obio/zs@0,0/obio/zs@0,100000/iommu@f,e0000000/sbus@f,e0001000/iommu@f,e0000000/sbus@f,e0001000/cgsix@2,0/iommu@f,e0000000/sbus@f,e0001000/SUNW,DBRIe@f,8010000/iommu@f,e0000000/sbus@f,e0001000/SUNW,bpp@f,4800000/iommu@f,e0000000/sbus@f,e0001000/ledma@f,400010/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/iommu@f,e0000000/sbus@f,e0001000/SUNW,DBRIe@f,8010000/mmcodec/iommu@f,e0000000/sbus@f,e0001000/ledma@f,400010/le@f,c00000/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/st/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd/packages/obp-tftp/packages/deblocker/packages/disk-labelCommands used to examine the device tree are listed in Table 2-4.04 2496 Ch02 8/30/00 1:08 PM Page 41PROM FULL DEVICE NAMES 41Table 2-4 Commands for Browsing the Device TreeCommand Description.properties Displays the names and values of the current node s properties.dev device-path Chooses the specified device node, making it the current node.dev node-name Searches for a node with the specified name in the subtree below the currentnode and chooses the first such node found.dev.Chooses the device node that is the parent of the current node.dev / Chooses the root machine node.device-end Leaves the device tree. device-path find-device Chooses the specified device node, similar to dev.ls Displays the names of the current node s children.pwd Displays the device pathname that names the current node.see wordname Decompiles the specified word.show-devs [device-path] Displays all the devices known to the system directly beneath a given device inthe device hierarchy
[ Pobierz całość w formacie PDF ]