> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs-staging.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# APM Memmap API

> This file contains the structure definitions for the memory map commands.

**Header:** `spf/api/apm/apm_memmap_api.h`

## Structures

### `apm_cmd_global_shared_mem_map_regions_t`

Immediately following this structure are num\_regions of apm\_shared\_map\_region\_payload\_t.

**Members**

<ParamField path="shmem_id" type="uint32_t">
  A unique ID assigned by the client for these memory regions.
</ParamField>

<ParamField path="mem_pool_id" type="uint16_t">
  Type of memory on which this memory region is mapped.
</ParamField>

<ParamField path="num_regions" type="uint16_t">
  Number of physical regions to map.
</ParamField>

<ParamField path="property_flag" type="uint32_t">
  Configures one common property for all regions in the payload.
</ParamField>

### `apm_cmd_shared_mem_map_regions_t`

Immediately following this structure are num\_regions of apm\_shared\_map\_region\_payload\_t.

**Members**

<ParamField path="mem_pool_id" type="uint16_t">
  Type of memory on which this memory region is mapped.
</ParamField>

<ParamField path="num_regions" type="uint16_t">
  Number of regions to map.
</ParamField>

<ParamField path="property_flag" type="uint32_t">
  Configures one common property for all regions in the payload.
</ParamField>

### `apm_cmd_shared_satellite_mem_map_regions_t`

Immediately following this structure are num\_regions of apm\_shared\_map\_region\_payload\_t.

**Members**

<ParamField path="master_mem_handle" type="uint32_t">
  Specifies the memory handle of the master processor that corresponds to the shared memory region being mapped to the satellite process domain.
</ParamField>

<ParamField path="satellite_proc_domain_id" type="uint32_t">
  Specifies the satellite process domain ID to which the memory is mapped.
</ParamField>

<ParamField path="mem_pool_id" type="uint16_t">
  Type of memory on which this memory region is mapped.
</ParamField>

<ParamField path="num_regions" type="uint16_t">
  Number of regions to map.
</ParamField>

<ParamField path="property_flag" type="uint32_t">
  Configures one common property for all regions in the payload.
</ParamField>

### `apm_shared_map_region_payload_t`

**Members**

<ParamField path="shm_addr_lsw" type="uint32_t">
  Lower 32 bits of the shared memory address of the memory region to map.
</ParamField>

<ParamField path="shm_addr_msw" type="uint32_t">
  Upper 32 bits of the shared memory address of the memory region to map.
</ParamField>

<ParamField path="mem_size_bytes" type="uint32_t">
  Number of bytes in the region.
</ParamField>

### `apm_cmd_rsp_shared_mem_map_regions_t`

**Members**

<ParamField path="mem_map_handle" type="uint32_t">
  Unique identifier for the shared memory address.
</ParamField>

### `apm_cmd_rsp_shared_satellite_mem_map_regions_t`

**Members**

<ParamField path="mem_map_handle" type="uint32_t">
  Unique identifier for the shared memory address.
</ParamField>

### `apm_cmd_global_shared_mem_unmap_regions_t`

**Members**

<ParamField path="shmem_id" type="uint32_t">
  Unique identifier for the global shared memory.
</ParamField>

### `apm_cmd_shared_mem_unmap_regions_t`

**Members**

<ParamField path="mem_map_handle" type="uint32_t">
  Unique identifier for the shared memory address.
</ParamField>

### `apm_cmd_shared_satellite_mem_unmap_regions_t`

**Members**

<ParamField path="satellite_proc_domain_id" type="uint32_t">
  Specifies the satellite process domain ID whose memory must be unmapped.
</ParamField>

<ParamField path="master_mem_handle" type="uint32_t">
  Unique identifier for the shared memory address.
</ParamField>
