Home > Articles

This chapter is from the book

PROM Device Tree (Full Device Pathnames)

  • Display devices connected to the bus.

  • Identify the system's boot device.

OpenBoot deals directly with the hardware devices in the system. Each device has a unique name that represents both the type of device and the location of that device in the device tree. The OpenBoot firmware builds a device tree for all devices from information gathered at the POST. Sun uses the device tree to organize devices that are attached to the system. The device tree is loaded into memory, to be used by the kernel during boot to identify all configured devices. The paths built in the device tree by OpenBoot vary, depending on the type of system and its device configuration. The following example shows a full device pathname for an older Sun system with SBus architecture, such as a SPARCstation 20:

/sbus@1f,0/esp@0,40000/sd@3,0:a

NOTE

The Device Tree Versus Device Pathname The terms device tree and device pathname are often interchanged, and you'll see both used. They both mean the same thing.

The following example shows the device tree for an internal disk on a peripheral component interconnect (PCI) bus system such as an Ultra 5:

/pci@1f,0/pci@1,1/ide@3/disk

Typically, the OBP uses disk and cdrom for the boot disk and CD-ROM drive.

The following example shows the disk device on an Ultra system with a PCI-SCSI bus:

/pci@1f,0/pci@1/isptwo@4/sd@3,0

A device tree is a series of node names separated by slashes (/).The top of the device tree is the root device node. Following the root device node, and separated by a leading slash /, is a bus nexus node. Connected to a bus nexus node is a leaf node, which is typically a controller for the attached device. Each device pathname has this form:

driver-name@unit-address:device-arguments

The components of the device pathname are described in Table 3.3.

Table 3.3 - Device Pathname Parameters

Parameter

Description

driver-name

This is the root device node, which is a human-readable string that consists of 1 to 31 letters, digits, and the following punctuation characters:

, (comma)

. (period)

_ (underscore)

+ (plus sign)

(minus sign)

Uppercase and lowercase characters are distinct from one another. In some cases, the driver name includes the name of the device's manufacturer and the device's model name, separated by a comma. Typically, the manufacturer's uppercase, publicly listed stock symbol is used as the manufacturer's name (for example, SUNW,hme0). For built-in devices, the manufacturer's name is usually omitted (for example, sbus or pci).

@ must precede the address parameter; it serves as a separator between the driver name and unit address.

unit-address

A text string that represents the physical address of the device in its parent's address space. The exact meaning of a particular address depends on the bus to which the device is attached. In this example,

/sbus@3,0/SUNW,fas@3,0/sd@0,0

sbus@3,0 represents the I/O board in slot 1, located on the back of the system, and SUNW,fas@3,0 is the onboard fast/wide SCSI controller of the same board.

The following are common device driver names:

fas—Fast/wide SCSI controller.

hme—Fast (10/100Mbps) Ethernet.

isp—Differential SCSI controllers and the SunSwift card.

glm—UltraSCSI controllers.

scsi—SCSI devices.

sf—SCSI-compliant nexus driver that supports the Fibre Channel Protocol for SCSI on Private Fibre Channel Arbitrated Loops (FC-ALs).

soc—Serial optical controller (SOC) device driver.

socal—The Fibre Channel host bus adapter, which is an SBus card that implements two full-duplex Fibre Channel interfaces. Each Fibre Channel interface can connect to an FC-AL.

sd@0,0 is the SCSI disk (sd) set to target id 0. (In this case, it is an internal disk because only internal disks should be controlled by the onboard SCSI controller of the I/O board in slot 1.)

device-arguments

A text string whose format depends on the particular device. device-arguments can be used to pass additional information to the device's software. In this example:

/pci@1f,0/pci@1,1/ide@3/atapicd@2,0:f

the argument for the disk device is f. The software driver for this device interprets its argument as a disk partition, so the device pathname refers to partition f on a CD-ROM.


You use the OpenBoot command show-devs to obtain information about the device tree and to display device pathnames. This command displays all the devices known to the system directly beneath a given device in the device hierarchy. show-devs used by itself shows the entire device tree. The syntax is as follows:

ok show-devs

The system outputs the entire device tree, as follows:

/SUNW,UltraSPARC-IIi@0,0
/pci@1f,0
/virtual-memory
/memory@0,10000000
/aliases
/options
/openprom
/chosen
/packages
/pci@1f,0/pci@1
/pci@1f,0/pci@1,1
/pci@1f,0/pci@1/pci@1
/pci@1f,0/pci@1/pci@1/SUNW,qfe@3,1
/pci@1f,0/pci@1/pci@1/pci108e,1000@3
/pci@1f,0/pci@1/pci@1/SUNW,qfe@2,1
/pci@1f,0/pci@1/pci@1/pci108e,1000@2
/pci@1f,0/pci@1/pci@1/SUNW,qfe@1,1
/pci@1f,0/pci@1/pci@1/pci108e,1000@1
/pci@1f,0/pci@1/pci@1/SUNW,qfe@0,1
/pci@1f,0/pci@1/pci@1/pci108e,1000@0
/pci@1f,0/pci@1,1/ide@3
/pci@1f,0/pci@1,1/SUNW,m64B@2

