Device tree browsing enables you to examine and modify individual device tree nodes. The active package is the device node that you can examine and modify with subsequent node examination commands. Selecting a device node makes it the active package. When a node is the active package, user-created FORTH commands are added to the list of methods for that device. You can add new properties to the list of properties for that device. Dictionary search commands will operate on the node's list of methods (followed by system FORTH words), and that node's methods can be executed as FORTH words by typing their names.
For a list of commands, see Commands for Browsing the Device Tree.
For example:
{0} ok show-devs
/pci@345
/pci@344
/pci@343
/pci@342
/pci@341
/cpu@d40
/cpu@d3f
/cpu@d3e
/cpu@d3d
/cpu@d3c
/pci@345/pci@1
/pci@344/pci@1
/pci@343/pci@2
/pci@343/pci@2/usb@0
/pci@343/pci@2/usb@0/storage@1
/pci@343/pci@2/usb@0/storage@1/disk
/pci@342/pci@1
For example:
{0} ok show-props /memory
reg 00000000 50000000 0000001f 60000000
00004000 00000000 0000001f d0000000
00008000 00000000 0000003f d0000000
0000c000 00000000 0000003f d0000000
00010000 00000000 0000003f d0000000
00014000 00000000 0000003f d0000000
00018000 00000000 0000003f d0000000
0001c000 00000000 0000001f d0000000
available 0001c01f ce790000 00000000 00002000
0001c000 00000000 0000001f ce780000
00018000 00000000 0000003f d0000000
00014000 00000000 0000003f d0000000
00010000 00000000 0000003f d0000000
0000c000 00000000 0000003f d0000000
00008000 00000000 0000003f d0000000
00004000 00000000 0000001f d0000000
00000000 90000000 0000001f 20000000
00000000 8fe00000 00000000 0002a000
00000000 50400000 00000000 3e9c0000
name memory
{0} ok
The dev device-path command makes the node the active package.
For example:
{0} ok dev /pci@301/pci@2/scsi@0
{0} ok .properties
firmware-version 5.00.00.00
mpt-version 2.05
local-wwid 50 80 02 00 01 aa 37 58
vf-assigned-addresses 83020000 00000001 00010000 00000000 00010000
assigned-addresses 81020010 00000000 00000000 00000000 00000100
83020014 00000001 00000000 00000000 00010000
82020030 00000000 00100000 00000000 00100000
vf-reg 03020000 00000000 00000000 00000000 00010000
compatible pciex1000,97
pci1000,97
model LSI,3008
reg 00020000 00000000 00000000 00000000 00000000
01020010 00000000 00000000 00000000 00000100
03020014 00000000 00000000 00000000 00010000
02020030 00000000 00000000 00000000 00100000
version 1.00.64
wide 00000010
device_type scsi-sas
name scsi
#address-cells 00000004
vf-stride 00000001
first-vf-offset 00000001
total-vfs 00000010
initial-vfs 00000010
#vfs 00000010
port-type PCIE-Endpoint
interrupts 00000001
cache-line-size 00000010
class-code 00010700
subsystem-id 00000090
subsystem-vendor-id 00001000
revision-id 00000002
device-id 00000097
vendor-id 00001000
{0} ok
{0} ok dev /pci@300/pci@2/disk@w5000cca123456789,0:a
{0} ok words
size load write read seek
close open write-blocks64
read-blocks64 write-blocks read-blocks max-transfer
r/w-blocks64 r/w-blocks 4c! 2c!
block-size #blocks64 #blocks read-block-size
read-block-extent read-capacity-16-cmd
read-capacity-cmd mode-sense-bd /block
timed-spin sstart-cmd init-label-package
report-failure label-package offset-high
offset-low set-timeout init-deblocker
deblocker eject device-present?
eject-cmd cb! cmdbuf /cmdbuf 4c@
3c@ -c@ 3c! +c!
short-data-command no-data-command
retry-command parent-set-address parent-max-transfer
dma-free dma-alloc
{0} ok
find-device is similar to dev, differing only in the way the input path name is passed.
{0} ok "/usb@0/ACME,widget" find-device