요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
RAS-DES error injection
debugfs-dwc-pcie:15-87TLP·DLLP CRC·sequence, ordered-set symbol·parity, flow-control credits와 duplicate·nullified TLP 등 30종 오류를 다음 data transmission에 주입하도록 controller를 준비합니다.
RAS-DES event counters
debugfs-dwc-pcie:89-142Controller에서 35종 event가 발생한 횟수를 선택적으로 계수합니다. Counter를 disable한 뒤 다시 enable하면 값을 reset합니다.
Lane-specific counter와 LTSSM state
debugfs-dwc-pcie:144-157Lane-specific events 1-11·34·35의 대상 lane을 선택하고 현재 PCIe LTSSM state를 문자열과 raw value로 읽습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_debug/lane_detect
Date: February 2025
Contact: Shradha Todi <shradha.t@samsung.com>
Description: (RW) Write the lane number to be checked for detection. Read
will return whether PHY indicates receiver detection on the
selected lane. The default selected lane is Lane0.
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_debug/rx_valid
Date: February 2025
Contact: Shradha Todi <shradha.t@samsung.com>
Description: (RW) Write the lane number to be checked as valid or invalid.
Read will return the status of PIPE RXVALID signal of the
selected lane. The default selected lane is Lane0.
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
Date: February 2025
Contact: Shradha Todi <shradha.t@samsung.com>
Description: The "rasdes_err_inj" is a directory which can be used to inject
errors into the system. The possible errors that can be injected
are:
1) tx_lcrc - TLP LCRC error injection TX Path
2) b16_crc_dllp - 16b CRC error injection of ACK/NAK DLLP
3) b16_crc_upd_fc - 16b CRC error injection of Update-FC DLLP
4) tx_ecrc - TLP ECRC error injection TX Path
5) fcrc_tlp - TLP's FCRC error injection TX Path
6) parity_tsos - Parity error of TSOS
7) parity_skpos - Parity error on SKPOS
8) rx_lcrc - LCRC error injection RX Path
9) rx_ecrc - ECRC error injection RX Path
10) tlp_err_seq - TLPs SEQ# error
11) ack_nak_dllp_seq - DLLPS ACK/NAK SEQ# error
12) ack_nak_dllp - ACK/NAK DLLPs transmission block
13) upd_fc_dllp - UpdateFC DLLPs transmission block
14) nak_dllp - Always transmission for NAK DLLP
15) inv_sync_hdr_sym - Invert SYNC header
16) com_pad_ts1 - COM/PAD TS1 order set
17) com_pad_ts2 - COM/PAD TS2 order set
18) com_fts - COM/FTS FTS order set
19) com_idl - COM/IDL E-idle order set
20) end_edb - END/EDB symbol
21) stp_sdp - STP/SDP symbol
22) com_skp - COM/SKP SKP order set
23) posted_tlp_hdr - Posted TLP Header credit value control
24) non_post_tlp_hdr - Non-Posted TLP Header credit value control
25) cmpl_tlp_hdr - Completion TLP Header credit value control
26) posted_tlp_data - Posted TLP Data credit value control
27) non_post_tlp_data - Non-Posted TLP Data credit value control
28) cmpl_tlp_data - Completion TLP Data credit value control
29) duplicate_tlp - Generates duplicate TLPs
30) nullified_tlp - Generates Nullified TLPs
(WO) Write to the attribute will prepare controller to inject
the respective error in the next transmission of data.
Parameter required to write will change in the following ways:
- Errors 9 and 10 are sequence errors. The write command:
echo <count> <diff> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
<count>
Number of errors to be injected
<diff>
The difference to add or subtract from natural
sequence number to generate sequence error.
Allowed range from -4095 to 4095
- Errors 23 to 28 are credit value error insertions. The write
command:
echo <count> <diff> <vc> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
<count>
Number of errors to be injected
<diff>
The difference to add or subtract from UpdateFC
credit value. Allowed range from -4095 to 4095
<vc>
Target VC number
- All other errors. The write command:
echo <count> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
<count>
Number of errors to be injected
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/counter_enable
Date: February 2025
Contact: Shradha Todi <shradha.t@samsung.com>
Description: The "rasdes_event_counters" is the directory which can be used
to collect statistical data about the number of times a certain
event has occurred in the controller. The list of possible
events are:
1) EBUF Overflow
2) EBUF Underrun
3) Decode Error
4) Running Disparity Error
5) SKP OS Parity Error
6) SYNC Header Error
7) Rx Valid De-assertion
8) CTL SKP OS Parity Error
9) 1st Retimer Parity Error
10) 2nd Retimer Parity Error
11) Margin CRC and Parity Error
12) Detect EI Infer
13) Receiver Error
14) RX Recovery Req
15) N_FTS Timeout
16) Framing Error
17) Deskew Error
18) Framing Error In L0
19) Deskew Uncompleted Error
20) Bad TLP
21) LCRC Error
22) Bad DLLP
23) Replay Number Rollover
24) Replay Timeout
25) Rx Nak DLLP
26) Tx Nak DLLP
27) Retry TLP
28) FC Timeout
29) Poisoned TLP
30) ECRC Error
31) Unsupported Request
32) Completer Abort
33) Completion Timeout
34) EBUF SKP Add
35) EBUF SKP Del
(RW) Write 1 to enable the event counter and write 0 to disable
the event counter. Read will return whether the counter is
currently enabled or disabled. Counter is disabled by default.
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/counter_value
Date: February 2025
Contact: Shradha Todi <shradha.t@samsung.com>
Description: (RO) Read will return the current value of the event counter.
To reset the counter, counter should be disabled first and then
enabled back using the "counter_enable" attribute.
What: /sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/lane_select
Date: February 2025
Contact: Shradha Todi <shradha.t@samsung.com>
Description: (RW) Some lanes in the event list are lane specific events.
These include events from 1 to 11, as well as, 34 and 35. Write
the lane number for which you wish the counter to be enabled,
disabled, or value dumped. Read will return the current
selected lane number. Lane0 is selected by default.
What: /sys/kernel/debug/dwc_pcie_<dev>/ltssm_status
Date: February 2025
Contact: Hans Zhang <18255117159@163.com>
Description: (RO) Read will return the current PCIe LTSSM state in both
string and raw value.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Lane detect와 PIPE RXVALID
1-13| What | Date / Contact | 설명 | 권한 |
|---|---|---|---|
| /sys/kernel/debug/dwc_pcie_<dev>/rasdes_debug/lane_detect | 2025년 2월 / Shradha Todi <shradha.t@samsung.com> | 검사할 lane number를 씁니다. 읽으면 선택한 lane에서 PHY가 receiver detection을 나타내는지 반환합니다. 기본 lane은 Lane0입니다. | RW |
| /sys/kernel/debug/dwc_pcie_<dev>/rasdes_debug/rx_valid | 2025년 2월 / Shradha Todi <shradha.t@samsung.com> | Valid 또는 invalid 상태를 검사할 lane number를 씁니다. 읽으면 선택한 lane의 PIPE RXVALID signal status를 반환합니다. 기본 lane은 Lane0입니다. | RW |
주입할 수 있는 30종 RAS-DES errors
15-52| 항목 | 내용 |
|---|---|
| What | /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error> |
| Date | 2025년 2월 |
| Contact | Shradha Todi <shradha.t@samsung.com> |
rasdes_err_inj directory에서 다음 errors를 system에 주입할 수 있습니다.
| 번호 | Error | 설명 |
|---|---|---|
| 1 | tx_lcrc | TX path TLP LCRC error injection |
| 2 | b16_crc_dllp | ACK/NAK DLLP의 16-bit CRC error injection |
| 3 | b16_crc_upd_fc | Update-FC DLLP의 16-bit CRC error injection |
| 4 | tx_ecrc | TX path TLP ECRC error injection |
| 5 | fcrc_tlp | TX path TLP FCRC error injection |
| 6 | parity_tsos | TSOS parity error |
| 7 | parity_skpos | SKPOS parity error |
| 8 | rx_lcrc | RX path LCRC error injection |
| 9 | rx_ecrc | RX path ECRC error injection |
| 10 | tlp_err_seq | TLP sequence number error |
| 11 | ack_nak_dllp_seq | DLLP ACK/NAK sequence number error |
| 12 | ack_nak_dllp | ACK/NAK DLLP transmission block |
| 13 | upd_fc_dllp | UpdateFC DLLP transmission block |
| 14 | nak_dllp | NAK DLLP를 항상 전송 |
| 15 | inv_sync_hdr_sym | SYNC header 반전 |
| 16 | com_pad_ts1 | COM/PAD TS1 ordered set |
| 17 | com_pad_ts2 | COM/PAD TS2 ordered set |
| 18 | com_fts | COM/FTS FTS ordered set |
| 19 | com_idl | COM/IDL E-idle ordered set |
| 20 | end_edb | END/EDB symbol |
| 21 | stp_sdp | STP/SDP symbol |
| 22 | com_skp | COM/SKP SKP ordered set |
| 23 | posted_tlp_hdr | Posted TLP Header credit value control |
| 24 | non_post_tlp_hdr | Non-Posted TLP Header credit value control |
| 25 | cmpl_tlp_hdr | Completion TLP Header credit value control |
| 26 | posted_tlp_data | Posted TLP Data credit value control |
| 27 | non_post_tlp_data | Non-Posted TLP Data credit value control |
| 28 | cmpl_tlp_data | Completion TLP Data credit value control |
| 29 | duplicate_tlp | Duplicate TLPs 생성 |
| 30 | nullified_tlp | Nullified TLPs 생성 |
Error type별 write parameters
53-87Attribute에 쓰면 controller가 다음 data transmission에서 해당 error를 주입하도록 준비합니다. 권한은 WO입니다.
원문 분류상 errors 9와 10은 sequence errors이며 다음 형식을 사용합니다.
echo <count> <diff> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
| 인자 | 의미 |
|---|---|
| <count> | 주입할 error 수 |
| <diff> | 자연스러운 sequence number에 더하거나 빼서 sequence error를 만들 차이. 허용 범위 -4095..4095 |
Errors 23..28은 credit value error insertion이며 다음 형식을 사용합니다.
echo <count> <diff> <vc> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
| 인자 | 의미 |
|---|---|
| <count> | 주입할 error 수 |
| <diff> | UpdateFC credit value에 더하거나 뺄 차이. 허용 범위 -4095..4095 |
| <vc> | Target VC number |
그 밖의 모든 errors는 count만 씁니다.
echo <count> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
Error category에 맞는 parameters를 쓰면 즉시 packet을 생성하는 대신 controller가 다음 transmission에 적용할 injection을 준비한다.
계수할 수 있는 35종 controller events
89-132| 항목 | 내용 |
|---|---|
| What | /sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/counter_enable |
| Date | 2025년 2월 |
| Contact | Shradha Todi <shradha.t@samsung.com> |
rasdes_event_counters directory는 controller에서 특정 event가 발생한 횟수의 statistical data를 수집합니다.
| 번호 | Event |
|---|---|
| 1 | EBUF Overflow |
| 2 | EBUF Underrun |
| 3 | Decode Error |
| 4 | Running Disparity Error |
| 5 | SKP OS Parity Error |
| 6 | SYNC Header Error |
| 7 | Rx Valid De-assertion |
| 8 | CTL SKP OS Parity Error |
| 9 | 1st Retimer Parity Error |
| 10 | 2nd Retimer Parity Error |
| 11 | Margin CRC and Parity Error |
| 12 | Detect EI Infer |
| 13 | Receiver Error |
| 14 | RX Recovery Req |
| 15 | N_FTS Timeout |
| 16 | Framing Error |
| 17 | Deskew Error |
| 18 | Framing Error In L0 |
| 19 | Deskew Uncompleted Error |
| 20 | Bad TLP |
| 21 | LCRC Error |
| 22 | Bad DLLP |
| 23 | Replay Number Rollover |
| 24 | Replay Timeout |
| 25 | Rx Nak DLLP |
| 26 | Tx Nak DLLP |
| 27 | Retry TLP |
| 28 | FC Timeout |
| 29 | Poisoned TLP |
| 30 | ECRC Error |
| 31 | Unsupported Request |
| 32 | Completer Abort |
| 33 | Completion Timeout |
| 34 | EBUF SKP Add |
| 35 | EBUF SKP Del |
counter_enable에 1을 쓰면 enable, 0을 쓰면 disable합니다. 읽으면 현재 enable 여부를 반환합니다. 기본값은 disabled이며 권한은 RW입니다.
Counter value, lane selection, LTSSM
137-157| What | Date / Contact | 설명 | 권한 |
|---|---|---|---|
| /sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/counter_value | 2025년 2월 / Shradha Todi <shradha.t@samsung.com> | 현재 event counter 값을 반환합니다. Reset하려면 counter_enable에서 먼저 disable한 뒤 다시 enable해야 합니다. | RO |
| /sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/lane_select | 2025년 2월 / Shradha Todi <shradha.t@samsung.com> | Lane-specific events 1..11과 34·35에 사용할 lane number를 씁니다. Enable·disable·value dump가 선택 lane에 적용됩니다. 읽으면 현재 lane을 반환하며 기본값은 Lane0입니다. | RW |
| /sys/kernel/debug/dwc_pcie_<dev>/ltssm_status | 2025년 2월 / Hans Zhang <18255117159@163.com> | 현재 PCIe LTSSM state를 문자열과 raw value로 반환합니다. | RO |
Lane-specific event는 lane을 먼저 고른 뒤 counter를 enable한다. Disable 후 re-enable은 새 측정을 시작하면서 기존 count를 reset한다.
Lane receiver detection과 RXVALID
debugfs-dwc-pcie:1-13선택한 lane의 PHY receiver detection과 PIPE RXVALID signal 상태를 읽으며 기본 선택은 Lane0입니다.