요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
1
What: /sys/kernel/debug/olpc-ec/cmd
2
Date: Dec 2011
3
KernelVersion: 3.4
4
Contact: devel@lists.laptop.org
5
Description:
7
A generic interface for executing OLPC Embedded Controller commands and
8
reading their responses.
10
To execute a command, write data with the format: CC:N A A A A
11
CC is the (hex) command, N is the count of expected reply bytes, and A A A A
12
are optional (hex) arguments.
14
To read the response (if any), read from the generic node after executing
15
a command. Hex reply bytes will be returned, *whether or not* they came from
16
the immediately previous command.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
OLPC EC command 실행과 응답
1-16| 항목 | 내용 |
|---|---|
| What | /sys/kernel/debug/olpc-ec/cmd |
| Date | 2011년 12월 |
| KernelVersion | 3.4 |
| Contact | devel@lists.laptop.org |
| Description | OLPC Embedded Controller command를 실행하고 그 응답을 읽기 위한 generic interface입니다. |
Command를 실행하려면 다음 형식으로 data를 씁니다.
CC:N A A A A
| Field | 의미 |
|---|---|
| CC | Hexadecimal command |
| N | 예상하는 reply byte 수 |
| A A A A | 선택적인 hexadecimal arguments |
응답이 있다면 command를 실행한 뒤 generic node에서 읽습니다. Hexadecimal reply bytes가 반환되지만, 그 bytes가 즉시 직전에 실행한 command에서 왔는지 여부와는 무관합니다.
Write CC:N plus optional A bytes→Execute EC command CC→Expect N reply bytes→Read hexadecimal response
Returned reply bytes→May or may not belong to immediately previous command→Caller must not assume strict pairing
Write는 command와 예상 reply 길이를 전달하지만, 뒤따르는 read 결과를 직전 command의 응답이라고 단정할 수 없다.
EC command framing과 response read
debugfs-olpc:1-16cmd node는 hex command CC, 예상 reply byte 수 N, 선택적 hex arguments A를 받아 실행합니다. 이후 읽은 reply는 즉시 직전 command에서 온 응답이 아닐 수도 있습니다.