요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
BMIPS DeviceTree Booting
------------------------
Some bootloaders only support a single entry point, at the start of the
kernel image. Other bootloaders will jump to the ELF start address.
Both schemes are supported; CONFIG_BOOT_RAW=y and CONFIG_NO_EXCEPT_FILL=y,
so the first instruction immediately jumps to kernel_entry().
Similar to the arch/arm case (b), a DT-aware bootloader is expected to
set up the following registers:
a0 : 0
a1 : 0xffffffff
a2 : Physical pointer to the device tree block (defined in chapter
II) in RAM. The device tree can be located anywhere in the first
512MB of the physical address space (0x00000000 - 0x1fffffff),
aligned on a 64 bit boundary.
Legacy bootloaders do not use this convention, and they do not pass in a
DT block. In this case, Linux will look for a builtin DTB, selected via
CONFIG_DT_*.
This convention is defined for 32-bit systems only, as there are not
currently any 64-bit BMIPS implementations.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
BMIPS kernel entry 방식
1-10SPDX-License-Identifier는 GPL-2.0입니다. BMIPS bootloader 중 일부는 kernel image 시작의 단일 entry point만 지원하고, 다른 bootloader는 ELF start address로 jump합니다.
두 방식을 함께 지원하기 위해 `CONFIG_BOOT_RAW=y`와 `CONFIG_NO_EXCEPT_FILL=y`를 사용하며 첫 instruction이 즉시 `kernel_entry()`로 jump합니다.
Device tree register convention
11-28ARM boot convention의 case (b)와 비슷하게 DT-aware bootloader는 다음 register를 설정합니다.
| Register | 값과 의미 |
|---|---|
| `a0` | `0` |
| `a1` | `0xffffffff` |
| `a2` | RAM 안 device-tree block의 physical pointer. Physical address 첫 512 MiB (`0x00000000-0x1fffffff`) 어디든 가능하며 64-bit boundary 정렬 |
Legacy bootloader는 이 convention과 DT block을 사용하지 않습니다. 이 경우 Linux는 `CONFIG_DT_*`로 선택된 built-in DTB를 찾습니다.
현재 64-bit BMIPS 구현이 없으므로 이 convention은 32-bit system에만 정의됩니다.
요약과 해설
booting.rst:1-28BMIPS는 raw image start와 ELF entry를 모두 수용하며, DT-aware bootloader는 `a0-a2` contract로 physical DTB를 넘깁니다. Legacy loader는 built-in DTB fallback을 사용합니다.
Bootloader 종류에 따라 entry와 DTB 전달 경로가 갈립니다.