DCMD_F3S_LOCKSSR
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Lock a secure silicon region
Synopsis:
#include <sys/dcmd_f3s.h>
#define DCMD_F3S_LOCKSSR __DIOTF(_DCMD_F3S, F3S_LOCKSSR, uint32_t)
Arguments to devctl():
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening /dev/fs0 |
dcmd | DCMD_F3S_LOCKSSR |
dev_data_ptr | NULL, or a pointer to a uint32_t |
n_bytes | 0 or sizeof(uint32_t) |
dev_info_ptr | NULL |
Description:
This command locks a secure silicon region. You can:
- Lock the entire SSR. For this case, the data pointer should be NULL, and n_bytes should be 0.
- Lock a specific region. For this case, the data pointer should not be NULL, and n_bytes should be 1. Currently, we use 1 byte to store the number of the region.
Input:
The number of the region to lock, or NULL to lock the entire OTP area.
Output:
None.
Example:
The Spansion S25FL QSPI flash supports multiple regions in the OTP (SSR) area. Each region can be locked separately:
- Case 1: Lock the entire OTP area.
In the call to devctl(), don't specify the data pointer or size parameter:
devctl(fd, DCMD_F3S_LOCKSSR, NULL, 0, NULL);
- Case 2: Lock a specific region.
Specify the data pointer and size parameters in the call to devctl().
For example, to lock region 17:
lock = 17; devctl(fd, DCMD_F3S_LOCKSSR, &lock, 1, NULL);
See also:
DCMD_F3S_READSSR, DCMD_F3S_STATSSR, DCMD_F3S_WRITESSR
devctl() in the QNX OS C Library Reference
Page updated: