5.7.13 Memory objects

Describes the following objects:

MemoryAddressTranslationResult

MemoryAddressTranslationResult members:

address

Type: NumberU64[]

List of addresses in memory space outSpaceId that correspond to address in spaceId. If this array is empty then address is not mapped in outSpaceId. If the array contains exactly one element then the mapping is unique. If it contains multiple addresses then address is accessible in the same way under all of these addresses in outSpaceId.

MemoryReadResult

MemoryReadResult members:

data

Type: NumberU64[]

Data elements read from ascending addresses, packed into NumberU64 types such that the lowest address is in the lowest bits:

byteWidth=1
8 bytes per NumberU64, lowest address in bits[7:0].
byteWidth=2
4 x 16-bit values per NumberU64, lowest address in bits[15:0].
byteWidth=4
2 x 32-bit values per NumberU64, lowest address in bits[31:0].
byteWidth=8
1 NumberU64 per address.
byteWidth=16
2 NumberU64 per address, lowest bits in the first one.
byteWidth=N
N/8 NumberU64 per address, lowest bits in the first one. Elements of byteWidth >= 2 are read with the endianness of the memory space inside each element, but elements are stored without endianness inside each NumberU64 (for byteWidth < 8) and with the lowest bits first in sequences of NumberU64 (for byteWidth > 8). Elements that could not be read have a value of zero and their address is recorded in the error array. Padding bytes (unused high bits) are always zero. Array length is always exactly N = floor((byteWidth*count+7) / 8) NumberU64 elements (N is always >= 1).
error

Type: NumberU64[]

Optional. List of addresses and E_* error codes for memory locations that could not be read. Each entry in the list occupies two array elements: address and then errorCode. This only returns errors that happen because the callee is unable to provide the memory value, for example architectural errors. This does not return errors that are caused by the caller doing something wrong, for example E_unknown_memory_space_id. These errors are returned by memory_write() instead. The errors that are most likely to occur in this list are:

E_memory_abort
The memory value could not be read because the memory operation was aborted by the memory subsystem. A load instruction from this address would have also failed. The corresponding bits in data must be ignored.
E_approximation
The memory value could be read but is only an approximation, for example because one of the instances is not in a debuggable-state. A load instruction from this address would have succeeded.
E_value_not_available
The memory value is currently not available and cannot even be approximated. A load instruction from this address would have succeeded. This can happen for example when an instance is not in a debuggable-state and a TLB entry is updated half-way. Addresses that failed with an error might or might not have been updated. Addresses that did not fail with an error also might or might not have been updated (for example, a read-only register that silently ignores writes, ROM).

MemorySpaceInfo

MemorySpaceInfo members:

attrib

Type: Map[String]AttributeInfo

Optional. Attributes of this memory space. Object that maps attribute names onto AttributeInfo objects, which contain their type and description. The attribute names are the same as used for the attrib argument of memory_read() and memory_write(). It is valid for a memory space and instance not to define any attributes, in which case this member might be missing. The actual set of attributes and their semantics are described in the documentation of the target instance.

attribDefaults

Type: Map[String]Value

Optional. Object that maps attribute names in this memory space to their default values. The type of the default value must be valid for memory_read() and memory_write() and must be consistent with the type advertised in attrib.

Some memory spaces use dynamic values for some or all attributes, for example attributes derived from the current state of a CPU. Attributes that are taken from the current dynamic state are missing in attribDefaults. Thus an empty or missing attribDefaults object indicates that all attributes are dynamic.

The value of attribDefaults can be passed directly into the attrib argument of memory_read() and memory_write(). Doing so has the same effect as specifying no attrib argument or an empty attrib object, because this overrides the defaults with the defaults.

canonicalMsn

Type: NumberU64

Optional. Canonical memory space number. This number adheres to the scheme described by the memory.canonicalMsnScheme member returned by instance_getProperties().

description

Type: String

Optional. Description of the memory space. Might contain linefeeds.

endianness

Type: String

Optional. Hint for clients about which endianness to use to interpret wider-than-byte memory values. Possible values:

little
Little-endian format (default when endianness is not present).
big
Big-endian format (also sometimes called "byte invariant big endian format").
be32
big-endian word invariant endianness
variable
The endianness can change at runtime. The client determines the current endianness by other means if it can, for example by reading a register.
none
The memory space does not define any endianness. Clients must use little-endianness by default and allow the user to select the endianness. Regardless of the value of the endianness field, clients must allow the user to override the endianness when displaying memory.
maxAddr

Type: NumberU64

Optional. Maximum address in this address space (inclusive). Default is 264-1. Must be >= minAddr.

minAddr

Type: NumberU64

Optional. Minimum address in this address space (inclusive). Default is 0. It is very exotic to have a memory space with minAddr != 0. Memory spaces must not represent blocks of memory.

name

Type: String

Short string identifying the memory space. If available, this is the architectural memory space name.

spaceId

Type: NumberU64

Opaque memory space id uniquely identifying the memory space within the target instance. Used to read and write memory locations.

MemorySupportedAddressTranslationResult

MemorySupportedAddressTranslationResult members:

description

Type: String

Description of this translation. This also explains artefacts, for example non-uniqueness and unsupported cases.

inSpaceId

Type: NumberU64

Input memory space id.

outSpaceId

Type: NumberU64

Output memory space id.

MemoryWriteResult

MemoryWriteResult members:

error

Type: NumberU64[]

Optional. List of addresses and E_* error codes for memory locations that could not be written. Each entry in the list occupies two array elements: address and then errorCode. This only returns errors that happen because the callee is unable to write the memory value, for example architectural errors. This does not return errors that are caused by the caller doing something wrong, for example E_unknown_memory_space_id. These errors are returned by memory_read() instead. The errors that are most likely to occur in this list are:

E_memory_abort
The memory value could not be written because the memory operation was aborted by the memory subsystem. A store instruction to this address would have also failed.
Non-ConfidentialPDF file icon PDF version101196_0100_03_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.