Skip to content

Commit

Permalink
LLEXT: add a macro to place selected functions in .text.dram
Browse files Browse the repository at this point in the history
With this macro modules can use

__sof_llext_dram_text(CONFIG_<NAME>_MODULE)

in front of their functions to place them in the .text.dram section
where they then will also be executed without being copied to SRAM.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh committed Nov 22, 2024
1 parent 7a30c87 commit 696f8bc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/include/module/module/llext.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ static const struct sof_module_api_build_info buildinfo __section(".mod_buildinf
.api_version_number.full = SOF_MODULE_API_CURRENT_VERSION, \
}

#if CONFIG_LLEXT_TYPE_ELF_RELOCATABLE
#define __sof_llext_dram_text(m) IF_ENABLED(m, (__section(".text.dram")))
#else
#define __sof_llext_dram_text(m)
#endif

#endif

0 comments on commit 696f8bc

Please sign in to comment.