dmi_memory_array_addr

Synopsis

#include <opendmi/entity/memory-array-addr.h>

typedef struct dmi_memory_array_addr {
    uint64_t        start_address;
    uint64_t        end_address;
    uint64_t        range_size;
    dmi_handle_t    array_handle;
    dmi_entity_t   *array;
    unsigned short  partition_width;
} dmi_memory_array_addr_t;

Description

The dmi_memory_array_addr_t structure holds the decoded memory array mapped address structure (type 19) of SMBIOS: it maps one contiguous range of physical addresses to a physical memory array. The table holds one such structure for each range, and several ranges may map to the same array. Since SMBIOS 2.3, a table must hold at least one of them.

The structure gives the addresses in kilobytes, or, since SMBIOS 2.7, in bytes in extended fields for the ranges which do not fit; the decoder converts both to bytes.

The structure is returned by dmi_entity_info for the structures of type DMI_TYPE(memory_array_addr), and lives as long as the context it has been decoded in.

Fields

start_address

Physical address of the start of the range, in bytes.

end_address

Physical address of the last byte of the range. When the structure gives the addresses in kilobytes, this is the last byte of the last kilobyte of the range.

range_size

Size of the range in bytes, computed from start_address and end_address, whichever order they come in, both of which belong to the range.

array_handle

Handle of the physical memory array structure (type 16) the range maps to.

array

Entity of the physical memory array structure, set when the structures are linked; nullptr if array_handle does not refer to a physical memory array.

partition_width

Number of memory devices which make up one row of memory for the partition of addresses this structure defines.

Examples

dmi_registry_t          *registry = dmi_get_registry(context);
dmi_entity_t            *entity   = dmi_registry_lookup_first(registry,
                                        DMI_TYPE(memory_array_addr), false);
dmi_memory_array_addr_t *range    = dmi_entity_info(entity,
                                        DMI_TYPE(memory_array_addr));

if (range != nullptr)
    printf("0x%llx-0x%llx, array 0x%04x\n",
           (unsigned long long)range->start_address,
           (unsigned long long)range->end_address,
           (unsigned)range->array_handle);

Standards

DMTF SMBIOS Specification (DSP0134), version 2.1 or newer.