요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Reset and pretimeout control
sysfs-class-watchdog:56-93Reset까지 남은 시간과 programmed timeout, optional pretimeout interval을 읽고 available governor 중 active pretimeout governor를 선택합니다.
ASPEED alternate-flash mapping recovery
sysfs-class-watchdog:94-129AST2400/AST2500 WDT2 alternate boot 뒤 access_cs0는 primary flash 접근 또는 normal chip-select mapping 복구를 수행하고 boot selection·timeout counter를 clear합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/class/watchdog/watchdogn/bootstatus
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It contains status of the watchdog
device at boot. It is equivalent to WDIOC_GETBOOTSTATUS of
ioctl interface.
What: /sys/class/watchdog/watchdogn/options
Date: April 2023
Contact: Thomas Weißschuh
Description:
It is a read only file. It contains options of watchdog device.
What: /sys/class/watchdog/watchdogn/fw_version
Date: April 2023
Contact: Thomas Weißschuh
Description:
It is a read only file. It contains firmware version of
watchdog device.
What: /sys/class/watchdog/watchdogn/identity
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It contains identity string of
watchdog device.
What: /sys/class/watchdog/watchdogn/nowayout
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read/write file. While reading, it gives '1'
if the device has the nowayout feature set, otherwise
it gives '0'. Writing a '1' to the file enables the
nowayout feature. Once set, the nowayout feature
cannot be disabled, so writing a '0' either has no
effect (if the feature was already disabled) or
results in a permission error.
What: /sys/class/watchdog/watchdogn/state
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It gives active/inactive status of
watchdog device.
What: /sys/class/watchdog/watchdogn/status
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It contains watchdog device's
internal status bits. It is equivalent to WDIOC_GETSTATUS
of ioctl interface.
What: /sys/class/watchdog/watchdogn/timeleft
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It contains value of time left for
reset generation. It is equivalent to WDIOC_GETTIMELEFT of
ioctl interface.
What: /sys/class/watchdog/watchdogn/timeout
Date: August 2015
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It is read to know about current
value of timeout programmed.
What: /sys/class/watchdog/watchdogn/pretimeout
Date: December 2016
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It specifies the time in seconds before
timeout when the pretimeout interrupt is delivered. Pretimeout
is an optional feature.
What: /sys/class/watchdog/watchdogn/pretimeout_available_governors
Date: February 2017
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read only file. It shows the pretimeout governors
available for this watchdog.
What: /sys/class/watchdog/watchdogn/pretimeout_governor
Date: February 2017
Contact: Wim Van Sebroeck <wim@iguana.be>
Description:
It is a read/write file. When read, the currently assigned
pretimeout governor is returned. When written, it sets
the pretimeout governor.
What: /sys/class/watchdog/watchdog1/access_cs0
Date: August 2019
Contact: Ivan Mikhaylov <i.mikhaylov@yadro.com>,
Alexander Amelkin <a.amelkin@yadro.com>
Description:
It is a read/write file. This attribute exists only if the
system has booted from the alternate flash chip due to
expiration of a watchdog timer of AST2400/AST2500 when
alternate boot function was enabled with 'aspeed,alt-boot'
devicetree option for that watchdog or with an appropriate
h/w strapping (for WDT2 only).
At alternate flash the 'access_cs0' sysfs node provides:
ast2400:
a way to get access to the primary SPI flash
chip at CS0 after booting from the alternate
chip at CS1.
ast2500:
a way to restore the normal address mapping
from (CS0->CS1, CS1->CS0) to (CS0->CS0,
CS1->CS1).
Clearing the boot code selection and timeout counter also
resets to the initial state the chip select line mapping. When
the SoC is in normal mapping state (i.e. booted from CS0),
clearing those bits does nothing for both versions of the SoC.
For alternate boot mode (booted from CS1 due to wdt2
expiration) the behavior differs as described above.
This option can be used with wdt2 (watchdog1) only.
When read, the current status of the boot code selection is
shown. When written with any non-zero value, it clears
the boot code selection and the timeout counter, which results
in chipselect reset for AST2400/AST2500.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Watchdog boot status
1-8| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/bootstatus |
| Date | 2015년 8월 |
| Contact | Wim Van Sebroeck <wim@iguana.be> |
| Description | Read-only file입니다. Boot 시 watchdog device status를 담으며 ioctl interface의 WDIOC_GETBOOTSTATUS와 같습니다. |
Watchdog device options
9-14| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/options |
| Date | 2023년 4월 |
| Contact | Thomas Weißschuh |
| Description | Read-only file이며 watchdog device option을 담습니다. |
Watchdog firmware version
15-21| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/fw_version |
| Date | 2023년 4월 |
| Contact | Thomas Weißschuh |
| Description | Read-only file이며 watchdog device firmware version을 담습니다. |
Watchdog identity string
22-28| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/identity |
| Date | 2015년 8월 |
| Contact | Wim Van Sebroeck <wim@iguana.be> |
| Description | Read-only file이며 watchdog device identity string을 담습니다. |
Irreversible nowayout setting
29-40| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/nowayout |
| Date | 2015년 8월 |
| Contact | Wim Van Sebroeck <wim@iguana.be> |
| Description | Read/write file입니다. Read 시 device에 nowayout feature가 set되어 있으면 1, 아니면 0을 반환합니다. 1을 쓰면 nowayout feature를 enable합니다. 한 번 set하면 disable할 수 없으므로 0을 쓰면 이미 disabled였을 때 effect가 없거나 permission error가 발생합니다. |
Enable transition은 가능하지만 enabled 상태에서 되돌아갈 수 없습니다.
Watchdog active state
41-47| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/state |
| Date | 2015년 8월 |
| Contact | Wim Van Sebroeck <wim@iguana.be> |
| Description | Read-only file이며 watchdog device의 active/inactive status를 제공합니다. |
Watchdog internal status bits
48-55| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/status |
| Date | 2015년 8월 |
| Contact | Wim Van Sebroeck <wim@iguana.be> |
| Description | Read-only file이며 watchdog device internal status bit를 담습니다. Ioctl interface의 WDIOC_GETSTATUS와 같습니다. |
Descriptive metadata, runtime state와 ioctl-equivalent status를 구분합니다.
Time left before reset
56-63| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/timeleft |
| Date | 2015년 8월 |
| Contact | Wim Van Sebroeck <wim@iguana.be> |
| Description | Read-only file이며 reset generation까지 남은 time value를 담습니다. Ioctl interface의 WDIOC_GETTIMELEFT와 같습니다. |
Programmed watchdog timeout
64-70| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/timeout |
| Date | 2015년 8월 |
| Contact | Wim Van Sebroeck <wim@iguana.be> |
| Description | Read-only file이며 programmed timeout의 current value를 알기 위해 읽습니다. |
Optional pretimeout interval
71-78| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/pretimeout |
| Date | 2016년 12월 |
| Contact | Wim Van Sebroeck <wim@iguana.be> |
| Description | Read-only file이며 timeout 전에 pretimeout interrupt가 전달되는 interval을 seconds 단위로 지정합니다. Pretimeout은 optional feature입니다. |
Available pretimeout governors
79-85| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/pretimeout_available_governors |
| Date | 2017년 2월 |
| Contact | Wim Van Sebroeck <wim@iguana.be> |
| Description | Read-only file이며 이 watchdog에 사용할 수 있는 pretimeout governor를 표시합니다. |
Selected pretimeout governor
86-93| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdogn/pretimeout_governor |
| Date | 2017년 2월 |
| Contact | Wim Van Sebroeck <wim@iguana.be> |
| Description | Read/write file입니다. Read하면 현재 assigned pretimeout governor를 반환하고 write하면 pretimeout governor를 설정합니다. |
Optional pretimeout event가 final reset timeout보다 먼저 발생하고 governor가 이를 처리합니다.
Countdown observation과 optional early-warning policy를 구분합니다.
ASPEED alternate-flash CS0 access
94-129| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/watchdog/watchdog1/access_cs0 |
| Date | 2019년 8월 |
| Contact | Ivan Mikhaylov <i.mikhaylov@yadro.com>, Alexander Amelkin <a.amelkin@yadro.com> |
| Description | Read/write file입니다. 해당 watchdog에 'aspeed,alt-boot' devicetree option을 사용하거나 적절한 hardware strapping(WDT2만 해당)으로 alternate boot function을 enable한 뒤 AST2400/AST2500 watchdog timer expiry 때문에 system이 alternate flash chip에서 boot한 경우에만 존재합니다. Alternate flash에서 AST2400은 CS1의 alternate chip으로 boot한 뒤 CS0의 primary SPI flash chip에 접근하게 합니다. AST2500은 swapped mapping (CS0->CS1, CS1->CS0)을 normal mapping (CS0->CS0, CS1->CS1)으로 복원합니다. Boot code selection과 timeout counter를 clear하면 chip-select mapping도 initial state로 reset합니다. Normal mapping state, 즉 CS0에서 boot한 경우 이 bit를 clear해도 두 SoC version 모두 아무 effect가 없습니다. WDT2 expiry 때문에 CS1에서 boot한 alternate mode에서는 앞서 설명한 대로 behavior가 다릅니다. 이 option은 WDT2(watchdog1)에만 사용할 수 있습니다. Read하면 current boot code selection status를 표시합니다. Non-zero value를 write하면 boot code selection과 timeout counter를 clear하여 AST2400/AST2500 chip-select를 reset합니다. |
Alternate boot 뒤 AST2400과 AST2500이 제공하는 recovery 동작이 다릅니다.
WDT2 alternate boot 상태에서 non-zero write가 selection과 timeout을 함께 clear합니다.
Watchdog identity, state and status
sysfs-class-watchdog:1-54Watchdog는 boot status, options, firmware, identity, active state와 ioctl-equivalent internal status를 제공하며 nowayout은 한 번 enable하면 disable할 수 없습니다.