요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
==========================
ELF Note PowerPC Namespace
==========================
The PowerPC namespace in an ELF Note of the kernel binary is used to store
capabilities and information which can be used by a bootloader or userland.
Types and Descriptors
---------------------
The types to be used with the "PowerPC" namespace are defined in [#f1]_.
1) PPC_ELFNOTE_CAPABILITIES
Define the capabilities supported/required by the kernel. This type uses a
bitmap as "descriptor" field. Each bit is described below:
- Ultravisor-capable bit (PowerNV only).
.. code-block:: c
#define PPCCAP_ULTRAVISOR_BIT (1 << 0)
Indicate that the powerpc kernel binary knows how to run in an
ultravisor-enabled system.
In an ultravisor-enabled system, some machine resources are now controlled
by the ultravisor. If the kernel is not ultravisor-capable, but it ends up
being run on a machine with ultravisor, the kernel will probably crash
trying to access ultravisor resources. For instance, it may crash in early
boot trying to set the partition table entry 0.
In an ultravisor-enabled system, a bootloader could warn the user or prevent
the kernel from being run if the PowerPC ultravisor capability doesn't exist
or the Ultravisor-capable bit is not set.
References
----------
.. [#f1] arch/powerpc/include/asm/elfnote.h
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
ELF Note PowerPC Namespace
1-12Kernel 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-35Ultravisor-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 실행을 막을 수 있습니다.
ELF Note bit가 incompatible kernel의 early-boot crash를 예방합니다.
Reference
36-41PowerPC namespace type과 capability bit의 source definition은 `arch/powerpc/include/asm/elfnote.h`입니다.
요약과 해설
elfnote.rst:1-41`PPCCAP_ULTRAVISOR_BIT`는 kernel이 ultravisor resource model을 이해함을 표시합니다. Bootloader는 bit가 없는 kernel의 실행을 막아 early-boot crash를 예방할 수 있습니다.