Commands that are used to examine the device tree are listed in Table 3.4.

Table 3.4 - Commands for Browsing the Device Tree

Command

Description

.properties

Displays the names and values of the current node's properties.

dev <device-path>

Chooses the specified device node and makes it the current node.

dev <node-name>

Searches for a node with the specified name in the subtree below the current node 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 in the device hierarchy. show-devs used by itself shows the entire device tree.

words

Displays the names of the current node's methods.

<device-path>" select-dev

Selects the specified device and makes it the active node.


You can examine the device path from a Unix shell prompt by typing the following:

prtconf –vp

OpenBoot Device Aliases

  • Create and remove custom device aliases.

Device pathnames can be long and complex. Device aliases, like Unix aliases, allow you to substitute a short name for a long name. An alias represents an entire device pathname, not a component of it. For example, the alias disk0 might represent the following device pathname:

/sbus@1,f8000000/esp@0,40000/sd@3,0:a

OpenBoot provides the predefined device aliases listed in Table 3.5 for commonly used devices, so you rarely need to type a full device pathname. Be aware, however, that device aliases and pathnames can vary on each platform. The device aliases shown in Table 3.5 are from a Sun Ultra 5 system.

Table 3.5 - Predefined Device Aliases

Alias

Device Pathname

disk

/pci@1f,0/pci@1,1/ide@3/disk@0,0

disk0

/pci@1f,0/pci@1,1/ide@3/disk@0,0

disk1

/pci@1f,0/pci@1,1/ide@3/disk@1,0

disk2

/pci@1f,0/pci@1,1/ide@3/disk@2,0

disk3

/pci@1f,0/pci@1,1/ide@3/disk@3,0

cdrom

/pci@1f,0/pci@1,1/ide@3/cdrom@2,0:f


If you add disk drives or change the target of the startup drive, you might need to modify these device aliases. Table 3.6 describes the devalias commands, which are used to examine, create, and change OpenBoot aliases.

NOTE

New Names Overwrite Old Names If an alias with the same name already exists, the new value overwrites the old.

Table 3.6 - The devalias Commands

Command

Description

devalias

Displays all current device aliases

devalias <alias>

Displays the device pathname that corresponds to alias

devalias_alias <device-path>

Defines an alias that represents device-path


The following example creates a device alias named disk3, which represents an Integrated Drive Electronics (IDE) disk with a target ID of 3 on an Ultra 5 system:

devalias disk3 /pci@1f,0/pci@1,1/ide@3/disk@3,0

To confirm the alias, you type devalias, as follows:

ok devalias

The system responds by printing all the aliases, like this:

screen          /pci@1f,0/pci@1,1/SUNW,m64B@2

net           /pci@1f,0/pci@1,1/network@1,1

cdrom          /pci@1f,0/pci@1,1/ide@3/cdrom@2,0:f

disk           /pci@1f,0/pci@1,1/ide@3/disk@0,0

disk3          /pci@1f,0/pci@1,1/ide@3/disk@3,0

disk2          /pci@1f,0/pci@1,1/ide@3/disk@2,0

disk1          /pci@1f,0/pci@1,1/ide@3/disk@1,0

disk0          /pci@1f,0/pci@1,1/ide@3/disk@0,0

ide           /pci@1f,0/pci@1,1/ide@3

floppy          /pci@1f,0/pci@1,1/ebus@1/fdthree

ttyb           /pci@1f,0/pci@1,1/ebus@1/se:b

ttya           /pci@1f,0/pci@1,1/ebus@1/se:a

keyboard!        /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8:forcemode

keyboard         /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8

mouse          /pci@1f,0/pci@1,1/ebus@1/su@14,3062f8

name           aliases

You can also view device aliases from a shell prompt by using the prtconf –vp command.

User-defined aliases are lost after a system reset or power cycle unless you create a permanent alias. If you want to create permanent aliases, you can either manually store the devalias command in a portion of NVRAM called NVRAMRC or you can use the nvalias and nvunalias commands. The following section describes how to configure permanent settings in the NVRAM on a Sun system.

Pearson IT Certification Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Pearson IT Certification and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Pearson IT Certification products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.pearsonitcertification.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020