Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
0002 /*
0003  * This file is provided under a dual BSD/GPLv2 license.  When using or
0004  * redistributing this file, you may do so under either license.
0005  *
0006  * Copyright(c) 2020 Intel Corporation. All rights reserved.
0007  *
0008  * Author: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
0009  */
0010 
0011 #ifndef __INCLUDE_SOUND_SOF_DEBUG_H__
0012 #define __INCLUDE_SOUND_SOF_DEBUG_H__
0013 
0014 #include <sound/sof/header.h>
0015 
0016 /** ABI3.18 */
0017 enum sof_ipc_dbg_mem_zone {
0018     SOF_IPC_MEM_ZONE_SYS        = 0,    /**< System zone */
0019     SOF_IPC_MEM_ZONE_SYS_RUNTIME    = 1,    /**< System-runtime zone */
0020     SOF_IPC_MEM_ZONE_RUNTIME    = 2,    /**< Runtime zone */
0021     SOF_IPC_MEM_ZONE_BUFFER     = 3,    /**< Buffer zone */
0022     SOF_IPC_MEM_ZONE_RUNTIME_SHARED = 4,    /**< System runtime zone */
0023     SOF_IPC_MEM_ZONE_SYS_SHARED = 5,    /**< System shared zone */
0024 };
0025 
0026 /** ABI3.18 */
0027 struct sof_ipc_dbg_mem_usage_elem {
0028     uint32_t zone;      /**< see sof_ipc_dbg_mem_zone */
0029     uint32_t id;        /**< heap index within zone */
0030     uint32_t used;      /**< number of bytes used in zone */
0031     uint32_t free;      /**< number of bytes free to use within zone */
0032     uint32_t reserved;  /**< for future use */
0033 } __packed;
0034 
0035 /** ABI3.18 */
0036 struct sof_ipc_dbg_mem_usage {
0037     struct sof_ipc_reply rhdr;          /**< generic IPC reply header */
0038     uint32_t reserved[4];               /**< reserved for future use */
0039     uint32_t num_elems;             /**< elems[] counter */
0040     struct sof_ipc_dbg_mem_usage_elem elems[];  /**< memory usage information */
0041 } __packed;
0042 
0043 #endif