← Documents Documentation/arch/powerpc/elfnote.rst GitHub 원문 ↗

Linux 6.18.37 · Architecture

ELF Note PowerPC Namespace

Kernel ELF Note의 Ultravisor capability bit와 bootloader compatibility 검사를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

elfnote.rst:1-41

`PPCCAP_ULTRAVISOR_BIT`는 kernel이 ultravisor resource model을 이해함을 표시합니다. Bootloader는 bit가 없는 kernel의 실행을 막아 early-boot crash를 예방할 수 있습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 ==========================
2 ELF Note PowerPC Namespace
3 ==========================
4
5 The PowerPC namespace in an ELF Note of the kernel binary is used to store
6 capabilities and information which can be used by a bootloader or userland.
7
8 Types and Descriptors
9 ---------------------
10
11 The types to be used with the "PowerPC" namespace are defined in [#f1]_.
12
13 1) PPC_ELFNOTE_CAPABILITIES
14
15 Define the capabilities supported/required by the kernel. This type uses a
16 bitmap as "descriptor" field. Each bit is described below:
17
18 - Ultravisor-capable bit (PowerNV only).
19
20 .. code-block:: c
21
22 #define PPCCAP_ULTRAVISOR_BIT (1 << 0)
23
24 Indicate that the powerpc kernel binary knows how to run in an
25 ultravisor-enabled system.
26
27 In an ultravisor-enabled system, some machine resources are now controlled
28 by the ultravisor. If the kernel is not ultravisor-capable, but it ends up
29 being run on a machine with ultravisor, the kernel will probably crash
30 trying to access ultravisor resources. For instance, it may crash in early
31 boot trying to set the partition table entry 0.
32
33 In an ultravisor-enabled system, a bootloader could warn the user or prevent
34 the kernel from being run if the PowerPC ultravisor capability doesn't exist
35 or the Ultravisor-capable bit is not set.
36
37 References
38 ----------
39
40 .. [#f1] arch/powerpc/include/asm/elfnote.h
41
42

3. 한국어 전문 번역

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

ELF Note PowerPC Namespace

1-12

Kernel binary의 ELF Note에 있는 `PowerPC` namespace는 bootloader나 userland가 사용할 capability와 정보를 저장합니다. 이 namespace에서 쓸 type은 `arch/powerpc/include/asm/elfnote.h`에 정의됩니다.

`PPC_ELFNOTE_CAPABILITIES` descriptor

13-25

`PPC_ELFNOTE_CAPABILITIES`는 kernel이 지원하거나 요구하는 capability를 정의하며 descriptor field로 bitmap을 사용합니다. Bit 0은 PowerNV 전용 Ultravisor-capable bit입니다.

#define PPCCAP_ULTRAVISOR_BIT (1 << 0)

이 bit는 PowerPC kernel binary가 ultravisor-enabled system에서 실행하는 방법을 알고 있음을 나타냅니다.

Ultravisor compatibility 검사

26-35

Ultravisor-enabled system에서는 일부 machine resource를 ultravisor가 제어합니다. Kernel이 ultravisor-capable이 아닌데 그런 machine에서 실행되면 resource access 중 crash할 가능성이 큽니다. 예를 들어 early boot에서 partition table entry 0을 설정하다 crash할 수 있습니다.

Bootloader는 PowerPC ultravisor capability가 없거나 Ultravisor-capable bit가 set되지 않았으면 user에게 경고하거나 kernel 실행을 막을 수 있습니다.

Bootloader의 Ultravisor compatibility gate
Ultravisor-enabled machineRead PowerPC ELF Note`PPCCAP_ULTRAVISOR_BIT` setKernel 실행
Bit absent경고 또는 boot 차단

ELF Note bit가 incompatible kernel의 early-boot crash를 예방합니다.

Reference

36-41

PowerPC namespace type과 capability bit의 source definition은 `arch/powerpc/include/asm/elfnote.h`입니다.