← Documents Documentation/ABI/testing/sysfs-bus-coresight-devices-tmc GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

CoreSight TMC sysfs ABI

CoreSight Trace Memory Controller의 trigger counter, Trace RAM management registers, formatter state, TMC-ETR buffer 설정과 hardware context label을 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-bus-coresight-devices-tmc
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Trigger 이후 formatter 정지

sysfs-bus-coresight-devices-tmc:1-8

trigger_cntr는 trigger event 뒤 지정된 word 수를 저장한 후 formatter를 멈춰 Trace RAM write access를 중단합니다.

Trace RAM size, status와 pointers

sysfs-bus-coresight-devices-tmc:10-40

mgmt/rsz와 mgmt/sts는 local RAM 크기와 TMC status를, mgmt/rrp와 mgmt/rwp는 APB read 및 CoreSight bus write에 쓰이는 Trace RAM pointers를 hardware registers에서 직접 읽습니다.

Trigger, control과 formatter registers

sysfs-bus-coresight-devices-tmc:42-70

mgmt/trg, mgmt/ctl, mgmt/ffsr와 mgmt/ffcr은 TMC trigger, control, Formatter and Flush status/control register 값을 직접 노출합니다.

TMC mode와 capabilities

sysfs-bus-coresight-devices-tmc:72-85

mgmt/mode는 device에 구성된 동작 mode를, mgmt/devid는 CoreSight TMC capabilities를 보여 줍니다.

TMC-ETR buffer configuration

sysfs-bus-coresight-devices-tmc:87-109

TMC-ETR에서는 page-aligned SYSFS trace buffer size를 설정하고, 지원되는 buffer modes를 확인한 뒤 그중 preferred mode를 선택할 수 있습니다.

Hardware context label

sysfs-bus-coresight-devices-tmc:111-115

label은 TMC device의 hardware context information을 보여 줍니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/bus/coresight/devices/<memory_map>.tmc/trigger_cntr
2 Date: November 2014
3 KernelVersion: 3.19
4 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
5 Description: (RW) Disables write access to the Trace RAM by stopping the
6 formatter after a defined number of words have been stored
7 following the trigger event. Additional interface for this
8 driver are expected to be added as it matures.
9
10 What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/rsz
11 Date: March 2016
12 KernelVersion: 4.7
13 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
14 Description: (Read) Defines the size, in 32-bit words, of the local RAM buffer.
15 The value is read directly from HW register RSZ, 0x004.
16
17 What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/sts
18 Date: March 2016
19 KernelVersion: 4.7
20 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
21 Description: (Read) Shows the value held by the TMC status register. The value
22 is read directly from HW register STS, 0x00C.
23
24 What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/rrp
25 Date: March 2016
26 KernelVersion: 4.7
27 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
28 Description: (Read) Shows the value held by the TMC RAM Read Pointer register
29 that is used to read entries from the Trace RAM over the APB
30 interface. The value is read directly from HW register RRP,
31 0x014.
32
33 What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/rwp
34 Date: March 2016
35 KernelVersion: 4.7
36 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
37 Description: (Read) Shows the value held by the TMC RAM Write Pointer register
38 that is used to sets the write pointer to write entries from
39 the CoreSight bus into the Trace RAM. The value is read directly
40 from HW register RWP, 0x018.
41
42 What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/trg
43 Date: March 2016
44 KernelVersion: 4.7
45 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
46 Description: (Read) Similar to "trigger_cntr" above except that this value is
47 read directly from HW register TRG, 0x01C.
48
49 What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/ctl
50 Date: March 2016
51 KernelVersion: 4.7
52 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
53 Description: (Read) Shows the value held by the TMC Control register. The value
54 is read directly from HW register CTL, 0x020.
55
56 What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/ffsr
57 Date: March 2016
58 KernelVersion: 4.7
59 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
60 Description: (Read) Shows the value held by the TMC Formatter and Flush Status
61 register. The value is read directly from HW register FFSR,
62 0x300.
63
64 What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/ffcr
65 Date: March 2016
66 KernelVersion: 4.7
67 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
68 Description: (Read) Shows the value held by the TMC Formatter and Flush Control
69 register. The value is read directly from HW register FFCR,
70 0x304.
71
72 What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/mode
73 Date: March 2016
74 KernelVersion: 4.7
75 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
76 Description: (Read) Shows the value held by the TMC Mode register, which
77 indicate the mode the device has been configured to enact. The
78 The value is read directly from the MODE register, 0x028.
79
80 What: /sys/bus/coresight/devices/<memory_map>.tmc/mgmt/devid
81 Date: March 2016
82 KernelVersion: 4.7
83 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
84 Description: (Read) Indicates the capabilities of the Coresight TMC.
85 The value is read directly from the DEVID register, 0xFC8,
86
87 What: /sys/bus/coresight/devices/<memory_map>.tmc/buffer_size
88 Date: December 2018
89 KernelVersion: 4.19
90 Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
91 Description: (RW) Size of the trace buffer for TMC-ETR when used in SYSFS
92 mode. Writable only for TMC-ETR configurations. The value
93 should be aligned to the kernel pagesize.
94
95 What: /sys/bus/coresight/devices/<memory_map>.tmc/buf_modes_available
96 Date: August 2023
97 KernelVersion: 6.7
98 Contact: Anshuman Khandual <anshuman.khandual@arm.com>
99 Description: (Read) Shows all supported Coresight TMC-ETR buffer modes available
100 for the users to configure explicitly. This file is available only
101 for TMC ETR devices.
102
103 What: /sys/bus/coresight/devices/<memory_map>.tmc/buf_mode_preferred
104 Date: August 2023
105 KernelVersion: 6.7
106 Contact: Anshuman Khandual <anshuman.khandual@arm.com>
107 Description: (RW) Current Coresight TMC-ETR buffer mode selected. But user could
108 only provide a mode which is supported for a given ETR device. This
109 file is available only for TMC ETR devices.
110
111 What: /sys/bus/coresight/devices/<memory_map>.tmc/label
112 Date: Aug 2025
113 KernelVersion 6.18
114 Contact: Mao Jinlong <quic_jinlmao@quicinc.com>
115 Description: (Read) Show hardware context information of device.
116

3. 한국어 전문 번역

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

TMC trigger counter

1-8
항목전문 번역
What/sys/bus/coresight/devices/<memory_map>.tmc/trigger_cntr
Date2014년 11월
KernelVersion3.19
ContactMathieu Poirier <mathieu.poirier@linaro.org>
Description(RW) Trigger event 뒤 정의된 수의 words가 저장되면 formatter를 정지시켜 Trace RAM에 대한 write access를 disable합니다. 이 driver가 성숙함에 따라 추가 interface가 더해질 예정입니다.

Trace RAM management registers

10-40
WhatDate / Kernel / Contact전문 번역
/sys/bus/coresight/devices/<memory_map>.tmc/mgmt/rsz2016년 3월 / 4.7 / Mathieu Poirier <mathieu.poirier@linaro.org>(Read) Local RAM buffer의 크기를 32-bit words 단위로 정의합니다. 값은 hardware register RSZ, 0x004에서 직접 읽습니다.
/sys/bus/coresight/devices/<memory_map>.tmc/mgmt/sts2016년 3월 / 4.7 / Mathieu Poirier <mathieu.poirier@linaro.org>(Read) TMC status register가 보관하는 값을 보여 줍니다. 값은 hardware register STS, 0x00C에서 직접 읽습니다.
/sys/bus/coresight/devices/<memory_map>.tmc/mgmt/rrp2016년 3월 / 4.7 / Mathieu Poirier <mathieu.poirier@linaro.org>(Read) APB interface를 통해 Trace RAM의 entries를 읽는 데 사용하는 TMC RAM Read Pointer register 값을 보여 줍니다. 값은 hardware register RRP, 0x014에서 직접 읽습니다.
/sys/bus/coresight/devices/<memory_map>.tmc/mgmt/rwp2016년 3월 / 4.7 / Mathieu Poirier <mathieu.poirier@linaro.org>(Read) CoreSight bus의 entries를 Trace RAM에 기록할 write pointer를 설정하는 TMC RAM Write Pointer register 값을 보여 줍니다. 값은 hardware register RWP, 0x018에서 직접 읽습니다.
TMC Trace RAM data와 pointer 흐름
CoreSight bus entriesRWP 0x018Trace RAMRRP 0x014APB interface
Trigger eventTRG word countFormatter stopTrace RAM write disabled

