From 724408e951d75ac03029888ceeaad6ef3e19fa64 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Mon, 16 Sep 2024 17:24:15 +0200 Subject: [PATCH] llext: export symbols needed for probes Export base firmware symbols needed for modular probes. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Jyri Sarha --- src/init/init.c | 2 ++ src/ipc/ipc-common.c | 2 ++ src/lib/dma.c | 4 ++++ src/lib/notifier.c | 3 +++ src/schedule/zephyr_ll.c | 2 ++ zephyr/schedule.c | 2 ++ 6 files changed, 15 insertions(+) diff --git a/src/init/init.c b/src/init/init.c index 738ce9233e69..530e82a537de 100644 --- a/src/init/init.c +++ b/src/init/init.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -53,6 +54,7 @@ struct sof *sof_get(void) { return &sof; } +EXPORT_SYMBOL(sof_get); #if CONFIG_NO_SECONDARY_CORE_ROM /** diff --git a/src/ipc/ipc-common.c b/src/ipc/ipc-common.c index 7714a4650150..e9de1efdd2a0 100644 --- a/src/ipc/ipc-common.c +++ b/src/ipc/ipc-common.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -95,6 +96,7 @@ struct ipc_comp_dev *ipc_get_comp_dev(struct ipc *ipc, uint16_t type, uint32_t i return NULL; } +EXPORT_SYMBOL(ipc_get_comp_dev); /* Walks through the list of components looking for a sink/source endpoint component * of the given pipeline diff --git a/src/lib/dma.c b/src/lib/dma.c index 639bca4734a4..d95633c45234 100644 --- a/src/lib/dma.c +++ b/src/lib/dma.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -278,6 +279,8 @@ void dma_put(struct dma *dma) k_spin_unlock(&dma->lock, key); } #endif +EXPORT_SYMBOL(dma_get); +EXPORT_SYMBOL(dma_put); int dma_sg_alloc(struct dma_sg_elem_array *elem_array, enum mem_zone zone, @@ -318,6 +321,7 @@ void dma_sg_free(struct dma_sg_elem_array *elem_array) rfree(elem_array->elems); dma_sg_init(elem_array); } +EXPORT_SYMBOL(dma_sg_free); int dma_buffer_copy_from(struct comp_buffer *source, struct comp_buffer *sink, diff --git a/src/lib/notifier.c b/src/lib/notifier.c index 98fbad4346fc..4b096111019c 100644 --- a/src/lib/notifier.c +++ b/src/lib/notifier.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -78,6 +79,7 @@ int notifier_register(void *receiver, void *caller, enum notify_id type, k_spin_unlock(¬ify->lock, key); return ret; } +EXPORT_SYMBOL(notifier_register); void notifier_unregister(void *receiver, void *caller, enum notify_id type) { @@ -114,6 +116,7 @@ void notifier_unregister(void *receiver, void *caller, enum notify_id type) k_spin_unlock(¬ify->lock, key); } +EXPORT_SYMBOL(notifier_unregister); void notifier_unregister_all(void *receiver, void *caller) { diff --git a/src/schedule/zephyr_ll.c b/src/schedule/zephyr_ll.c index 49b1cc0d63a2..899fb5b37268 100644 --- a/src/schedule/zephyr_ll.c +++ b/src/schedule/zephyr_ll.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -522,6 +523,7 @@ int zephyr_ll_task_init(struct task *task, return 0; } +EXPORT_SYMBOL(zephyr_ll_task_init); /* TODO: low-power mode clock support */ /* Runs on each core during initialisation with the same domain argument */ diff --git a/zephyr/schedule.c b/zephyr/schedule.c index e675beece766..75155b5d4913 100644 --- a/zephyr/schedule.c +++ b/zephyr/schedule.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -22,3 +23,4 @@ struct schedulers **arch_schedulers_get(void) { return _schedulers + cpu_get_id(); } +EXPORT_SYMBOL(arch_schedulers_get);