← Documents Documentation/gpu/msm-crash-dump.rst GitHub 원문 ↗

Linux 6.18.37 · GPU·DRM

MSM Crash Dump Format

MSM GPU hang dump의 metadata·ringbuffer·buffer object·register 형식을 정의합니다.

Source pathDocumentation/gpu/msm-crash-dump.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

msm-crash-dump.rst:1-98

MSM GPU hang dump의 metadata·ringbuffer·buffer object·register 형식을 정의합니다.

핵심 범위
영역내용
Metadatakernel·time·revision
Executionringbuffer·bo
Hardwareregisters·HLSQ

이 문서가 다루는 주요 항목입니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 :orphan:
2
3 =====================
4 MSM Crash Dump Format
5 =====================
6
7 Following a GPU hang the MSM driver outputs debugging information via
8 /sys/kernel/dri/X/show or via devcoredump (/sys/class/devcoredump/dcdX/data).
9 This document describes how the output is formatted.
10
11 Each entry is in the form key: value. Sections headers will not have a value
12 and all the contents of a section will be indented two spaces from the header.
13 Each section might have multiple array entries the start of which is designated
14 by a (-).
15
16 Mappings
17 --------
18
19 kernel
20 The kernel version that generated the dump (UTS_RELEASE).
21
22 module
23 The module that generated the crashdump.
24
25 time
26 The kernel time at crash formatted as seconds.microseconds.
27
28 comm
29 Comm string for the binary that generated the fault.
30
31 cmdline
32 Command line for the binary that generated the fault.
33
34 revision
35 ID of the GPU that generated the crash formatted as
36 core.major.minor.patchlevel separated by dots.
37
38 rbbm-status
39 The current value of RBBM_STATUS which shows what top level GPU
40 components are in use at the time of crash.
41
42 ringbuffer
43 Section containing the contents of each ringbuffer. Each ringbuffer is
44 identified with an id number.
45
46 id
47 Ringbuffer ID (0 based index). Each ringbuffer in the section
48 will have its own unique id.
49 iova
50 GPU address of the ringbuffer.
51
52 last-fence
53 The last fence that was issued on the ringbuffer
54
55 retired-fence
56 The last fence retired on the ringbuffer.
57
58 rptr
59 The current read pointer (rptr) for the ringbuffer.
60
61 wptr
62 The current write pointer (wptr) for the ringbuffer.
63
64 size
65 Maximum size of the ringbuffer programmed in the hardware.
66
67 data
68 The contents of the ring encoded as ascii85. Only the used
69 portions of the ring will be printed.
70
71 bo
72 List of buffers from the hanging submission if available.
73 Each buffer object will have a uinque iova.
74
75 iova
76 GPU address of the buffer object.
77
78 size
79 Allocated size of the buffer object.
80
81 data
82 The contents of the buffer object encoded with ascii85. Only
83 Trailing zeros at the end of the buffer will be skipped.
84
85 registers
86 Set of registers values. Each entry is on its own line enclosed
87 by brackets { }.
88
89 offset
90 Byte offset of the register from the start of the
91 GPU memory region.
92
93 value
94 Hexadecimal value of the register.
95
96 registers-hlsq
97 (5xx only) Register values from the HLSQ aperture.
98 Same format as the register section.
99

3. 한국어 전문 번역

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

MSM crash dump 형식

1-14

GPU hang이 발생하면 MSM 드라이버는 `/sys/kernel/dri/X/show` 또는 devcoredump의 `/sys/class/devcoredump/dcdX/data`를 통해 debugging 정보를 출력합니다. 이 문서는 해당 출력 형식을 정의합니다.

각 entry는 `key: value` 형식입니다. Section header에는 value가 없으며, section의 모든 내용은 header보다 두 칸 들여씁니다. Section 안에 array entry가 여러 개 있을 수 있고 각 entry 시작은 `-`로 표시합니다.

Crash dump 계층
section header: value 없음 key: value: 두 칸 들여쓴 field -: array entry 시작 nested key: value

Indent와 array marker가 만드는 구조입니다.

Crash dump 접근 경로
Interface경로
DRM debugfs/sys/kernel/dri/X/show
devcoredump/sys/class/devcoredump/dcdX/data

GPU hang 뒤 dump를 읽을 수 있는 두 interface입니다.

:orphan:

=====================
MSM Crash Dump Format
=====================

Following a GPU hang the MSM driver outputs debugging information via
/sys/kernel/dri/X/show or via devcoredump (/sys/class/devcoredump/dcdX/data).
This document describes how the output is formatted.

Each entry is in the form key: value. Sections headers will not have a value
and all the contents of a section will be indented two spaces from the header.
Each section might have multiple array entries the start of which is designated
by a (-).

기본 metadata·ringbuffer·buffer object

15-74

`kernel`은 dump를 생성한 kernel version인 `UTS_RELEASE`, `module`은 crashdump를 생성한 module, `time`은 `seconds.microseconds` 형식의 kernel crash time을 나타냅니다. `comm`과 `cmdline`은 fault를 일으킨 binary의 comm string과 command line입니다.

