Skip to content

Commit dff1dd9

Browse files
committed
build: ptl-sim: fix simulation board configurations and qemu runner
Fix compilation and linker errors caused by missing extern declarations, LLEXT stubs, PM definitions, and logging structures when PM/LLEXT/LOG are conditionally disabled on the simulator boards. Remove CACHED_BOARD overwrite in QEMU python runner script. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 5cc27c8 commit dff1dd9

8 files changed

Lines changed: 13 additions & 11 deletions

File tree

app/boards/intel_adsp/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ config POWER_DOMAIN
151151
# ----------------------------------------
152152

153153
config LOG_BACKEND_ADSP_MTRACE
154-
default y
154+
default y if LOG
155155

156156
config LOG_FUNC_NAME_PREFIX_ERR
157157
default y

app/boards/intel_adsp_ace30_ptl_sim.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ CONFIG_PM=n
1212
# enable Zephyr drivers
1313
CONFIG_DAI_INIT_PRIORITY=70
1414
CONFIG_DAI_DMIC_HW_IOCLK=19200000
15-
CONFIG_DAI_DMIC_HAS_OWNERSHIP=y
15+
CONFIG_DAI_DMIC_HAS_OWNERSHIP=n
1616
CONFIG_DAI_DMIC_HAS_MULTIPLE_LINE_SYNC=y
1717
CONFIG_DAI_INTEL_SSP=n
1818
CONFIG_DMA_INTEL_ADSP_GPDMA=n

app/boards/intel_adsp_ace30_wcl_sim.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ CONFIG_PM=n
1212
# enable Zephyr drivers
1313
CONFIG_DAI_INIT_PRIORITY=70
1414
CONFIG_DAI_DMIC_HW_IOCLK=19200000
15-
CONFIG_DAI_DMIC_HAS_OWNERSHIP=y
15+
CONFIG_DAI_DMIC_HAS_OWNERSHIP=n
1616
CONFIG_DAI_DMIC_HAS_MULTIPLE_LINE_SYNC=y
1717
CONFIG_DAI_INTEL_SSP=n
1818
CONFIG_DMA_INTEL_ADSP_GPDMA=n

scripts/sof-qemu-run.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,8 @@ def main():
108108
break
109109

110110
# Determine execution command
111-
# If the user is running the python script directly from outside the workspace, we need to provide the source directory.
112-
# But if west finds it automatically (or we are in the build dir), providing `-s` might clear the CACHED_BOARD config.
113111
run_cmd = [west_path, "-v", "build", "-d", build_dir]
114112

115-
# Check if we are physically sitting inside the build directory
116-
if os.path.abspath(".") != os.path.abspath(build_dir):
117-
# We need to explicitly supply the app source to prevent west from crashing
118-
app_source_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "app"))
119-
run_cmd.extend(["-s", app_source_dir])
120113

121114
run_cmd.extend(["-t", "run"])
122115

src/audio/base_fw.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,13 @@ __cold struct ipc4_system_time_info *basefw_get_system_time_info(void)
258258
return &global_system_time_info;
259259
}
260260

261+
#if defined(CONFIG_LOG)
261262
/* Cannot be cold - this function is called from the logger per log_set_timestamp_func() below */
262263
static log_timestamp_t basefw_get_timestamp(void)
263264
{
264265
return sof_cycle_get_64() + global_cycle_delta;
265266
}
267+
#endif
266268

267269
__cold static uint32_t basefw_set_system_time(uint32_t param_id, bool first_block, bool last_block,
268270
uint32_t data_offset, const char *data)
@@ -296,8 +298,10 @@ __cold static uint32_t basefw_set_system_time(uint32_t param_id, bool first_bloc
296298
((uint64_t)global_system_time_info.host_time.val_u << 32);
297299
host_cycle = k_us_to_cyc_ceil64(host_time);
298300
global_cycle_delta = host_cycle - dsp_cycle;
301+
#if defined(CONFIG_LOG)
299302
log_set_timestamp_func(basefw_get_timestamp,
300303
sys_clock_hw_cycles_per_sec());
304+
#endif
301305

302306
return IPC4_SUCCESS;
303307
}

src/audio/base_fw_intel.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
#include <sof/audio/mic_privacy_manager.h>
3838
#endif
3939

40+
extern struct tr_ctx basefw_comp_tr;
41+
4042
struct ipc4_modules_info {
4143
uint32_t modules_count;
4244
struct sof_man_module modules[0];

src/include/sof/llext_manager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ bool comp_is_llext(struct comp_dev *comp);
4040
#define llext_manager_free_module(component_id) 0
4141
#define llext_manager_add_library(module_id) 0
4242
#define llext_manager_add_domain(component_id, domain) 0
43+
#define llext_manager_rm_domain(component_id, domain) 0
4344
#define comp_is_llext(comp) false
4445
#endif
4546

src/ipc/ipc-zephyr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static void sof_ipc_receive_cb(const void *data, size_t len, void *priv)
9797
k_spin_unlock(&ipc->lock, key);
9898
}
9999

100-
#ifdef CONFIG_PM_DEVICE
100+
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_PM)
101101
/**
102102
* @brief IPC device suspend handler callback function.
103103
* Checks whether device power state should be actually changed.
@@ -250,7 +250,9 @@ enum task_state ipc_platform_do_cmd(struct ipc *ipc)
250250
* @note no return - memory will be
251251
* powered off and IPC sent.
252252
*/
253+
#if !defined(CONFIG_SOC_SERIES_INTEL_ADSP_ACE)
253254
platform_pm_runtime_power_off();
255+
#endif
254256
#endif /* CONFIG_PM */
255257
}
256258

0 commit comments

Comments
 (0)