Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/audio/base_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@
#include <sof/lib/cpu-clk-manager.h>
#include <sof/lib/cpu.h>
#include <rtos/init.h>
#include <platform/lib/clk.h>

#if CONFIG_ACE_V1X_ART_COUNTER || CONFIG_ACE_V1X_RTC_COUNTER
#include <zephyr/device.h>
#include <zephyr/drivers/counter.h>
#endif

/* TODO: Remove platform-specific code, see https://github.com/thesofproject/sof/issues/7549 */
#if defined(CONFIG_SOC_SERIES_INTEL_ACE) || defined(CONFIG_INTEL_ADSP_CAVS)
# define INTEL_ADSP 1
#endif

LOG_MODULE_REGISTER(basefw, CONFIG_SOF_LOG_LEVEL);

/* 0e398c32-5ade-ba4b-93b1-c50432280ee4 */
Expand Down Expand Up @@ -196,8 +202,13 @@ static int basefw_mem_state_info(uint32_t *data_offset, char *data)
index = 0;
tuple_data[index++] = info.free_phys_mem_pages;
tuple_data[index++] = info.ebb_state_dword_count;
for (i = 0; i < info.ebb_state_dword_count; i++)
for (i = 0; i < info.ebb_state_dword_count; i++) {
#ifdef INTEL_ADSP
tuple_data[index + i] = io_reg_read(SHIM_HSPGCTL(i));
#else
tuple_data[index + i] = 0;
#endif
}
index += info.ebb_state_dword_count;

tuple_data[index++] = info.page_alloc_struct.page_alloc_count;
Expand All @@ -221,7 +232,11 @@ static int basefw_mem_state_info(uint32_t *data_offset, char *data)
index = 0;
tuple_data[index++] = info.free_phys_mem_pages;
tuple_data[index++] = info.ebb_state_dword_count;
#ifdef INTEL_ADSP
tuple_data[index++] = io_reg_read(LSPGCTL);
#else
tuple_data[index++] = 0;
#endif
tuple_data[index++] = info.page_alloc_struct.page_alloc_count;
ptr = (uint16_t *)(tuple_data + index);
for (i = 0; i < info.page_alloc_struct.page_alloc_count; i++)
Expand Down
1 change: 1 addition & 0 deletions src/include/ipc4/notification.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <stdint.h>
#include <ipc/header.h>
#include <sof/compiler_attributes.h>

/* ipc4 notification msg */
enum sof_ipc4_notification_type {
Expand Down
1 change: 1 addition & 0 deletions src/init/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <ipc/trace.h>
#if CONFIG_IPC_MAJOR_4
#include <ipc4/fw_reg.h>
#include <platform/lib/mailbox.h>
#endif
#ifdef CONFIG_ZEPHYR_LOG
#include <zephyr/logging/log_ctrl.h>
Expand Down
Loading