← Documents Documentation/arch/xtensa/booting.rst GitHub 원문 ↗

Linux 6.18.37 · Architecture

Passing Xtensa Boot Parameters to the Kernel

TLV boot-parameter list와 MMU 구성별 a2 address 해석 규칙을 설명합니다.

Source pathDocumentation/arch/xtensa/booting.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

booting.rst:1-22

Xtensa boot parameter는 `BP_TAG_FIRST`와 `BP_TAG_LAST`로 감싼 TLV list이며 첫 entry address를 `a2`로 전달합니다. physical·virtual 판정은 MMU generation과 `CONFIG_MMU`에 따라 달라집니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 =====================================
2 Passing boot parameters to the kernel
3 =====================================
4
5 Boot parameters are represented as a TLV list in the memory. Please see
6 arch/xtensa/include/asm/bootparam.h for definition of the bp_tag structure and
7 tag value constants. First entry in the list must have type BP_TAG_FIRST, last
8 entry must have type BP_TAG_LAST. The address of the first list entry is
9 passed to the kernel in the register a2. The address type depends on MMU type:
10
11 - For configurations without MMU, with region protection or with MPU the
12 address must be the physical address.
13 - For configurations with region translarion MMU or with MMUv3 and CONFIG_MMU=n
14 the address must be a valid address in the current mapping. The kernel will
15 not change the mapping on its own.
16 - For configurations with MMUv2 the address must be a virtual address in the
17 default virtual mapping (0xd0000000..0xffffffff).
18 - For configurations with MMUv3 and CONFIG_MMU=y the address may be either a
19 virtual or physical address. In either case it must be within the default
20 virtual mapping. It is considered physical if it is within the range of
21 physical addresses covered by the default KSEG mapping (XCHAL_KSEG_PADDR..
22 XCHAL_KSEG_PADDR + XCHAL_KSEG_SIZE), otherwise it is considered virtual.
23

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

TLV boot-parameter list

1-10

boot parameter는 memory 안의 `TLV` list로 표현합니다. `bp_tag` structure 정의와 tag-value constant는 `arch/xtensa/include/asm/bootparam.h`를 참고하십시오.

list의 첫 entry type은 `BP_TAG_FIRST`, 마지막 entry type은 `BP_TAG_LAST`여야 합니다. 첫 list entry의 address는 register `a2`로 kernel에 전달하며, address type은 MMU type에 따라 달라집니다.

MMU 구성별 address 규칙

11-22
  • MMU가 없거나 region protection 또는 MPU를 사용하는 구성에서는 physical address여야 합니다.
  • `region translation MMU` 또는 `MMUv3`와 `CONFIG_MMU=n`을 사용하는 구성에서는 현재 mapping에서 유효한 address여야 합니다. kernel은 mapping을 자체적으로 바꾸지 않습니다.
  • `MMUv2` 구성에서는 default virtual mapping `0xd0000000..0xffffffff` 안의 virtual address여야 합니다.
  • `MMUv3`와 `CONFIG_MMU=y` 구성에서는 virtual 또는 physical address를 사용할 수 있지만 어느 쪽이든 default virtual mapping 안에 있어야 합니다. default KSEG mapping이 포괄하는 `XCHAL_KSEG_PADDR..XCHAL_KSEG_PADDR + XCHAL_KSEG_SIZE` physical-address 범위 안이면 physical로, 그 밖이면 virtual로 간주합니다.