요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
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-172Over-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 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/devices/platform/firmware\:zynqmp-firmware/ggs*
Date: March 2020
KernelVersion: 5.6
Contact: "Jolly Shah" <[email protected]>
Description:
Read/Write PMU global general storage register value,
GLOBAL_GEN_STORAGE{0:3}.
Global general storage register that can be used
by system to pass information between masters.
The register is reset during system or power-on
resets. Three registers are used by the FSBL and
other Xilinx software products: GLOBAL_GEN_STORAGE{4:6}.
Usage::
# cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
# echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
Example::
# cat /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
# echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/ggs0
Users: Xilinx
What: /sys/devices/platform/firmware\:zynqmp-firmware/pggs*
Date: March 2020
KernelVersion: 5.6
Contact: "Jolly Shah" <[email protected]>
Description:
Read/Write PMU persistent global general storage register
value, PERS_GLOB_GEN_STORAGE{0:3}.
Persistent global general storage register that
can be used by system to pass information between
masters.
This register is only reset by the power-on reset
and maintains its value through a system reset.
Four registers are used by the FSBL and other Xilinx
software products: PERS_GLOB_GEN_STORAGE{4:7}.
Register is reset only by a POR reset.
Usage::
# cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
# echo <value> > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
Example::
# cat /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
# echo 0x1234ABCD > /sys/devices/platform/firmware\:zynqmp-firmware/pggs0
Users: Xilinx
What: /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
Date: March 2020
KernelVersion: 5.6
Contact: "Jolly Shah" <[email protected]>
Description:
This sysfs interface allows to set the shutdown scope for the
next shutdown request. When the next shutdown is performed, the
platform specific portion of PSCI-system_off can use the chosen
shutdown scope.
Following are available shutdown scopes(subtypes):
subsystem:
Only the APU along with all of its peripherals
not used by other processing units will be
shut down. This may result in the FPD power
domain being shut down provided that no other
processing unit uses FPD peripherals or DRAM.
ps_only:
The complete PS will be shut down, including the
RPU, PMU, etc. Only the PL domain (FPGA)
remains untouched.
system:
The complete system/device is shut down.
Usage::
# cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
# echo <scope> > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
Example::
# cat /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
# echo "subsystem" > /sys/devices/platform/firmware\:zynqmp-firmware/shutdown_scope
Users: Xilinx
What: /sys/devices/platform/firmware\:zynqmp-firmware/health_status
Date: March 2020
KernelVersion: 5.6
Contact: "Jolly Shah" <[email protected]>
Description:
This sysfs interface allows to set the health status. If PMUFW
is compiled with CHECK_HEALTHY_BOOT, it will check the healthy
bit on FPD WDT expiration. If healthy bit is set by a user
application running in Linux, PMUFW will do APU only restart. If
healthy bit is not set during FPD WDT expiration, PMUFW will do
system restart.
Usage:
Set healthy bit::
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status
Unset healthy bit::
# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/health_status
Users: Xilinx
What: /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
Date: Feb 2022
KernelVersion: 5.18
Contact: "Ronak Jain" <[email protected]>
Description:
This sysfs interface allows user to configure features at
runtime. The user can enable or disable features running at
firmware as well as the user can configure the parameters of
the features at runtime. The supported features are over
temperature and external watchdog. Here, the external watchdog
is completely different than the /dev/watchdog as the external
watchdog is running on the firmware and it is used to monitor
the health of firmware not APU(Linux). Also, the external
watchdog is interfaced outside of the zynqmp soc.
The supported config ids are for the feature configuration is,
1. PM_FEATURE_OVERTEMP_STATUS = 1, the user can enable or
disable the over temperature feature.
2. PM_FEATURE_OVERTEMP_VALUE = 2, the user can configure the
over temperature limit in Degree Celsius.
3. PM_FEATURE_EXTWDT_STATUS = 3, the user can enable or disable
the external watchdog feature.
4. PM_FEATURE_EXTWDT_VALUE = 4, the user can configure the
external watchdog feature.
Usage:
Select over temperature config ID to enable/disable feature
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
Check over temperature config ID is selected or not
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
The expected result is 1.
Select over temperature config ID to configure OT limit
# echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
Check over temperature config ID is selected or not
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
The expected result is 2.
Select external watchdog config ID to enable/disable feature
# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
Check external watchdog config ID is selected or not
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
The expected result is 3.
Select external watchdog config ID to configure time interval
# echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
Check external watchdog config ID is selected or not
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
The expected result is 4.
Users: Xilinx
What: /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
Date: Feb 2022
KernelVersion: 5.18
Contact: "Ronak Jain" <[email protected]>
Description:
This sysfs interface allows to configure features at runtime.
The user can enable or disable features running at firmware.
Also, the user can configure the parameters of the features
at runtime. The supported features are over temperature and
external watchdog. Here, the external watchdog is completely
different than the /dev/watchdog as the external watchdog is
running on the firmware and it is used to monitor the health
of firmware not APU(Linux). Also, the external watchdog is
interfaced outside of the zynqmp soc.
By default the features are disabled in the firmware. The user
can enable features by querying appropriate config id of the
features.
The default limit for the over temperature is 90 Degree Celsius.
The default timer interval for the external watchdog is 570ms.
The supported config ids are for the feature configuration is,
1. PM_FEATURE_OVERTEMP_STATUS = 1, the user can enable or
disable the over temperature feature.
2. PM_FEATURE_OVERTEMP_VALUE = 2, the user can configure the
over temperature limit in Degree Celsius.
3. PM_FEATURE_EXTWDT_STATUS = 3, the user can enable or disable
the external watchdog feature.
4. PM_FEATURE_EXTWDT_VALUE = 4, the user can configure the
external watchdog feature.
Usage:
Enable over temperature feature
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
Check whether the over temperature feature is enabled or not
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
The expected result is 1.
Disable over temperature feature
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
Check whether the over temperature feature is disabled or not
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
The expected result is 0.
Configure over temperature limit to 50 Degree Celsius
# echo 2 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 50 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
Check whether the over temperature limit is configured or not
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
The expected result is 50.
Enable external watchdog feature
# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 1 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
Check whether the external watchdog feature is enabled or not
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
The expected result is 1.
Disable external watchdog feature
# echo 3 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 0 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
Check whether the external watchdog feature is disabled or not
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
The expected result is 0.
Configure external watchdog timer interval to 500ms
# echo 4 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_id
# echo 500 > /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
Check whether the external watchdog timer interval is configured or not
# cat /sys/devices/platform/firmware\:zynqmp-firmware/feature_config_value
The expected result is 500.
Users: Xilinx
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
PMU global general storage register
1-25| 항목 | 내용 |
|---|---|
| What | /sys/devices/platform/firmware\:zynqmp-firmware/ggs* |
| Date | 2020년 3월 |
| KernelVersion | 5.6 |
| Contact | Jolly Shah <[email protected]> |
| Users | Xilinx |
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* |
| Date | 2020년 3월 |
| KernelVersion | 5.6 |
| Contact | Jolly Shah <[email protected]> |
| Users | Xilinx |
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 |
| Date | 2020년 3월 |
| KernelVersion | 5.6 |
| Contact | Jolly Shah <[email protected]> |
| Users | Xilinx |
다음 shutdown 요청에 적용할 범위를 설정한다. 실제 shutdown이 수행될 때 PSCI-system_off의 platform-specific 부분이 선택된 shutdown scope를 사용할 수 있다.
| Scope | 꺼지는 범위 |
|---|---|
| subsystem | APU와, 다른 processing unit이 사용하지 않는 APU peripheral만 shutdown한다. 다른 processing unit이 FPD peripheral이나 DRAM을 사용하지 않는다면 FPD power domain도 꺼질 수 있다. |
| ps_only | RPU와 PMU 등을 포함한 PS 전체를 shutdown한다. PL domain(FPGA)만 그대로 남긴다. |
| system | System 또는 device 전체를 shutdown한다. |
왼쪽에서 오른쪽으로 갈수록 더 넓은 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 |
| Date | 2020년 3월 |
| KernelVersion | 5.6 |
| Contact | Jolly Shah <[email protected]> |
| Users | Xilinx |
Health status를 설정하는 interface다. PMUFW가 CHECK_HEALTHY_BOOT를 넣어 build된 경우 FPD WDT가 만료될 때 healthy bit를 검사한다.
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 |
| Date | 2022년 2월 |
| KernelVersion | 5.18 |
| Contact | Ronak Jain <[email protected]> |
| Users | Xilinx |
Firmware에서 실행되는 기능을 runtime에 활성화하거나 비활성화하고 parameter를 구성할 때, 어느 기능·항목을 접근할지 선택하는 interface다. 지원 기능은 over-temperature와 external watchdog이다.
여기서 external watchdog은 /dev/watchdog와 완전히 다르다. Firmware에서 실행되며 APU(Linux)가 아니라 firmware의 health를 감시하고, ZynqMP SoC 외부와 interface한다.
| Config ID | Symbol | 선택하는 항목 |
|---|---|---|
| 1 | PM_FEATURE_OVERTEMP_STATUS | Over-temperature 기능 enable·disable 상태 |
| 2 | PM_FEATURE_OVERTEMP_VALUE | Over-temperature limit, 단위 °C |
| 3 | PM_FEATURE_EXTWDT_STATUS | External watchdog 기능 enable·disable 상태 |
| 4 | PM_FEATURE_EXTWDT_VALUE | External 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 |
| Date | 2022년 2월 |
| KernelVersion | 5.18 |
| Contact | Ronak Jain <[email protected]> |
| Users | Xilinx |
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 ID | Symbol | feature_config_value의 의미 |
|---|---|---|
| 1 | PM_FEATURE_OVERTEMP_STATUS | 0: disable, 1: enable |
| 2 | PM_FEATURE_OVERTEMP_VALUE | Over-temperature limit, °C |
| 3 | PM_FEATURE_EXTWDT_STATUS | 0: disable, 1: enable |
| 4 | PM_FEATURE_EXTWDT_VALUE | External watchdog timer interval |
feature_config_id로 대상을 먼저 선택한 다음 feature_config_value로 그 대상의 값을 읽거나 쓴다.
Runtime feature 구성 예제
206-256Over-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
PMU general storage register
sysfs-driver-firmware-zynqmp:1-54Master 사이 정보 전달에 쓰는 GGS와 POR까지 값을 유지하는 persistent PGGS의 reset 수명 차이를 다룹니다.