162306a36Sopenharmony_ci/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * This file is provided under a dual BSD/GPLv2 license. When using or 462306a36Sopenharmony_ci * redistributing this file, you may do so under either license. 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * Copyright(c) 2020 Intel Corporation. All rights reserved. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * Author: Karol Trzcinski <karolx.trzcinski@linux.intel.com> 962306a36Sopenharmony_ci */ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#ifndef __INCLUDE_SOUND_SOF_DEBUG_H__ 1262306a36Sopenharmony_ci#define __INCLUDE_SOUND_SOF_DEBUG_H__ 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci#include <sound/sof/header.h> 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci/** ABI3.18 */ 1762306a36Sopenharmony_cienum sof_ipc_dbg_mem_zone { 1862306a36Sopenharmony_ci SOF_IPC_MEM_ZONE_SYS = 0, /**< System zone */ 1962306a36Sopenharmony_ci SOF_IPC_MEM_ZONE_SYS_RUNTIME = 1, /**< System-runtime zone */ 2062306a36Sopenharmony_ci SOF_IPC_MEM_ZONE_RUNTIME = 2, /**< Runtime zone */ 2162306a36Sopenharmony_ci SOF_IPC_MEM_ZONE_BUFFER = 3, /**< Buffer zone */ 2262306a36Sopenharmony_ci SOF_IPC_MEM_ZONE_RUNTIME_SHARED = 4, /**< System runtime zone */ 2362306a36Sopenharmony_ci SOF_IPC_MEM_ZONE_SYS_SHARED = 5, /**< System shared zone */ 2462306a36Sopenharmony_ci}; 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci/** ABI3.18 */ 2762306a36Sopenharmony_cistruct sof_ipc_dbg_mem_usage_elem { 2862306a36Sopenharmony_ci uint32_t zone; /**< see sof_ipc_dbg_mem_zone */ 2962306a36Sopenharmony_ci uint32_t id; /**< heap index within zone */ 3062306a36Sopenharmony_ci uint32_t used; /**< number of bytes used in zone */ 3162306a36Sopenharmony_ci uint32_t free; /**< number of bytes free to use within zone */ 3262306a36Sopenharmony_ci uint32_t reserved; /**< for future use */ 3362306a36Sopenharmony_ci} __packed; 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci/** ABI3.18 */ 3662306a36Sopenharmony_cistruct sof_ipc_dbg_mem_usage { 3762306a36Sopenharmony_ci struct sof_ipc_reply rhdr; /**< generic IPC reply header */ 3862306a36Sopenharmony_ci uint32_t reserved[4]; /**< reserved for future use */ 3962306a36Sopenharmony_ci uint32_t num_elems; /**< elems[] counter */ 4062306a36Sopenharmony_ci struct sof_ipc_dbg_mem_usage_elem elems[]; /**< memory usage information */ 4162306a36Sopenharmony_ci} __packed; 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci#endif 44