요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
1
What: /dev/wmi/dell-smbios
2
Date: November 2017
3
KernelVersion: 4.15
4
Contact: [email protected]
5
Description:
6
Perform SMBIOS calls on supported Dell machines.
7
through the Dell ACPI-WMI interface.
9
IOCTL's and buffer formats are defined in:
10
<uapi/linux/wmi.h>
12
1) To perform an SMBIOS call from userspace, you'll need to
13
first determine the minimum size of the calling interface
14
buffer for your machine.
15
Platforms that contain larger buffers can return larger
16
objects from the system firmware.
17
Commonly this size is either 4k or 32k.
19
To determine the size of the buffer read() a u64 dword from
20
the WMI character device /dev/wmi/dell-smbios.
22
2) After you've determined the minimum size of the calling
23
interface buffer, you can allocate a structure that represents
24
the structure documented above.
26
3) In the 'length' object store the size of the buffer you
27
determined above and allocated.
29
4) In this buffer object, prepare as necessary for the SMBIOS
30
call you're interested in. Typically SMBIOS buffers have
31
"class", "select", and "input" defined to values that coincide
32
with the data you are interested in.
33
Documenting class/select/input values is outside of the scope
34
of this documentation. Check with the libsmbios project for
35
further documentation on these values.
37
6) Run the call by using ioctl() as described in the header.
39
7) The output will be returned in the buffer object.
41
8) Be sure to free up your allocated object.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Dell ACPI-WMI SMBIOS call
1-41| 항목 | 내용 |
|---|---|
| What | /dev/wmi/dell-smbios |
| Date | 2017년 11월 |
| KernelVersion | 4.15 |
| Contact | [email protected] |
| Description | 지원되는 Dell machine에서 Dell ACPI-WMI interface를 통해 SMBIOS call을 수행합니다. |
| IOCTL·buffer definition | <uapi/linux/wmi.h> |
| 원문 단계 | 전문 번역 |
|---|---|
| 1 | Userspace에서 SMBIOS call을 수행하려면 먼저 machine의 calling interface buffer 최소 크기를 알아내야 합니다. 더 큰 buffer를 가진 platform은 system firmware에서 더 큰 object를 반환할 수 있습니다. 이 크기는 보통 4k 또는 32k입니다. Buffer 크기를 알아내려면 WMI character device /dev/wmi/dell-smbios에서 u64 dword를 read()합니다. |
| 2 | Calling interface buffer의 최소 크기를 알아낸 뒤에는 위에서 문서화한 structure를 나타내는 구조체를 할당할 수 있습니다. |
| 3 | length object에는 위에서 알아내고 할당한 buffer의 크기를 저장합니다. |
| 4 | 이 buffer object를 관심 있는 SMBIOS call에 필요한 대로 준비합니다. 일반적인 SMBIOS buffer는 관심 data와 일치하는 값으로 class, select, input을 정의합니다. Class/select/input 값의 문서화는 이 문서 범위를 벗어납니다. 이 값에 관한 추가 문서는 libsmbios project에서 확인하십시오. |
| 6 | Header에 설명된 대로 ioctl()을 사용해 call을 실행합니다. |
| 7 | Output은 buffer object에 반환됩니다. |
| 8 | 할당한 object를 반드시 해제합니다. |
원문 단계 번호는 4 다음에 6으로 이어지며, 이를 그대로 보존했습니다.
read() u64 dword from /dev/wmi/dell-smbios→Minimum buffer size, commonly 4k or 32k→Allocate calling structure→Store size in length
Prepare class, select, input→ioctl() defined by uapi/linux/wmi.h→Firmware output in buffer object→Free allocated object
Machine별 buffer 크기를 먼저 확인한 뒤 같은 calling object를 준비·호출·결과 회수·해제까지 사용한다.
Userspace Dell SMBIOS call 절차
dell-smbios-wmi:1-41먼저 character device에서 machine별 최소 calling-interface buffer size를 읽고 구조체를 할당합니다. length와 SMBIOS class·select·input을 채운 뒤 uapi/linux/wmi.h의 ioctl을 실행해 같은 buffer에서 결과를 받고 메모리를 해제합니다.