요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Raw NVMEM과 device type
sysfs-bus-nvmem:18-50CONFIG_NVMEM_SYSFS가 켜진 경우 raw byte content와 NVMEM provider type을 sysfs에 노출합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/nvmem/devices/.../force_ro
Date: June 2024
KernelVersion: 6.11
Contact: Marek Vasut <[email protected]>
Description:
This read/write attribute allows users to set read-write
devices as read-only and back to read-write from userspace.
This can be used to unlock and relock write-protection of
devices which are generally locked, except during sporadic
programming operation.
Read returns '0' or '1' for read-write or read-only modes
respectively.
Write parses one of 'YyTt1NnFf0', or [oO][NnFf] for "on"
and "off", i.e. what kstrtobool() supports.
Note: This file is only present if CONFIG_NVMEM_SYSFS
is enabled.
What: /sys/bus/nvmem/devices/.../nvmem
Date: July 2015
KernelVersion: 4.2
Contact: Srinivas Kandagatla <[email protected]>
Description:
This file allows user to read/write the raw NVMEM contents.
Permissions for write to this file depends on the nvmem
provider configuration.
Note: This file is only present if CONFIG_NVMEM_SYSFS
is enabled
ex::
hexdump /sys/bus/nvmem/devices/qfprom0/nvmem
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
00000a0 db10 2240 0000 e000 0c00 0c00 0000 0c00
0000000 0000 0000 0000 0000 0000 0000 0000 0000
...
*
0001000
What: /sys/bus/nvmem/devices/.../type
Date: November 2018
KernelVersion: 5.0
Contact: Alexandre Belloni <[email protected]>
Description:
This read-only attribute allows user to read the NVMEM
device type. Supported types are "Unknown", "EEPROM",
"OTP", "Battery backed", "FRAM".
Note: This file is only present if CONFIG_NVMEM_SYSFS
is enabled.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
NVMEM force_ro
1-16| 항목 | 값 |
|---|---|
| What | /sys/bus/nvmem/devices/.../force_ro |
| Date | 2024년 6월 |
| KernelVersion | 6.11 |
| Contact | Marek Vasut <[email protected]> |
| access | read/write |
User space에서 read/write device를 read-only로 바꾸고 다시 read/write로 되돌릴 수 있다. 평소에는 잠그고 간헐적인 programming operation 때만 여는 device의 write protection을 해제하고 다시 잠그는 데 쓸 수 있다.
읽으면 read/write mode는 0, read-only mode는 1이다. 쓰기는 kstrtobool()이 지원하는 YyTt1NnFf0 또는 [oO][NnFf], 즉 on/off 형식을 받는다. CONFIG_NVMEM_SYSFS가 활성화된 경우에만 존재한다.
Raw NVMEM content
18-39| 항목 | 값 |
|---|---|
| What | /sys/bus/nvmem/devices/.../nvmem |
| Date | 2015년 7월 |
| KernelVersion | 4.2 |
| Contact | Srinivas Kandagatla <[email protected]> |
Raw NVMEM content를 읽고 쓸 수 있다. Write permission은 nvmem provider configuration에 따라 달라진다. CONFIG_NVMEM_SYSFS가 활성화된 경우에만 존재한다.
hexdump /sys/bus/nvmem/devices/qfprom0/nvmem
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
00000a0 db10 2240 0000 e000 0c00 0c00 0000 0c00
0000000 0000 0000 0000 0000 0000 0000 0000 0000
...
*
0001000
NVMEM device type
41-50| 항목 | 값 |
|---|---|
| What | /sys/bus/nvmem/devices/.../type |
| Date | 2018년 11월 |
| KernelVersion | 5.0 |
| Contact | Alexandre Belloni <[email protected]> |
| access | read-only |
NVMEM device type을 읽는다. 지원하는 type은 Unknown, EEPROM, OTP, Battery backed, FRAM이다. CONFIG_NVMEM_SYSFS가 활성화된 경우에만 존재한다.
Write protection 제어
sysfs-bus-nvmem:1-16force_ro는 간헐적 programming 때만 잠금을 풀어야 하는 device를 read-only와 read/write 사이에서 전환합니다.