요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
==================================
Device Initialization (devinit)
==================================
The devinit process is complex and subject to change. This document provides a high-level
overview using the Ampere GPU family as an example. The goal is to provide a conceptual
overview of the process to aid in understanding the corresponding kernel code.
Device initialization (devinit) is a crucial sequence of register read/write operations
that occur after a GPU reset. The devinit sequence is essential for properly configuring
the GPU hardware before it can be used.
The devinit engine is an interpreter program that typically runs on the PMU (Power Management
Unit) microcontroller of the GPU. This interpreter executes a "script" of initialization
commands. The devinit engine itself is part of the VBIOS ROM in the same ROM image as the
FWSEC (Firmware Security) image (see fwsec.rst and vbios.rst) and it runs before the
nova-core driver is even loaded. On an Ampere GPU, the devinit ucode is separate from the
FWSEC ucode. It is launched by FWSEC, which runs on the GSP in 'heavy-secure' mode, while
devinit runs on the PMU in 'light-secure' mode.
Key Functions of devinit
------------------------
devinit performs several critical tasks:
1. Programming VRAM memory controller timings
2. Power sequencing
3. Clock and PLL (Phase-Locked Loop) configuration
4. Thermal management
Low-level Firmware Initialization Flow
--------------------------------------
Upon reset, several microcontrollers on the GPU (such as PMU, SEC2, GSP, etc.) run GPU
firmware (gfw) code to set up the GPU and its core parameters. Most of the GPU is
considered unusable until this initialization process completes.
These low-level GPU firmware components are typically:
1. Located in the VBIOS ROM in the same ROM partition (see vbios.rst and fwsec.rst).
2. Executed in sequence on different microcontrollers:
- The devinit engine typically but not necessarily runs on the PMU.
- On an Ampere GPU, the FWSEC typically runs on the GSP (GPU System Processor) in
heavy-secure mode.
Before the driver can proceed with further initialization, it must wait for a signal
indicating that core initialization is complete (known as GFW_BOOT). This signal is
asserted by the FWSEC running on the GSP in heavy-secure mode.
Runtime Considerations
----------------------
It's important to note that the devinit sequence also needs to run during suspend/resume
operations at runtime, not just during initial boot, as it is critical to power management.
Security and Access Control
---------------------------
The initialization process involves careful privilege management. For example, before
accessing certain completion status registers, the driver must check privilege level
masks. Some registers are only accessible after secure firmware (FWSEC) lowers the
privilege level to allow CPU (LS/low-secure) access. This is the case, for example,
when receiving the GFW_BOOT signal.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Device initialization 개요와 핵심 기능
1-30Devinit 과정은 복잡하고 변경될 수 있습니다. 이 문서는 Ampere GPU family를 예로 들어 높은 수준의 개념을 설명하며, 대응하는 kernel code를 이해하는 데 필요한 전체 흐름을 제공하는 것이 목적입니다. 원문 SPDX 라이선스는 `GPL-2.0`입니다.
Device initialization은 GPU reset 뒤에 수행하는 중요한 register read/write sequence입니다. GPU hardware를 사용하기 전에 올바르게 구성하려면 이 sequence가 반드시 완료되어야 합니다.
Devinit engine은 보통 GPU의 PMU(Power Management Unit) microcontroller에서 실행되는 interpreter program입니다. 초기화 command로 이루어진 script를 실행하며, engine 자체는 FWSEC image와 같은 VBIOS ROM image 안에 들어 있습니다. 관련 위치는 `fwsec.rst`와 `vbios.rst`가 설명합니다.
Devinit은 `nova-core` driver가 load되기도 전에 실행됩니다. Ampere에서는 devinit ucode와 FWSEC ucode가 분리되어 있습니다. Heavy-secure mode로 GSP에서 실행되는 FWSEC가 devinit을 시작하고, devinit은 PMU에서 light-secure mode로 실행됩니다.
Devinit의 핵심 작업은 VRAM memory controller timing programming, power sequencing, clock와 PLL(Phase-Locked Loop) 설정, thermal management입니다.
Secure firmware가 PMU의 초기화 interpreter를 시작합니다.
GPU 사용 전 구성해야 하는 네 영역입니다.
.. SPDX-License-Identifier: GPL-2.0
==================================
Device Initialization (devinit)
==================================
The devinit process is complex and subject to change. This document provides a high-level
overview using the Ampere GPU family as an example. The goal is to provide a conceptual
overview of the process to aid in understanding the corresponding kernel code.
Device initialization (devinit) is a crucial sequence of register read/write operations
that occur after a GPU reset. The devinit sequence is essential for properly configuring
the GPU hardware before it can be used.
The devinit engine is an interpreter program that typically runs on the PMU (Power Management
Unit) microcontroller of the GPU. This interpreter executes a "script" of initialization
commands. The devinit engine itself is part of the VBIOS ROM in the same ROM image as the
FWSEC (Firmware Security) image (see fwsec.rst and vbios.rst) and it runs before the
nova-core driver is even loaded. On an Ampere GPU, the devinit ucode is separate from the
FWSEC ucode. It is launched by FWSEC, which runs on the GSP in 'heavy-secure' mode, while
devinit runs on the PMU in 'light-secure' mode.
Key Functions of devinit
------------------------
devinit performs several critical tasks:
1. Programming VRAM memory controller timings
2. Power sequencing
3. Clock and PLL (Phase-Locked Loop) configuration
4. Thermal management
Low-level firmware flow·runtime·access control
31-61Reset 뒤 PMU, SEC2, GSP 같은 여러 GPU microcontroller가 GPU firmware(`gfw`)를 실행하여 GPU와 핵심 parameter를 설정합니다. 이 과정이 끝날 때까지 GPU 대부분은 사용할 수 없는 상태로 간주합니다.
Low-level firmware component는 보통 VBIOS ROM의 같은 partition에 있으며 `vbios.rst`와 `fwsec.rst`가 이를 설명합니다. Component는 서로 다른 microcontroller에서 순차 실행됩니다. Devinit engine은 일반적으로 PMU에서 실행되지만 반드시 그런 것은 아니며, Ampere의 FWSEC는 보통 GSP에서 heavy-secure mode로 실행됩니다.
Driver가 추가 초기화를 진행하려면 core initialization 완료 신호인 `GFW_BOOT`를 기다려야 합니다. 이 신호는 GSP에서 heavy-secure mode로 실행되는 FWSEC가 assert합니다.
Devinit sequence는 initial boot에만 필요한 것이 아닙니다. Power management에 필수이므로 runtime의 suspend/resume 때도 실행해야 합니다.
초기화 과정은 privilege를 주의 깊게 관리합니다. Driver는 일부 completion status register에 접근하기 전에 privilege level mask를 검사해야 합니다. 특정 register는 FWSEC가 privilege를 낮춰 CPU의 LS/low-secure access를 허용한 뒤에만 읽을 수 있으며, `GFW_BOOT` 신호 수신이 그 예입니다.
Reset부터 driver가 사용할 수 있는 상태까지의 순서입니다.
Boot 외 runtime 복구와 privilege 조건을 함께 보여 줍니다.
Low-level Firmware Initialization Flow
--------------------------------------
Upon reset, several microcontrollers on the GPU (such as PMU, SEC2, GSP, etc.) run GPU
firmware (gfw) code to set up the GPU and its core parameters. Most of the GPU is
considered unusable until this initialization process completes.
These low-level GPU firmware components are typically:
1. Located in the VBIOS ROM in the same ROM partition (see vbios.rst and fwsec.rst).
2. Executed in sequence on different microcontrollers:
- The devinit engine typically but not necessarily runs on the PMU.
- On an Ampere GPU, the FWSEC typically runs on the GSP (GPU System Processor) in
heavy-secure mode.
Before the driver can proceed with further initialization, it must wait for a signal
indicating that core initialization is complete (known as GFW_BOOT). This signal is
asserted by the FWSEC running on the GSP in heavy-secure mode.
Runtime Considerations
----------------------
It's important to note that the devinit sequence also needs to run during suspend/resume
operations at runtime, not just during initial boot, as it is critical to power management.
Security and Access Control
---------------------------
The initialization process involves careful privilege management. For example, before
accessing certain completion status registers, the driver must check privilege level
masks. Some registers are only accessible after secure firmware (FWSEC) lowers the
privilege level to allow CPU (LS/low-secure) access. This is the case, for example,
when receiving the GFW_BOOT signal.
요약·해설
devinit.rst:1-61Ampere GPU의 devinit interpreter, firmware boot flow와 privilege 조건을 설명합니다.
문서의 중심 개념과 연결 지점입니다.