VIRTUTECH CONFIDENTIAL    Previous - Up - Next

image

Provided by
Simics Core
Class Hierarchy
conf-objectlog-objectimage
Interfaces Implemented
log_object, event_poster, image
Description
The image class provides persistent file-backed flat-address storage of devices such as physical memory and disks. Writes are fully shadowed, which allows changes to be stored in a compact way and the original images be kept unchanged. Memory page allocation is done lazily.

In an image object, one or more files represent the image data. This is done in a transparent way: page ranges not present in one file is searched in subsequent files.

Image files can be in raw format, or in compressed CRAFF format. Use the craff utility to convert between image file formats.

Attributes

Attributes inherited from class conf-object
attributes, classname, component, iface, name, object_id, queue
Attributes inherited from class log-object
access_count, log_buffer, log_buffer_last, log_buffer_size, log_group_mask, log_groups, log_level, log_type_mask
Attribute List
byte_access
Pseudo attribute; read/write access; ; integer indexed; indexed type: i|d.

Read/write access to single bytes. The attribute is indexed by an integer specifying offset, or by a slice (pair of integers) specifying range.

checksum
Pseudo attribute; read-only access; type: [i*]; integer indexed; indexed type: Integer.

Storage page checksum.

compressed_diff
Session class attribute; read/write access; type: Integer.

If set to non-zero, saved diffs and checkpoints will use compressed craff files.

dirty
Pseudo attribute; read-only access; type: Integer.

Whether there are unsaved changes not backed by any writable file

files
Optional attribute; read/write access; type: [[saii]|[saiii]|[saiiii]*]; persistent attribute.

((file, read-only, start, size[, offset])+) Specifies the files that represent the (initial) image contents. Several files may be specified and may also overlap in memory. Later files override earlier files. file is the file name of a file in CRAFF or raw format or a raw disk device. read-only is "rw" or "ro" and specifies whether changes to an image should be written back to the file or cached in memory. start is the first address in the image represented by the file. size is the number of bytes the file represents. If zero, the size is taken from the file. offset is the offset in the file where this mapping starts.
In checkpoint files generated by Simics, file may contain a path of the form %n%. Such a sequence will be replaced by the nth element of the checkpoint_path attribute in the sim object, counting from zero. By using %n% as path, all absolute paths are kept in the checkpoint_path attribute, making it easier to update a checkpoint when files that it depends on have moved.

image_snoop_device
Optional attribute; read/write access; type: Object or Nil.

Object implementing the image_snoop. Intended for internal usage only; may change without notice.

linear
Optional attribute; read/write access; type: Integer.

Set if the memory should be preallocated, resident and contiguous.

mapfile_dir
Pseudo attribute; read/write access; type: s|n.

If set, directory where to put a mappable file. Setting this causes this directory to be used to allocate mappable storage.

memory_limit
Session class attribute; read/write access; type: Integer.

Maximum number of bytes cached by all images in the system before pages are swapped to disk. This is used to reduce memory consumption. Setting this limit too high or too low will adversely affect system performance. If set to 0, the limit is disabled.

rexec_snoop_device
Pseudo attribute; read/write access; type: Object or Nil.

Object implementing the image_snoop. Used internally for reverse execution; do not use.

size
Required attribute; read/write access; type: Integer.

size in bytes the image represents

Command List

Commands defined by interface log_object
log, log-group, log-level, log-size, log-type
Commands
add-diff-fileadd a diff file to the image
add-partial-diff-fileadd a partial diff file to the image
savesave image to disk
save-diff-filesave changes since last checkpoint
setset bytes in image to specified value
xexamine image data

Command Descriptions

<image>.add-diff-file
Synopsis
<image>.add-diff-file filename
Description
Adds a diff file to the list of files for an image. The diff file was typically created with save-diff-file, or by a saved configuration. This should not be done if the image contains changed (unsaved) data.
See Also
<image>.save-diff-file
<image>.add-partial-diff-file
Synopsis
<image>.add-partial-diff-file filename start size
Description
Adds a partial diff file to the list of files for an image. The diff file was typically created with the 'save-diff-file' command, by one of the dump-*-partition commands, or by a saved configuration.
See Also
<image>.add-diff-file, <image>.save-diff-file
<image>.save
Synopsis
<image>.save filename [start-byte] [length]
Description
Writes the image binary data (in raw form) to filename. If start and/or length are given, they specify the start offset and number of bytes to write respectively; otherwise, the whole image is copied.
<image>.save-diff-file
Synopsis
<image>.save-diff-file filename
Description
Writes changes to the image since the last checkpoint to a named file in craff format.
See Also
<image>.add-diff-file, <image>.save
<image>.set
Synopsis
<image>.set address value [size] [-l] [-b]
Description
Sets size bytes in an image at offset address to value. The default size is 4 bytes, but can be anywhere between 1 and 8 inclusive.

If value is larger than the specified size, behavior is undefined.

The -l and -b flags are used to select little-endian and big-endian byte order, respectively. If neither is given, the byte order of the currently selected processor is used.

See Also
set
<image>.x
Synopsis
<image>.x offset [size]
Description
Displays length bytes starting at offset from the image.

VIRTUTECH CONFIDENTIAL    Previous - Up - Next