요약·해설과 원문, 전문 번역을 서로 분리했습니다. 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/virtio/virtio-device.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Virtio device
maintainers:
- Viresh Kumar <viresh.kumar@linaro.org>
description:
These bindings are applicable to virtio devices irrespective of the bus they
are bound to, like mmio or pci.
# We need a select here so we don't match all nodes with 'virtio,mmio'
properties:
compatible:
pattern: "^virtio,device[0-9a-f]{1,8}$"
description: Virtio device nodes.
"virtio,deviceID", where ID is the virtio device id. The textual
representation of ID shall be in lower case hexadecimal with leading
zeroes suppressed.
required:
- compatible
additionalProperties: true
examples:
- |
virtio@3000 {
compatible = "virtio,mmio";
reg = <0x3000 0x100>;
interrupts = <43>;
i2c {
compatible = "virtio,device22";
};
};
...
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Bus-independent Virtio device
1-15GPL-2.0-only 또는 BSD-2-Clause로 배포되는 이 binding은 MMIO나 PCI처럼 연결 bus와 관계없이 모든 Virtio device에 적용됩니다. 관리자는 Viresh Kumar입니다.
Virtio device ID compatible
16-29모든 `virtio,mmio` node와 잘못 일치하지 않도록 명시적 selector가 필요합니다. child device의 compatible은 `virtio,deviceID` 형식이며 ID는 Virtio device ID입니다.
ID의 문자열 표현은 선행 zero를 제거한 1~8자리 소문자 hexadecimal이어야 합니다. compatible은 필수이고 device별 추가 속성은 허용합니다.
# We need a select here so we don't match all nodes with 'virtio,mmio'
properties:
compatible:
pattern: "^virtio,device[0-9a-f]{1,8}$"
description: Virtio device nodes.
"virtio,deviceID", where ID is the virtio device id. The textual
representation of ID shall be in lower case hexadecimal with leading
zeroes suppressed.
required:
- compatible
additionalProperties: true
Virtio MMIO의 I2C child 예제
30-41예제 MMIO transport node 안의 I2C Virtio child는 `compatible = "virtio,device22"`를 사용해 device ID 0x22를 나타냅니다.
examples:
- |
virtio@3000 {
compatible = "virtio,mmio";
reg = <0x3000 0x100>;
interrupts = <43>;
i2c {
compatible = "virtio,device22";
};
};
...
요약과 해설
virtio-device.yaml:1-41Bus와 독립적인 Virtio child device compatible과 device ID 형식을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, property, PCI BDF·RID, phandle, example, source path와 원문 줄 좌표를 원형대로 보존합니다.