요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/timer/sifive,clint.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: SiFive Core Local Interruptor
maintainers:
- Palmer Dabbelt <[email protected]>
- Anup Patel <[email protected]>
description:
SiFive (and other RISC-V) SOCs include an implementation of the SiFive
Core Local Interruptor (CLINT) for M-mode timer and M-mode inter-processor
interrupts. It directly connects to the timer and inter-processor interrupt
lines of various HARTs (or CPUs) so RISC-V per-HART (or per-CPU) local
interrupt controller is the parent interrupt controller for CLINT device.
The clock frequency of CLINT is specified via "timebase-frequency" DT
property of "/cpus" DT node. The "timebase-frequency" DT property is
described in Documentation/devicetree/bindings/riscv/cpus.yaml
T-Head C906/C910 CPU cores include an implementation of CLINT too, however
their implementation lacks a memory-mapped MTIME register, thus not
compatible with SiFive ones.
properties:
compatible:
oneOf:
- items:
- enum:
- canaan,k210-clint # Canaan Kendryte K210
- eswin,eic7700-clint # ESWIN EIC7700
- sifive,fu540-c000-clint # SiFive FU540
- spacemit,k1-clint # SpacemiT K1
- starfive,jh7100-clint # StarFive JH7100
- starfive,jh7110-clint # StarFive JH7110
- starfive,jh8100-clint # StarFive JH8100
- const: sifive,clint0 # SiFive CLINT v0 IP block
- items:
- {}
- const: sifive,clint2 # SiFive CLINT v2 IP block
description:
SiFive CLINT v2 is the HRT that supports the Zicntr. The control of sifive,clint2
differs from that of sifive,clint0, making them incompatible.
- items:
- enum:
- allwinner,sun20i-d1-clint
- sophgo,cv1800b-clint
- sophgo,cv1812h-clint
- sophgo,sg2002-clint
- thead,th1520-clint
- const: thead,c900-clint
- items:
- const: sifive,clint0
- const: riscv,clint0
deprecated: true
description: For the QEMU virt machine only
description:
Should be "<vendor>,<chip>-clint", followed by "sifive,clint<version>"
when compatible with a SiFive CLINT. Please refer to
sifive-blocks-ip-versioning.txt for details regarding the latter.
reg:
maxItems: 1
interrupts-extended:
minItems: 1
maxItems: 4095
sifive,fine-ctr-bits:
maximum: 15
description: The width in bits of the fine counter.
if:
properties:
compatible:
contains:
const: sifive,clint2
then:
required:
- sifive,fine-ctr-bits
else:
properties:
sifive,fine-ctr-bits: false
additionalProperties: false
required:
- compatible
- reg
- interrupts-extended
examples:
- |
timer@2000000 {
compatible = "sifive,fu540-c000-clint", "sifive,clint0";
interrupts-extended = <&cpu1intc 3>, <&cpu1intc 7>,
<&cpu2intc 3>, <&cpu2intc 7>,
<&cpu3intc 3>, <&cpu3intc 7>,
<&cpu4intc 3>, <&cpu4intc 7>;
reg = <0x2000000 0x10000>;
};
...
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
SiFive Core Local Interruptor
1-25GPL-2.0-only 또는 BSD-2-Clause 라이선스의 이 스키마는 SiFive Core Local Interruptor(CLINT)를 정의합니다. SiFive와 그 밖의 RISC-V SoC는 M-mode timer interrupt와 M-mode inter-processor interrupt를 위해 CLINT를 구현합니다. CLINT는 여러 HART(CPU)의 timer 및 inter-processor interrupt 선에 직접 연결되므로, RISC-V의 per-HART(per-CPU) local interrupt controller가 CLINT device의 parent interrupt controller가 됩니다.
CLINT clock frequency는 `/cpus` DT node의 `timebase-frequency` 속성으로 지정하며, 해당 속성은 `Documentation/devicetree/bindings/riscv/cpus.yaml`에 설명되어 있습니다. T-Head C906/C910 CPU core도 CLINT를 구현하지만 memory-mapped `MTIME` register가 없어서 SiFive 구현과 호환되지 않습니다. Maintainer는 Palmer Dabbelt와 Anup Patel입니다.
CLINT v0·v2와 T-Head variant
26-64SiFive CLINT v0 계열은 Canaan K210, ESWIN EIC7700, SiFive FU540, SpacemiT K1, StarFive JH7100·JH7110·JH8100의 SoC별 compatible 뒤에 `sifive,clint0`을 둡니다. CLINT v2 계열은 vendor·chip compatible 뒤에 `sifive,clint2`를 둡니다. CLINT v2는 Zicntr를 지원하는 HRT이며 제어 방식이 `sifive,clint0`과 달라 서로 호환되지 않습니다.
Allwinner D1, Sophgo CV1800B·CV1812H·SG2002, T-Head TH1520은 SoC별 compatible 뒤에 `thead,c900-clint`를 사용합니다. QEMU virt machine 전용의 `sifive,clint0`, `riscv,clint0` 조합은 deprecated입니다. SiFive CLINT와 호환되는 일반 형식은 `<vendor>,<chip>-clint` 다음에 `sifive,clint<version>`을 두며, versioning 세부 사항은 `sifive-blocks-ip-versioning.txt`를 참조합니다.
properties:
compatible:
oneOf:
- items:
- enum:
- canaan,k210-clint # Canaan Kendryte K210
- eswin,eic7700-clint # ESWIN EIC7700
- sifive,fu540-c000-clint # SiFive FU540
- spacemit,k1-clint # SpacemiT K1
- starfive,jh7100-clint # StarFive JH7100
- starfive,jh7110-clint # StarFive JH7110
- starfive,jh8100-clint # StarFive JH8100
- const: sifive,clint0 # SiFive CLINT v0 IP block
- items:
- {}
- const: sifive,clint2 # SiFive CLINT v2 IP block
description:
SiFive CLINT v2 is the HRT that supports the Zicntr. The control of sifive,clint2
differs from that of sifive,clint0, making them incompatible.
- items:
- enum:
- allwinner,sun20i-d1-clint
- sophgo,cv1800b-clint
- sophgo,cv1812h-clint
- sophgo,sg2002-clint
- thead,th1520-clint
- const: thead,c900-clint
- items:
- const: sifive,clint0
- const: riscv,clint0
deprecated: true
description: For the QEMU virt machine only
description:
Should be "<vendor>,<chip>-clint", followed by "sifive,clint<version>"
when compatible with a SiFive CLINT. Please refer to
sifive-blocks-ip-versioning.txt for details regarding the latter.
Register·extended interrupt·fine counter
65-88`reg`는 최대 한 영역입니다. `interrupts-extended`는 최소 1개, 최대 4095개 항목으로 각 HART의 local interrupt controller와 CLINT interrupt 선의 관계를 기술합니다. `sifive,fine-ctr-bits`는 fine counter의 bit width이며 최댓값은 15입니다.
`compatible`에 `sifive,clint2`가 포함되면 `sifive,fine-ctr-bits`가 필수입니다. 그 밖의 구현에서는 이 속성을 허용하지 않습니다. 정의되지 않은 추가 속성도 허용하지 않습니다.
reg:
maxItems: 1
interrupts-extended:
minItems: 1
maxItems: 4095
sifive,fine-ctr-bits:
maximum: 15
description: The width in bits of the fine counter.
if:
properties:
compatible:
contains:
const: sifive,clint2
then:
required:
- sifive,fine-ctr-bits
else:
properties:
sifive,fine-ctr-bits: false
additionalProperties: false
FU540의 HART별 software·timer interrupt
89-105`compatible`, `reg`, `interrupts-extended`가 필수입니다. 예제 `timer@2000000`은 `sifive,fu540-c000-clint`, `sifive,clint0` compatible과 0x10000-byte register 영역을 사용합니다. CPU1부터 CPU4까지 각 local interrupt controller에 interrupt 3과 7을 한 쌍씩 연결합니다. RISC-V에서 이 값은 각각 machine software interrupt와 machine timer interrupt를 나타냅니다.
required:
- compatible
- reg
- interrupts-extended
examples:
- |
timer@2000000 {
compatible = "sifive,fu540-c000-clint", "sifive,clint0";
interrupts-extended = <&cpu1intc 3>, <&cpu1intc 7>,
<&cpu2intc 3>, <&cpu2intc 7>,
<&cpu3intc 3>, <&cpu3intc 7>,
<&cpu4intc 3>, <&cpu4intc 7>;
reg = <0x2000000 0x10000>;
};
...
요약과 해설
sifive,clint.yaml:1-105SiFive CLINT의 HART별 interrupt 연결과 v0·v2 조건을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 compatible, interrupt, clock, register, phandle, 수치와 줄 좌표를 원형대로 보존합니다.