readme.eeprom
来自「linux for amd development lx8」· EEPROM 代码 · 共 28 行
EEPROM
28 行
This details the interface for the /dev/eeprom device exposed by thegeodeaes module./dev/eeprom (char 10,157) is a full featured read/write device. Up to232 bytes of storage may be available to the user. To read or write fromthe eeprom standard storage, use it like you would any other device file.For example: fd = open("/dev/eeprom", O_RDWR); lseek(fd, 0, SEEK_SET); write(fd, "Hello EEPROM!", 13); lseek(fd, 128, SEEK_SET); read(fd, buffer, sizeof(buffer)); printf("The eeprom says: %s\n", buffer); close(fd);In addition, the EEPROM has a hidden key storage and permissionsthat can be set or read via ioctl() calls:EIOSKEYOFF - Disable the usage of the hardware key till rebootEIOSLOKUP - Lock the upper range of bytes (96-232) (this is permanent!)EIOSLOKLW - Lock the lower range of bytes (0 - 96) and the key storage this is permanentEIOSKEY - Set the key in the hidden storageEIOGPERMS - Query the permissions on the sections
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?