1man(8) rshim man page man(8)
2
3
4
6 rshim - user-space rshim driver for BlueField SoC
7
9 rshim [options]
10
12 rshim is the user-space rshim driver for BlueField SoC. It provides
13 ways to access the rshim resources on the BlueField target via USB or
14 PCIe from external host machine. The current version implements virtual
15 console, virtual network interface, boot stream push, register access
16 and some utility commands.
17
18 This driver will probe the rshim backend and create directory
19 /dev/rshim<N> for each of them with the following device files.
20
21
22 /dev/rshim<N>/boot
23 Boot device file used to push boot stream to the target, for example,
24
25 cat install.bfb > /dev/rshim<N>/boot
26
27
28 /dev/rshim<N>/console
29 Console device file, which can be used by console tools to connect to
30 the target, such as
31
32 screen /dev/rshim<N>/console
33
34
35 /dev/rshim<N>/rshim
36 Device file used to access rshim register space. When reading/writing
37 to this file, the offset is encoded as "((rshim_channel << 16) | regis‐
38 ter_offset)". This file can be used by tools like openocd to do Core‐
39 Sight debugging.
40
41
42 /dev/rshim<N>/misc
43 Key/Value pairs used to read/write misc information. For example
44
45 Display the output
46
47 cat /dev/rshim0/misc
48 DISPLAY_LEVEL 0 (0:basic, 1:advanced, 2:log)
49 BOOT_MODE 1 (0:rshim, 1:emmc, 2:emmc-boot-swap)
50 BOOT_TIMEOUT 100 (seconds)
51 SW_RESET 0 (1: reset)
52 DEV_NAME pcie-04:00.2
53 DEV_INFO BlueField-1(Rev 0)
54
55 Initiate SW reset
56
57 echo "SW_RESET 1" > /dev/rshim<N>/misc
58
59 Enable the advanced options
60
61 echo "DISPLAY_LEVEL 1" > /dev/rshim<N>/misc
62
63 cat /dev/rshim0/misc
64 DISPLAY_LEVEL 1 (0:basic, 1:advanced, 2:log)
65 BOOT_MODE 1 (0:rshim, 1:emmc, 2:emmc-boot-swap)
66 BOOT_TIMEOUT 100 (seconds)
67 SW_RESET 0 (1: reset)
68 DEV_NAME pcie-04:00.2
69 DEV_INFO BlueField-1(Rev 0)
70 PEER_MAC 00:1a:ca:ff:ff:01 (rw)
71 PXE_ID 0x00000000 (rw)
72 VLAN_ID 0 0 (rw)
73
75 -b, --backend
76 Specify the backend to attach, which can be one of usb, pcie or
77 pcie_lf. If not specified, the driver will scan all rshim backends
78 unless the '-d' option is given with a device name specified.
79
80 -d, --device
81 Specify the device name to attach with the format below. The back‐
82 end driver can be deduced from the device name, thus the '-b' op‐
83 tion is not needed.
84
85 PCIe backend:
86 pcie-<bus>:<device>.<function>. Example: pcie-04:00.2
87 Devices can be found with command 'lspci -n'.
88
89 PCIe backend in livefish mode:
90 pcie-lf-<bus>:<device>.<function>. Example: pcie-04:00.2
91 Devices can be found with command 'lspci -n'.
92
93 USB backend:
94 usb-<bus>-xx.xx. Example: usb-2-1.7
95 Devices can be found under /sys/bus/usb/devices/.
96
97 -f, --foreground
98 Run in forground.
99
100 -i, --index
101 Specify the index to create device path /dev/rshim<index>. It's
102 also used to create network interface name tmfifo_net<index>. This
103 option is needed when multiple rshim instances are running.
104
105 -l, --log-level
106 Log level (0:none, 1:error, 2:warning, 3:notice, 4:debug) Log mes‐
107 sages will be printed to standard output when running in fore‐
108 ground, or in syslog when running as a daemon.
109
110 -v, --version
111 Display version
112
114 Rshim configuration file (/etc/rshim.conf) can be used to specify the
115 static mapping between rshim devices and rshim names. It can also be
116 used to ignore some rshim devices.
117
118 Example:
119 # Map usb-2-1.7 to rshim0
120 rshim0 usb-2-1.7
121
122 # Map pcie-0000:04:00.2 to rshim1
123 rshim1 pcie-0000:04:00.2
124
125 # Ignore usb-1-1.4
126 none usb-1-1.4
127
128
129
1302.0 18 Dec 2019 man(8)