← Documents Documentation/ABI/stable/sysfs-driver-firmware-zynqmp GitHub 원문 ↗

Linux 6.18.37 · ABI / stable

ZynqMP firmware stable sysfs ABI

ZynqMP PMU global·persistent storage register, shutdown scope, healthy-boot bit와 firmware over-temperature·external-watchdog runtime configuration을 설명합니다.

Source pathDocumentation/ABI/stable/sysfs-driver-firmware-zynqmp
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

PMU general storage register

sysfs-driver-firmware-zynqmp:1-54

Master 사이 정보 전달에 쓰는 GGS와 POR까지 값을 유지하는 persistent PGGS의 reset 수명 차이를 다룹니다.

Shutdown scope와 healthy boot

sysfs-driver-firmware-zynqmp:56-115

다음 PSCI system-off 요청의 범위와 FPD watchdog 만료 시 APU-only 또는 system restart를 선택하는 healthy bit를 설정합니다.

Runtime feature selector

sysfs-driver-firmware-zynqmp:117-172

Over-temperature와 firmware 외부 watchdog의 status·parameter 중 어느 항목을 접근할지 config ID로 선택합니다.

Runtime feature value

sysfs-driver-firmware-zynqmp:174-256

선택한 config ID에 대응하는 enable status, 온도 한계 또는 watchdog interval을 읽고 씁니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/devices/platform/firmware\:zynqmp-firmware/ggs*
2 Date: March 2020
3 KernelVersion: 5.6
4 Contact: "Jolly Shah" <[email protected]>
5 Description:
6 Read/Write PMU global general storage register value,
7 GLOBAL_GEN_STORAGE{0:3}.
8 Global general storage register that can be used
9 by system to pass information between masters.
10
11 The register is reset during system or power-on
12 resets. Three registers are used by the FSBL and
13 other Xilinx software products: GLOBAL_GEN_STORAGE{4:6}.
14
15 Usage::
16
17 # cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
18 # echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
19
20 Example::
21
22 # cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
23 # echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
24
25 Users: Xilinx
26
27 What: /sys/devices/platform/firmware\:zynqmp-firmware/pggs*
28 Date: March 2020
29 KernelVersion: 5.6
30 Contact: "Jolly Shah" <[email protected]>
31 Description:
32 Read/Write PMU persistent global general storage register
33 value, PERS_GLOB_GEN_STORAGE{0:3}.
34 Persistent global general storage register that
35 can be used by system to pass information between
36 masters.
37
38 This register is only reset by the power-on reset
39 and maintains its value through a system reset.
40 Four registers are used by the FSBL and other Xilinx
41 software products: PERS_GLOB_GEN_STORAGE{4:7}.
42 Register is reset only by a POR reset.
43
44 Usage::
45
46 # cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
47 # echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
48
49 Example::
50
51 # cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
52 # echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
53
54 Users: Xilinx
55
56 What: /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
57 Date: March 2020
58 KernelVersion: 5.6
59 Contact: "Jolly Shah" <[email protected]>
60 Description:
61 This sysfs interface allows to set the shutdown scope for the
62 next shutdown request. When the next shutdown is performed, the
63 platform specific portion of PSCI-system_off can use the chosen
64 shutdown scope.
65
66 Following are available shutdown scopes(subtypes):
67
68 subsystem:
69 Only the APU along with all of its peripherals
70 not used by other processing units will be
71 shut down. This may result in the FPD power
72 domain being shut down provided that no other
73 processing unit uses FPD peripherals or DRAM.
74 ps_only:
75 The complete PS will be shut down, including the
76 RPU, PMU, etc. Only the PL domain (FPGA)
77 remains untouched.
78 system:
79 The complete system/device is shut down.
80
81 Usage::
82
83 # cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
84 # echo <scope> > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
85
86 Example::
87
88 # cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
89 # echo "subsystem" > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
90
91 Users: Xilinx
92
93 What: /sys/devices/platform/firmware\:zynqmp-firmware/health_status
94 Date: March 2020
95 KernelVersion: 5.6
96 Contact: "Jolly Shah" <[email protected]>
97 Description:
98 This sysfs interface allows to set the health status. If PMUFW
99 is compiled with CHECK_HEALTHY_BOOT, it will check the healthy
100 bit on FPD WDT expiration. If healthy bit is set by a user
101 application running in Linux, PMUFW will do APU only restart. If
102 healthy bit is not set during FPD WDT expiration, PMUFW will do
103 system restart.
104
105 Usage:
106
107 Set healthy bit::
108
109 # echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status
110
111 Unset healthy bit::
112
113 # echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status
114
115 Users: Xilinx
116
117 What: /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
118 Date: Feb 2022
119 KernelVersion: 5.18
120 Contact: "Ronak Jain" <[email protected]>
121 Description:
122 This sysfs interface allows user to configure features at
123 runtime. The user can enable or disable features running at
124 firmware as well as the user can configure the parameters of
125 the features at runtime. The supported features are over
126 temperature and external watchdog. Here, the external watchdog
127 is completely different than the /dev/watchdog as the external
128 watchdog is running on the firmware and it is used to monitor
129 the health of firmware not APU(Linux). Also, the external
130 watchdog is interfaced outside of the zynqmp soc.
131
132 The supported config ids are for the feature configuration is,
133 1. PM_FEATURE_OVERTEMP_STATUS = 1, the user can enable or
134 disable the over temperature feature.
135 2. PM_FEATURE_OVERTEMP_VALUE = 2, the user can configure the
136 over temperature limit in Degree Celsius.
137 3. PM_FEATURE_EXTWDT_STATUS = 3, the user can enable or disable
138 the external watchdog feature.
139 4. PM_FEATURE_EXTWDT_VALUE = 4, the user can configure the
140 external watchdog feature.
141
142 Usage:
143
144 Select over temperature config ID to enable/disable feature
145 # echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
146
147 Check over temperature config ID is selected or not
148 # cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
149 The expected result is 1.
150
151 Select over temperature config ID to configure OT limit
152 # echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
153
154 Check over temperature config ID is selected or not
155 # cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
156 The expected result is 2.
157
158 Select external watchdog config ID to enable/disable feature
159 # echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
160
161 Check external watchdog config ID is selected or not
162 # cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
163 The expected result is 3.
164
165 Select external watchdog config ID to configure time interval
166 # echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
167
168 Check external watchdog config ID is selected or not
169 # cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
170 The expected result is 4.
171
172 Users: Xilinx
173
174 What: /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
175 Date: Feb 2022
176 KernelVersion: 5.18
177 Contact: "Ronak Jain" <[email protected]>
178 Description:
179 This sysfs interface allows to configure features at runtime.
180 The user can enable or disable features running at firmware.
181 Also, the user can configure the parameters of the features
182 at runtime. The supported features are over temperature and
183 external watchdog. Here, the external watchdog is completely
184 different than the /dev/watchdog as the external watchdog is
185 running on the firmware and it is used to monitor the health
186 of firmware not APU(Linux). Also, the external watchdog is
187 interfaced outside of the zynqmp soc.
188
189 By default the features are disabled in the firmware. The user
190 can enable features by querying appropriate config id of the
191 features.
192
193 The default limit for the over temperature is 90 Degree Celsius.
194 The default timer interval for the external watchdog is 570ms.
195
196 The supported config ids are for the feature configuration is,
197 1. PM_FEATURE_OVERTEMP_STATUS = 1, the user can enable or
198 disable the over temperature feature.
199 2. PM_FEATURE_OVERTEMP_VALUE = 2, the user can configure the
200 over temperature limit in Degree Celsius.
201 3. PM_FEATURE_EXTWDT_STATUS = 3, the user can enable or disable
202 the external watchdog feature.
203 4. PM_FEATURE_EXTWDT_VALUE = 4, the user can configure the
204 external watchdog feature.
205
206 Usage:
207
208 Enable over temperature feature
209 # echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
210 # echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
211
212 Check whether the over temperature feature is enabled or not
213 # cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
214 The expected result is 1.
215
216 Disable over temperature feature
217 # echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
218 # echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
219
220 Check whether the over temperature feature is disabled or not
221 # cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
222 The expected result is 0.
223
224 Configure over temperature limit to 50 Degree Celsius
225 # echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
226 # echo 50 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
227
228 Check whether the over temperature limit is configured or not
229 # cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
230 The expected result is 50.
231
232 Enable external watchdog feature
233 # echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
234 # echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
235
236 Check whether the external watchdog feature is enabled or not
237 # cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
238 The expected result is 1.
239
240 Disable external watchdog feature
241 # echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
242 # echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
243
244 Check whether the external watchdog feature is disabled or not
245 # cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
246 The expected result is 0.
247
248 Configure external watchdog timer interval to 500ms
249 # echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
250 # echo 500 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
251
252 Check whether the external watchdog timer interval is configured or not
253 # cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
254 The expected result is 500.
255
256 Users: Xilinx
257

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

