sram_drv.4

NAME
sram - simple device driver for on-board Static RAM

DESCRIPTION
The sram_drv driver is a simple device driver which can be used to access the on-board Static RAM (SRAM).
The device node has the major number of 32 and minor number 0.

FUNCTIONS
The sram driver supports the following driver calls:
open()
Open the device
Error codes:
EPERM - You don't have sufficient permissions to open the device. (You have to be the superuser to use the SRAM driver).
close()
Error codes:
none
read()
When reading beyond the SRAM memory no error will be returned. Instead, the number of bytes returned will be adjusted to the physical size of the installed SRAM.
Error codes:
EFAULT - buffer supplied is outside of accessible address space.
write()
When writing beyond the SRAM memory no error will be returned. Instead, the number of bytes wrote and returned by the call will be adjusted to the physical size of the installed SRAM.
Error codes:
EFAULT - buffer supplied is outside of accessible address space.
mmap()
Map the SRAM area into the address space of the user process.
Error codes:
EINVAL - made attemp to remap more SRAM memory than exists physically.
EAGAIN - attemp to remap required SRAM physical memory failed.
ioctl()
The ioctl() is not supported by the sram_drv driver. On any attempt to issue a non-standard (not one of FIOCLEX, FIONCLEX or FIONBIO) IOCTL command, (-1) will be returned with errno set to ENOTTY.