`revision`은 GPU ID를 `core.major.minor.patchlevel` 형식으로 기록합니다. `rbbm-status`는 crash 시점에 사용 중이던 최상위 GPU component를 보여 주는 `RBBM_STATUS` 현재 값입니다.

`ringbuffer` section은 각 ringbuffer의 내용을 담고 0부터 시작하는 고유 `id`로 구분합니다. `iova`는 GPU address, `last-fence`는 마지막으로 발행한 fence, `retired-fence`는 마지막으로 retire된 fence입니다. `rptr`와 `wptr`는 현재 read/write pointer이며 `size`는 hardware에 설정된 최대 ringbuffer 크기입니다.

Ring의 `data`는 ascii85로 encoding하며 사용한 부분만 출력합니다. `bo`는 가능한 경우 hang을 일으킨 submission의 buffer 목록입니다. 각 buffer object는 고유 `iova`, 할당 `size`, ascii85 `data`를 가지며 buffer 끝의 trailing zero만 생략합니다.

기본 crash metadata
Key의미
kernelDump 생성 kernel version, UTS_RELEASE
moduleCrashdump 생성 module
timeseconds.microseconds 형식의 kernel time
comm·cmdlineFault를 생성한 binary와 command line
revisioncore.major.minor.patchlevel 형식 GPU ID
rbbm-statusCrash 시점의 RBBM_STATUS

Hang의 환경과 GPU 상태를 식별합니다.

Ringbuffer field
Field의미
id0-based ringbuffer ID
iovaRingbuffer GPU address
last-fence마지막 발행 fence
retired-fence마지막 retire fence
rptr·wptr현재 read·write pointer
sizeHardware에 설정한 최대 크기
data사용 영역의 ascii85 encoding

각 ring의 실행 위치와 내용을 복원하는 값입니다.

Hang submission 자료
ringbuffer id·iova 선택rptr·wptr와 fence 진행 상태 확인ascii85 ring data decodebo의 고유 iova·size 대응ascii85 buffer data decode; 끝의 zero만 생략됨

Dump에서 command stream과 관련 buffer를 추적합니다.


Mappings
--------

kernel
        The kernel version that generated the dump (UTS_RELEASE).

module
        The module that generated the crashdump.

time
        The kernel time at crash formatted as seconds.microseconds.

comm
        Comm string for the binary that generated the fault.

cmdline
        Command line for the binary that generated the fault.

revision
        ID of the GPU that generated the crash formatted as
        core.major.minor.patchlevel separated by dots.

rbbm-status
        The current value of RBBM_STATUS which shows what top level GPU
        components are in use at the time of crash.

ringbuffer
        Section containing the contents of each ringbuffer. Each ringbuffer is
        identified with an id number.

        id
                Ringbuffer ID (0 based index).  Each ringbuffer in the section
                will have its own unique id.
        iova
                GPU address of the ringbuffer.

        last-fence
                The last fence that was issued on the ringbuffer

        retired-fence
                The last fence retired on the ringbuffer.

        rptr
                The current read pointer (rptr) for the ringbuffer.

        wptr
                The current write pointer (wptr) for the ringbuffer.

        size
                Maximum size of the ringbuffer programmed in the hardware.

        data
                The contents of the ring encoded as ascii85.  Only the used
                portions of the ring will be printed.

bo
        List of buffers from the hanging submission if available.
        Each buffer object will have a uinque iova.

Register dump

75-98

`registers`는 register value 집합입니다. 각 entry는 한 줄에 하나씩 `{ }`로 감싸며, `offset`은 GPU memory region 시작점에서 register까지의 byte offset이고 `value`는 hexadecimal register 값입니다.

`registers-hlsq`는 5xx GPU에만 있는 HLSQ aperture의 register 값입니다. 형식은 일반 `registers` section과 같습니다.

Register entry
Field형식
offsetGPU memory region 시작점 기준 byte offset
valueHexadecimal register value
registers-hlsq5xx HLSQ aperture, registers와 동일 형식

Register 위치와 값을 기록하는 두 field입니다.

Register 분석
registers 또는 5xx registers-hlsq 선택offset을 GPU memory region base에 적용hexadecimal value 해석RBBM_STATUS·ring pointer와 함께 hang 상태 분석

Dump entry를 실제 register 상태에 대응시키는 순서입니다.

        iova
                GPU address of the buffer object.

        size
                Allocated size of the buffer object.

        data
                The contents of the buffer object encoded with ascii85.  Only
                Trailing zeros at the end of the buffer will be skipped.

registers
        Set of registers values. Each entry is on its own line enclosed
        by brackets { }.

        offset
                Byte offset of the register from the start of the
                GPU memory region.

        value
                Hexadecimal value of the register.

registers-hlsq
                (5xx only) Register values from the HLSQ aperture.
                Same format as the register section.