PMU global general storage register

1-25
항목내용
What/sys/devices/platform/firmware\:zynqmp-firmware/ggs*
Date2020년 3월
KernelVersion5.6
ContactJolly Shah <[email protected]>
UsersXilinx

PMU global general storage register GLOBAL_GEN_STORAGE{0:3}의 값을 읽고 쓴다. System은 이 register를 이용해 master 사이에 정보를 전달할 수 있다.

이 register는 system reset 또는 power-on reset 때 초기화된다. GLOBAL_GEN_STORAGE{4:6} 세 개는 FSBL과 다른 Xilinx software product가 사용한다.

사용법과 예

# cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
# echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
# cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
# echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0

PMU persistent global general storage register

27-54
항목내용
What/sys/devices/platform/firmware\:zynqmp-firmware/pggs*
Date2020년 3월
KernelVersion5.6
ContactJolly Shah <[email protected]>
UsersXilinx

PMU persistent global general storage register PERS_GLOB_GEN_STORAGE{0:3}의 값을 읽고 쓴다. System은 이 register를 이용해 master 사이에 정보를 전달할 수 있다.

이 register는 power-on reset에서만 초기화되므로 system reset을 거쳐도 값을 유지한다. PERS_GLOB_GEN_STORAGE{4:7} 네 개는 FSBL과 다른 Xilinx software product가 사용한다. 즉 POR reset만 이 값을 지운다.

