요약·해설, 영어 원문, 전체 번역을 구분해 실었습니다. API 이름, 코드 심벌, 소스 경로는 원문 표기를 유지합니다.
1. 요약·해설
원문의 핵심 내용을 정리하고 커널 프로그래밍에 필요한 설명을 덧붙였습니다. 아래의 전체 번역과는 별도로 작성한 해설입니다.
2. 영어 원문 전체
번역에 사용한 Linux v6.18.37 원문입니다. 줄 번호는 해당 버전의 소스 파일을 기준으로 합니다.
원문 전체 펼치기
==================
C-SKY CPU Bindings
==================
The device tree allows to describe the layout of CPUs in a system through
the "cpus" node, which in turn contains a number of subnodes (ie "cpu")
defining properties for every cpu.
Only SMP system need to care about the cpus node and single processor
needn't define cpus node at all.
=====================================
cpus and cpu node bindings definition
=====================================
- cpus node
Description: Container of cpu nodes
The node name must be "cpus".
A cpus node must define the following properties:
- #address-cells
Usage: required
Value type: <u32>
Definition: must be set to 1
- #size-cells
Usage: required
Value type: <u32>
Definition: must be set to 0
- cpu node
Description: Describes one of SMP cores
PROPERTIES
- device_type
Usage: required
Value type: <string>
Definition: must be "cpu"
- reg
Usage: required
Value type: <u32>
Definition: CPU index
- compatible:
Usage: required
Value type: <string>
Definition: must contain "csky", eg:
"csky,610"
"csky,807"
"csky,810"
"csky,860"
Example:
--------
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
device_type = "cpu";
reg = <0>;
status = "ok";
};
cpu@1 {
device_type = "cpu";
reg = <1>;
status = "ok";
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미에 맞춰 전체 내용을 번역했습니다. 코드, 함수명, 코드 심벌, URL은 원문 표기를 유지합니다.
C-SKY CPU topology
1-15C-SKY CPU 바인딩입니다. Device tree의 `cpus` node 아래 `cpu` subnode를 두어 system CPU layout과 각 CPU 속성을 기술합니다.
SMP system만 `cpus` node를 정의해야 하며 single-processor system은 이를 생략할 수 있습니다.
SMP topology는 하나의 container와 CPU index별 child로 표현합니다.
cpus 및 cpu node 속성
16-55`cpus` container의 node 이름은 반드시 `cpus`입니다. 필수 u32 `#address-cells`는 1, `#size-cells`는 0입니다.
각 `cpu` node는 SMP core 하나를 나타냅니다. 필수 string `device_type`은 `cpu`, 필수 u32 `reg`는 CPU index입니다.
필수 string `compatible`에는 `csky`를 포함해야 하며 예시는 `csky,610`, `csky,807`, `csky,810`, `csky,860`입니다.
2-core C-SKY SMP 예제
56-73예제는 address-cell 1, size-cell 0인 `cpus` container 아래 CPU index 0과 1을 두고 두 core의 status를 `ok`로 설정합니다.
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
device_type = "cpu";
reg = <0>;
status = "ok";
};
cpu@1 {
device_type = "cpu";
reg = <1>;
status = "ok";
};
};
요약과 해설
cpus.txt:1-73cpus container와 core별 필수 속성을 설명합니다.