mem(7)


mem, kmem -- core memory

Description

dynamic_add_memory- driver call for adding dynamic memory

The mem driver manages both physical memory and kernel virtual memory, and provides the driver entry point for adding dynamic memory.

The file /dev/mem is a special file that is an image of the core memory of the computer. For example, it may be used to examine and patch the system.

Byte addresses in /dev/mem are interpreted as memory addresses. References to non-existent locations may cause errors to be returned.

Examining and patching device registers is likely to lead to unexpected results when read-only or write-only bits are present.

The file /dev/kmem is the same as /dev/mem except that kernel virtual memory rather than physical memory is accessed.

Driver Usage

Detecting the dynamic addition of memory on a running system is the responsibility of the hardware and the device driver. Device drivers that provide the ability to dynamically add memory to the system call the following function at the base level, with no locks held, to perform the necessary initializations for the memory range specified:
   int dynamic_add_memory(paddr64_t base, memsize_t size, uint_t flags)

base
Base address of the memory (64-bit value).

size
Size of the memory (64-bit value).

flags
Not currently used; must be set to ``0''.

If successful, this function initializes the memory as dedicated or general purpose memory; see ``Adding memory (dynamically addable memory)'' in Adding Memory (Dynamically Addable Memory). This function can return the following errors:


E2BIG
Memory is out of range.

EINVAL
The memory range specified is not a multiple of 32MB.

EINVAL
Some part of the specified memory range is already present in the system.

Files

/dev/mem
/dev/kmem

Notices

Some of /dev/kmem cannot be read because of write-only addresses or unequipped memory addresses.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004