CoreSight bus에서 들어온 trace는 RWP가 가리키는 위치에 기록되고 RRP가 가리키는 entries는 APB interface를 통해 읽힙니다.

TMC trigger, control과 formatter registers

42-70
WhatDate / Kernel / Contact전문 번역
/sys/bus/coresight/devices/<memory_map>.tmc/mgmt/trg2016년 3월 / 4.7 / Mathieu Poirier <mathieu.poirier@linaro.org>(Read) 위 trigger_cntr와 비슷하지만 이 값은 hardware register TRG, 0x01C에서 직접 읽습니다.
/sys/bus/coresight/devices/<memory_map>.tmc/mgmt/ctl2016년 3월 / 4.7 / Mathieu Poirier <mathieu.poirier@linaro.org>(Read) TMC Control register가 보관하는 값을 보여 줍니다. 값은 hardware register CTL, 0x020에서 직접 읽습니다.
/sys/bus/coresight/devices/<memory_map>.tmc/mgmt/ffsr2016년 3월 / 4.7 / Mathieu Poirier <mathieu.poirier@linaro.org>(Read) TMC Formatter and Flush Status register가 보관하는 값을 보여 줍니다. 값은 hardware register FFSR, 0x300에서 직접 읽습니다.
/sys/bus/coresight/devices/<memory_map>.tmc/mgmt/ffcr2016년 3월 / 4.7 / Mathieu Poirier <mathieu.poirier@linaro.org>(Read) TMC Formatter and Flush Control register가 보관하는 값을 보여 줍니다. 값은 hardware register FFCR, 0x304에서 직접 읽습니다.

TMC mode와 device capabilities

72-85
WhatDate / Kernel / Contact전문 번역
/sys/bus/coresight/devices/<memory_map>.tmc/mgmt/mode2016년 3월 / 4.7 / Mathieu Poirier <mathieu.poirier@linaro.org>(Read) Device가 수행하도록 구성된 mode를 나타내는 TMC Mode register 값을 보여 줍니다. 값은 MODE register, 0x028에서 직접 읽습니다.
/sys/bus/coresight/devices/<memory_map>.tmc/mgmt/devid2016년 3월 / 4.7 / Mathieu Poirier <mathieu.poirier@linaro.org>(Read) CoreSight TMC의 capabilities를 나타냅니다. 값은 DEVID register, 0xFC8에서 직접 읽습니다.

TMC-ETR SYSFS buffer configuration

87-109
WhatDate / Kernel / Contact전문 번역
/sys/bus/coresight/devices/<memory_map>.tmc/buffer_size2018년 12월 / 4.19 / Mathieu Poirier <mathieu.poirier@linaro.org>(RW) SYSFS mode에서 사용하는 TMC-ETR trace buffer의 크기입니다. TMC-ETR configuration에서만 쓸 수 있으며 값은 kernel page size에 맞춰 정렬해야 합니다.
/sys/bus/coresight/devices/<memory_map>.tmc/buf_modes_available2023년 8월 / 6.7 / Anshuman Khandual <anshuman.khandual@arm.com>(Read) 사용자가 명시적으로 구성할 수 있는, 지원되는 모든 CoreSight TMC-ETR buffer modes를 보여 줍니다. 이 file은 TMC ETR devices에만 존재합니다.
/sys/bus/coresight/devices/<memory_map>.tmc/buf_mode_preferred2023년 8월 / 6.7 / Anshuman Khandual <anshuman.khandual@arm.com>(RW) 현재 선택된 CoreSight TMC-ETR buffer mode입니다. 사용자는 해당 ETR device가 지원하는 mode만 지정할 수 있습니다. 이 file은 TMC ETR devices에만 존재합니다.

TMC hardware context

111-115
항목전문 번역
What/sys/bus/coresight/devices/<memory_map>.tmc/label
Date2025년 8월
KernelVersion6.18
ContactMao Jinlong <quic_jinlmao@quicinc.com>
Description(Read) Device의 hardware context information을 보여 줍니다.