← Documents Documentation/ABI/testing/sysfs-firmware-efi-runtime-map GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

EFI runtime mapping sysfs ABI

EFI runtime services의 physical-to-virtual memory mappings를 kexec kernel에 동일하게 전달하는 numbered sysfs layout입니다.

Source pathDocumentation/ABI/testing/sysfs-firmware-efi-runtime-map
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

One-time virtual-mode mapping handoff

sysfs-firmware-efi-runtime-map:1-36

Runtime virtual-mode switch는 reboot 없이 한 번만 가능하므로 userspace가 첫 kernel의 다섯-field mappings를 복원해 kexec kernel에 전달합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/firmware/efi/runtime-map/
2 Date: December 2013
3 Contact: Dave Young <[email protected]>
4 Description: Switching efi runtime services to virtual mode requires
5 that all efi memory ranges which have the runtime attribute
6 bit set to be mapped to virtual addresses.
7
8 The efi runtime services can only be switched to virtual
9 mode once without rebooting. The kexec kernel must maintain
10 the same physical to virtual address mappings as the first
11 kernel. The mappings are exported to sysfs so userspace tools
12 can reassemble them and pass them into the kexec kernel.
13
14 /sys/firmware/efi/runtime-map/ is the directory the kernel
15 exports that information in.
16
17 subdirectories are named with the number of the memory range::
18
19 /sys/firmware/efi/runtime-map/0
20 /sys/firmware/efi/runtime-map/1
21 /sys/firmware/efi/runtime-map/2
22 /sys/firmware/efi/runtime-map/3
23 ...
24
25 Each subdirectory contains five files:
26
27 ========= =========================================
28 attribute The attributes of the memory range.
29 num_pages The size of the memory range in pages.
30 phys_addr The physical address of the memory range.
31 type The type of the memory range.
32 virt_addr The virtual address of the memory range.
33 ========= =========================================
34
35 Above values are all hexadecimal numbers with the '0x' prefix.
36 Users: Kexec
37

3. 한국어 전문 번역

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

EFI runtime physical-to-virtual mappings

1-36
항목한국어 전문 번역
What/sys/firmware/efi/runtime-map/
Date2013년 12월
ContactDave Young <[email protected]>
DescriptionEFI runtime services를 virtual mode로 전환하려면 runtime attribute bit가 설정된 모든 EFI memory ranges를 virtual addresses에 mapping해야 합니다. Reboot 없이 virtual mode로 전환할 수 있는 횟수는 한 번뿐이므로 kexec kernel은 첫 kernel과 같은 physical-to-virtual address mappings를 유지해야 합니다. Kernel은 userspace tools가 mappings를 다시 조립해 kexec kernel에 전달할 수 있도록 `/sys/firmware/efi/runtime-map/`에 정보를 export합니다. Subdirectories는 memory range 번호인 `0`, `1`, `2`, `3` 등으로 이름을 붙입니다. 각 directory에는 `attribute`, `num_pages`, `phys_addr`, `type`, `virt_addr` 다섯 files가 있으며 모든 값은 `0x` prefix를 붙인 hexadecimal numbers입니다.
UsersKexec
EFI runtime mapping handoff
First kernel switches EFI runtime services to virtual modeKernel exports each physical-to-virtual mapping in sysfsUserspace reassembles the mappingsKexec kernel receives and preserves the same mappings

첫 kernel의 mapping을 kexec kernel에 동일하게 전달하는 과정입니다.

EFI runtime-map files
FileMeaning
attributeMemory range attributes
num_pagesMemory range size in pages
phys_addrPhysical address
typeMemory range type
virt_addrVirtual address

각 numbered memory-range directory의 다섯 hexadecimal fields입니다.