extmem(7) DEVICE DRIVERS AND I/O INTERFACES extmem(7)
NAME
extmem - reserved memory (resmem) and external memory
(extmem) driver
SYNOPSIS
none
DESCRIPTION
The extmem driver module supports both the reserved main
memory (resmem) and reserved external (VME) memory (extmem)
functionality. One reserved memory device is supported on
each port or memory physically present on the system. Up to
sixteen external memory devices are supported. (More exter-
nal memory devices, up to the maximum that can be physically
supported, can be added if necessary. Contact your Con-
current sales/service representative.) The driver allows
applications to mmap(2) ranges of reserved memory or exter-
nal memory boards into the program's virtual address space.
The driver also supports character and block mode read and
write, so a reserved memory or external memory device can be
used as a "ram disk" by performing a mkfs(1m) on the device
and then mounting it onto a file system mount point.
To utilize the extmem driver features, the driver must be
correctly configured into a kernel and the necessary device
special files, also called "device nodes," must be made in
the /dev directory.
resmem
The resmem support is configured into the kernel by confi-
guring the "dummy memory" device in the extmem System(4)
file- /etc/conf/sdevice.d/extmem- and then setting the
reserved memory size tuneable parameters to the amount of
reserved memory required for each memory/port on the system.
The "dummy memory" device is configured, by default, in the
kernel as delivered. See the comments in
/etc/conf/sdevice.d/extmem.
The reserved memory tuneable parameters are set using the
idtune(1M) command. To modify a reserved memory tuneable
parameter, use the following:
/etc/conf/bin/idtune -f RESMEMn <size in bytes>
Where n = 0, 1, 2, or 3 for ports 0 through 3, respec-
tively. You must be root to run idtune(1M).
The memory size specified will be subtracted from the system
memory available to the kernel for normal usage for the port
indicated. The size must be in specified in bytes, for
example, 1048576 for 1 megabyte. The current values of
these parameters can be examined using the -g option of the
MAX/OS 1
extmem(7) DEVICE DRIVERS AND I/O INTERFACES extmem(7)
idtune(1M) command. The defaults, as delivered, are zero
for all ports.
To reconfigure the kernel, use the idbuild(1M) command with
no arguments, then reboot the system using the "shutdown
-i6" command. Refer to the idbuild(1M) man page for more
information on how to rebuild the kernel with the new confi-
guration.
A device special file for a reserved memory device must be
created with the mkdevnod(1M) or mknod(1M) command.
mkdevnod(1M) allows you to specify a major number by name,
rather than by number, as mknod(1M) requires. The minor
numbers for a resmem device corresponds to the CPU port
number on which the memory is to be reserved. For example,
reserved memory on port zero requires a minor device number
zero for the extmem driver. To create the device special
file /dev/resmem0, type:
mkdevnod resmem0 c extmem 0
mkdevnod(1M) converts the device name (extmem) to its major
number, and executes mknod(1M). You can use the -n (no exe-
cute) option with the mkdevnod(1M) command to display the
mknod command that will be executed.
extmem
The extmem support is configured into the kernel by adding a
line to the extmem System(4) file for each VME external
memory board that is to be accessed. Note that the dummy
memory MUST be configured when using the extmem driver with
external memories, even if the resmem feature of the driver
is not being used.
In the System(4) file, the dev field should be set to
extmem, config should be set to Y, the BUSID field should
indicate which VBA the board resides on (that is, VBA1 or
VBA2), the SCMA field should contain the starting offset
into the external memory board, the CMAS field should indi-
cate the board's address space (that is, A16, A24, or A32),
and the LCMR field should contain the size in bytes, kilo-
bytes or megabytes of the board. The ETC field should con-
tain the transfer sizes supported by this device as a slave.
Legal values are IOMVMED64, IOMVMED32, IOMVMED16, and
IOMVMED08. For example, a slave supporting D32 and D16
transfers would have the value IOMVMED32|IOMVMED16 in
the ETC field. All other fields should be zero. The
delivered extmem System(4) file contains several unconfig-
ured (config = N) example configuration lines. One or more
of these example lines can be configured to suit the needs
of a particular configuration.
MAX/OS 2
extmem(7) DEVICE DRIVERS AND I/O INTERFACES extmem(7)
After editing the System(4) file, the kernel must be recon-
figured using the idbuild(1M) command and rebooted for the
changes to take effect. Refer to the idbuild(1M) man page
for more information.
A device special file for an external memory device must be
created with the mkdevnod(1M) or mknod(1M) command.
mkdevnod(1M) allows you to specify a major number by name,
rather than by number, as mknod(1M) requires. The minor
numbers for extmem devices start at 256 for the first exter-
nal memory specified in the System(4) file, 257 for the
second, 258 the third, and so on. For example, to create
the device special file /dev/extmem0, type:
mkdevnod extmem0 c extmem 256
mkdevnod(1M) converts the device name (extmem) to its major
number, and executes mknod(1M). You can use the -n (no exe-
cute) option with the mkdevnod(1M) command to display the
mknod command that will be executed.
Files
/usr/include/extmem.h
/etc/conf/mdevice.d/extmem
/etc/conf/sdevice.d/extmem
/etc/conf/pack.d/extmem/space.c
REFERENCES
idbuild(1M), idtune(1M), mkdevnod(1M), mkfs(1M), mknod(1M),
shutdown(1M), System(4)
NOTICES
The MAX/OS operating system may panic with a VME buffered
write error if an attempt is made to write to an external
memory that is configured, but not physically present in the
system.
Modified in MAX/OS 1.2.
MAX/OS 3