사용법과 예

# cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
# echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
# cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
# echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0

다음 shutdown 요청의 범위

56-91
항목내용
What/sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
Date2020년 3월
KernelVersion5.6
ContactJolly Shah <[email protected]>
UsersXilinx

다음 shutdown 요청에 적용할 범위를 설정한다. 실제 shutdown이 수행될 때 PSCI-system_off의 platform-specific 부분이 선택된 shutdown scope를 사용할 수 있다.

Scope꺼지는 범위
subsystemAPU와, 다른 processing unit이 사용하지 않는 APU peripheral만 shutdown한다. 다른 processing unit이 FPD peripheral이나 DRAM을 사용하지 않는다면 FPD power domain도 꺼질 수 있다.
ps_onlyRPU와 PMU 등을 포함한 PS 전체를 shutdown한다. PL domain(FPGA)만 그대로 남긴다.
systemSystem 또는 device 전체를 shutdown한다.
Shutdown scope별 영향 범위
subsystemps_onlysystem
01 APUPS 전체Device 전체
02 비공유 peripheralRPU·PMU 포함PS와 PL 포함
03 조건에 따라 FPDPL(FPGA)은 유지남는 domain 없음

왼쪽에서 오른쪽으로 갈수록 더 넓은 system 영역이 shutdown된다.

사용법과 예

# cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
# echo <scope> > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
# cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
# echo "subsystem" > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope

FPD watchdog와 healthy bit

93-115
항목내용
What/sys/devices/platform/firmware\:zynqmp-firmware/health_status
Date2020년 3월
KernelVersion5.6
ContactJolly Shah <[email protected]>
UsersXilinx

Health status를 설정하는 interface다. PMUFW가 CHECK_HEALTHY_BOOT를 넣어 build된 경우 FPD WDT가 만료될 때 healthy bit를 검사한다.

FPD WDT 만료 시 restart 결정
FPD watchdog timer 만료PMUFW가 healthy bit 검사Bit가 1이면 APU만 restartBit가 0이면 system restart

Linux user application이 healthy bit를 설정했는지가 restart 범위를 결정한다.

Linux에서 실행 중인 user application이 healthy bit를 설정했다면 PMUFW는 APU만 restart한다. FPD WDT 만료 시 bit가 설정되지 않았다면 PMUFW는 system을 restart한다.

# healthy bit 설정
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status

# healthy bit 해제
# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status

Firmware runtime feature의 config ID 선택

117-172
항목내용
What/sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
Date2022년 2월
KernelVersion5.18
ContactRonak Jain <[email protected]>
UsersXilinx

Firmware에서 실행되는 기능을 runtime에 활성화하거나 비활성화하고 parameter를 구성할 때, 어느 기능·항목을 접근할지 선택하는 interface다. 지원 기능은 over-temperature와 external watchdog이다.

여기서 external watchdog은 /dev/watchdog와 완전히 다르다. Firmware에서 실행되며 APU(Linux)가 아니라 firmware의 health를 감시하고, ZynqMP SoC 외부와 interface한다.

Config IDSymbol선택하는 항목
1PM_FEATURE_OVERTEMP_STATUSOver-temperature 기능 enable·disable 상태
2PM_FEATURE_OVERTEMP_VALUEOver-temperature limit, 단위 °C
3PM_FEATURE_EXTWDT_STATUSExternal watchdog 기능 enable·disable 상태
4PM_FEATURE_EXTWDT_VALUEExternal watchdog 설정값

Config ID 선택과 확인

# over-temperature enable/disable ID 선택
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# expected: 1

# over-temperature limit ID 선택
# echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# expected: 2

# external watchdog enable/disable ID 선택
# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# expected: 3

# external watchdog interval ID 선택
# echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# expected: 4

선택된 runtime feature 값 접근

174-205
항목내용
What/sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
Date2022년 2월
KernelVersion5.18
ContactRonak Jain <[email protected]>
UsersXilinx

Firmware feature를 runtime에 구성하는 값 interface다. User는 firmware에서 실행되는 기능을 활성화·비활성화하거나 그 parameter를 runtime에 설정할 수 있다. 지원 기능은 over-temperature와 external watchdog이다.

External watchdog은 /dev/watchdog와 다르며 firmware의 health를 감시하고 ZynqMP SoC 외부와 interface한다. 기본적으로 firmware의 두 기능은 disabled 상태다. 해당 feature의 config ID를 선택한 뒤 값을 써서 활성화한다.

Over-temperature limit 기본값은 90°C이고 external watchdog timer interval 기본값은 570 ms다.

Config IDSymbolfeature_config_value의 의미
1PM_FEATURE_OVERTEMP_STATUS0: disable, 1: enable
2PM_FEATURE_OVERTEMP_VALUEOver-temperature limit, °C
3PM_FEATURE_EXTWDT_STATUS0: disable, 1: enable
4PM_FEATURE_EXTWDT_VALUEExternal watchdog timer interval
ID selector와 value register 사용 순서
feature_config_id에 1~4 기록선택된 status 또는 parameter 결정feature_config_value에 새 값 기록feature_config_value를 읽어 적용값 확인

feature_config_id로 대상을 먼저 선택한 다음 feature_config_value로 그 대상의 값을 읽거나 쓴다.

Runtime feature 구성 예제

206-256

Over-temperature enable과 disable

# enable
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# expected: 1

# disable
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# expected: 0

Over-temperature limit를 50°C로 설정

# echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 50 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# expected: 50

External watchdog enable과 disable

# enable
# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# expected: 1

# disable
# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# expected: 0

External watchdog timer interval을 500 ms로 설정

# echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 500 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
# expected: 500