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 "__cold" in front of their function
definitions to place them in the .text.dram section, which will force
their execution in DRAM without being copied to SRAM.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh authored and lgirdwood committed Nov 27, 2024
1 parent 675e3c4 commit bb30a38
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 && defined(LL_EXTENSION_BUILD)
#define __cold __section(".text.dram")
#else
#define __cold
#endif

#endif

0 comments on commit bb30a38

Please sign in to comment.