diff --git a/scripts/cmake/llext_write_uuids.cmake b/scripts/cmake/llext_write_uuids.cmake new file mode 100644 index 000000000000..ad608c0e5e17 --- /dev/null +++ b/scripts/cmake/llext_write_uuids.cmake @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: BSD-3-Clause + +# Used by LLEXT modules to create a file with module UUIDs +file(STRINGS ${ZEPHYR_BINARY_DIR}/${MODULE}_llext/rimage_config.toml uuids REGEX "^[ \t]*uuid *=") + +set(UUIDS_LIST_FILE ${ZEPHYR_BINARY_DIR}/${MODULE}_llext/llext.uuid) +file(REMOVE ${UUIDS_LIST_FILE}) +foreach(line IN LISTS uuids) + # extract UUID value - drop the 'uuid = ' part of the assignment line + string(REGEX REPLACE "^[ \t]*uuid *= \"([0-9A-Fa-f\\-]*)\"" "\\1" uuid ${line}) + string(TOUPPER ${uuid} uuid) + file(APPEND ${UUIDS_LIST_FILE} "${uuid}\n") +endforeach() diff --git a/src/audio/aria/aria.toml b/src/audio/aria/aria.toml index fa97abcc7bcf..f40ac691d3aa 100644 --- a/src/audio/aria/aria.toml +++ b/src/audio/aria/aria.toml @@ -5,7 +5,7 @@ REM # Aria module config [[module.entry]] name = "ARIA" - uuid = "99F7166D-372C-43EF-81F6-22007AA15F03" + uuid = UUIDREG_STR_ARIA affinity_mask = "0x1" instance_count = "8" domain_types = "0" diff --git a/src/audio/asrc/asrc.toml b/src/audio/asrc/asrc.toml index ace84d85e733..6efca3b9e5c8 100644 --- a/src/audio/asrc/asrc.toml +++ b/src/audio/asrc/asrc.toml @@ -4,7 +4,7 @@ [[module.entry]] name = "ASRC" - uuid = "66B4402D-B468-42F2-81A7-B37121863DD4" + uuid = UUIDREG_STR_ASRC4 affinity_mask = "0x3" instance_count = "2" domain_types = "0" diff --git a/src/audio/codec/dts/dts.toml b/src/audio/codec/dts/dts.toml index debbbd82b47f..00d955a808f9 100644 --- a/src/audio/codec/dts/dts.toml +++ b/src/audio/codec/dts/dts.toml @@ -5,7 +5,7 @@ REM # dts codec module config [[module.entry]] name = "DTS" - uuid = "D95FC34F-370F-4AC7-BC86-BFDC5BE241E6" + uuid = UUIDREG_STR_DTS affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/copier/copier.toml b/src/audio/copier/copier.toml index e7cd23f5154b..90135fe8281b 100644 --- a/src/audio/copier/copier.toml +++ b/src/audio/copier/copier.toml @@ -1,6 +1,6 @@ [[module.entry]] name = "COPIER" - uuid = "9BA00C83-CA12-4A83-943C-1FA2E82F9DDA" + uuid = UUIDREG_STR_COPIER affinity_mask = "0x1" instance_count = "32" domain_types = "0" diff --git a/src/audio/crossover/crossover.toml b/src/audio/crossover/crossover.toml index c27f14ce34e6..fead1e8e22d2 100644 --- a/src/audio/crossover/crossover.toml +++ b/src/audio/crossover/crossover.toml @@ -7,7 +7,7 @@ REM # be appended to the IPC payload. The Extension is needed to know the output pin indices. [[module.entry]] name = "XOVER" - uuid = "948C9AD1-806A-4131-AD6C-B2BDA9E35A9F" + uuid = UUIDREG_STR_CROSSOVER affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/dcblock/dcblock.toml b/src/audio/dcblock/dcblock.toml index 8ad98ed54d5b..c752fd13a279 100644 --- a/src/audio/dcblock/dcblock.toml +++ b/src/audio/dcblock/dcblock.toml @@ -5,7 +5,7 @@ REM # DCblock module config [[module.entry]] name = "DCBLOCK" - uuid = "B809EFAF-5681-42B1-9ED6-04BB012DD384" + uuid = UUIDREG_STR_DCBLOCK affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/drc/drc.toml b/src/audio/drc/drc.toml index 4c0b25601425..a131c7b75451 100644 --- a/src/audio/drc/drc.toml +++ b/src/audio/drc/drc.toml @@ -5,7 +5,7 @@ REM # DRC module config [[module.entry]] name = "DRC" - uuid = "B36EE4DA-006F-47F9-A06D-FECBE2D8B6CE" + uuid = UUIDREG_STR_DRC affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/eq_fir/eq_fir.toml b/src/audio/eq_fir/eq_fir.toml index 416c068e95ce..514a0804bba7 100644 --- a/src/audio/eq_fir/eq_fir.toml +++ b/src/audio/eq_fir/eq_fir.toml @@ -5,7 +5,7 @@ REM # eq fir module config [[module.entry]] name = "EQFIR" - uuid = "43A90CE7-F3A5-41DF-AC06-BA98651AE6A3" + uuid = UUIDREG_STR_EQ_FIR affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/eq_iir/eq_iir.toml b/src/audio/eq_iir/eq_iir.toml index ad369d38edce..421d09683f65 100644 --- a/src/audio/eq_iir/eq_iir.toml +++ b/src/audio/eq_iir/eq_iir.toml @@ -5,7 +5,7 @@ REM # eq iir module config [[module.entry]] name = "EQIIR" - uuid = "5150C0E6-27F9-4EC8-8351-C705B642D12F" + uuid = UUIDREG_STR_EQ_IIR affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/google/google_ctc_audio_processing.toml b/src/audio/google/google_ctc_audio_processing.toml index b136273f0362..4bea054225fc 100644 --- a/src/audio/google/google_ctc_audio_processing.toml +++ b/src/audio/google/google_ctc_audio_processing.toml @@ -5,7 +5,7 @@ REM # CTC module config [[module.entry]] name = "CTC" - uuid = "BF0E1BBC-DC6A-45FE-BC90-2554CB137AB4" + uuid = UUIDREG_STR_GOOGLE_CTC_AUDIO_PROCESSING affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/google/google_rtc_audio_processing.toml b/src/audio/google/google_rtc_audio_processing.toml index eab8e437f798..8650b50d8b38 100644 --- a/src/audio/google/google_rtc_audio_processing.toml +++ b/src/audio/google/google_rtc_audio_processing.toml @@ -4,7 +4,7 @@ [[module.entry]] name = "RTC_AEC" - uuid = "B780A0A6-269F-466F-B477-23DFA05AF758" + uuid = UUIDREG_STR_GOOGLE_RTC_AUDIO_PROCESSING REM # bit #i = 1 means core #i is allowed. affinity_mask = "0x7" instance_count = "1" diff --git a/src/audio/igo_nr/igo_nr.toml b/src/audio/igo_nr/igo_nr.toml index ad14ad2a7691..723066425f83 100644 --- a/src/audio/igo_nr/igo_nr.toml +++ b/src/audio/igo_nr/igo_nr.toml @@ -5,7 +5,7 @@ REM # IGO_NR module config [[module.entry]] name = "IGO_NR" - uuid = "696AE2BC-2877-11EB-ADC1-0242AC120002" + uuid = UUIDREG_STR_IGO_NR affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/kpb.toml b/src/audio/kpb.toml index 1aa10e007b76..e384632c1be8 100644 --- a/src/audio/kpb.toml +++ b/src/audio/kpb.toml @@ -1,6 +1,6 @@ [[module.entry]] name = "KPB" - uuid = "A8A0CB32-4A77-4DB1-85C7-53D7EE07BCE6" + uuid = UUIDREG_STR_KPB4 affinity_mask = "0x1" instance_count = "1" domain_types = "0" diff --git a/src/audio/mfcc/mfcc.toml b/src/audio/mfcc/mfcc.toml index 5b07b2377752..9cc6291840de 100644 --- a/src/audio/mfcc/mfcc.toml +++ b/src/audio/mfcc/mfcc.toml @@ -5,7 +5,7 @@ REM # MFCC module config [[module.entry]] name = "MFCC" -uuid = "DB10A773-1AA4-4CEA-A21F-2D57A5C982EB" +uuid = UUIDREG_STR_MFCC affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/mixin_mixout/mixin_mixout.toml b/src/audio/mixin_mixout/mixin_mixout.toml index 22a6d3e471e6..006ac7f30294 100644 --- a/src/audio/mixin_mixout/mixin_mixout.toml +++ b/src/audio/mixin_mixout/mixin_mixout.toml @@ -4,7 +4,7 @@ [[module.entry]] name = "MIXIN" - uuid = "39656EB2-3B71-4049-8D3F-F92CD5C43C09" + uuid = UUIDREG_STR_MIXIN affinity_mask = "0x1" instance_count = "30" domain_types = "0" @@ -43,7 +43,7 @@ [[module.entry]] name = "MIXOUT" - uuid = "3C56505A-24D7-418F-BDDC-C1F5A3AC2AE0" + uuid = UUIDREG_STR_MIXOUT affinity_mask = "0x1" instance_count = "30" domain_types = "0" diff --git a/src/audio/module_adapter/module/cadence.toml b/src/audio/module_adapter/module/cadence.toml index 078e8ec6bba8..4c0466196577 100644 --- a/src/audio/module_adapter/module/cadence.toml +++ b/src/audio/module_adapter/module/cadence.toml @@ -1,7 +1,7 @@ REM # Cadence module config [[module.entry]] name = "CADENCE" - uuid = "D8218443-5FF3-4A4C-B388-6CFE07B956AA" + uuid = UUIDREG_STR_CADENCE_CODEC affinity_mask = "0x3" instance_count = "1" domain_types = "0" diff --git a/src/audio/module_adapter/module/waves/waves.toml b/src/audio/module_adapter/module/waves/waves.toml index 5e81fb4b05d6..3d13fe01994b 100644 --- a/src/audio/module_adapter/module/waves/waves.toml +++ b/src/audio/module_adapter/module/waves/waves.toml @@ -5,7 +5,7 @@ REM # waves module config [[module.entry]] name = "WAVES" - uuid = "D944281A-AFE9-4695-A043-D7F62B89538E" + uuid = UUIDREG_STR_WAVES affinity_mask = "0x1" instance_count = "4" domain_types = "0" diff --git a/src/audio/multiband_drc/multiband_drc.toml b/src/audio/multiband_drc/multiband_drc.toml index 008da93dcef0..5ac07295d4a1 100644 --- a/src/audio/multiband_drc/multiband_drc.toml +++ b/src/audio/multiband_drc/multiband_drc.toml @@ -5,7 +5,7 @@ REM # Multiband-DRC module config [[module.entry]] name = "MB_DRC" - uuid = "0D9F2256-8E4F-47B3-8448-239A334F1191" + uuid = UUIDREG_STR_MULTIBAND_DRC affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/mux/mux.toml b/src/audio/mux/mux.toml index 76a50383d0bc..f42b294850df 100644 --- a/src/audio/mux/mux.toml +++ b/src/audio/mux/mux.toml @@ -4,7 +4,7 @@ [[module.entry]] name = "MUX" - uuid = "64CE6E35-857A-4878-ACE8-E2A2F42E3069" + uuid = UUIDREG_STR_MUX4 affinity_mask = "0x1" instance_count = "15" domain_types = "0" diff --git a/src/audio/rtnr/rtnr.toml b/src/audio/rtnr/rtnr.toml index 3acd2510e1ae..7281f2b72ee0 100644 --- a/src/audio/rtnr/rtnr.toml +++ b/src/audio/rtnr/rtnr.toml @@ -5,7 +5,7 @@ REM # RTNR module config [[module.entry]] name = "RTNR" - uuid = "5C7CA334-E15D-11EB-BA80-0242AC130004" + uuid = UUIDREG_STR_RTNR affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/selector/selector.toml b/src/audio/selector/selector.toml index d3fc2784a674..68a6f8cf7027 100644 --- a/src/audio/selector/selector.toml +++ b/src/audio/selector/selector.toml @@ -4,7 +4,7 @@ [[module.entry]] name = "MICSEL" - uuid = "32FE92C1-1E17-4FC2-9758-C7F3542E980A" + uuid = UUIDREG_STR_SELECTOR4 affinity_mask = "0x1" instance_count = "8" domain_types = "0" diff --git a/src/audio/src/src.toml b/src/audio/src/src.toml index 448739cf2f19..2f3a72e6fdd9 100644 --- a/src/audio/src/src.toml +++ b/src/audio/src/src.toml @@ -4,7 +4,7 @@ [[module.entry]] name = "SRC" - uuid = "E61BB28D-149A-4C1F-B709-46823EF5F5AE" + uuid = UUIDREG_STR_SRC4 affinity_mask = "0x1" REM #instance_count = "10" domain_types = "0" @@ -77,7 +77,7 @@ REM # SRC lite module config [[module.entry]] name = "SRC_LITE" - uuid = "33441051-44CD-466A-83A3-178478708AEA" + uuid = UUIDREG_STR_SRC_LITE affinity_mask = "0x1" REM #instance_count = "10" domain_types = "0" diff --git a/src/audio/tdfb/tdfb.toml b/src/audio/tdfb/tdfb.toml index 2fc0875ff5c7..ffd25a63d0c1 100644 --- a/src/audio/tdfb/tdfb.toml +++ b/src/audio/tdfb/tdfb.toml @@ -5,7 +5,7 @@ REM # TDFB module config [[module.entry]] name = "TDFB" - uuid = "DD511749-D9FA-455C-B3A7-13585693F1AF" + uuid = UUIDREG_STR_TDFB affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/audio/up_down_mixer/up_down_mixer.toml b/src/audio/up_down_mixer/up_down_mixer.toml index 34a1bf586188..69f037e52623 100644 --- a/src/audio/up_down_mixer/up_down_mixer.toml +++ b/src/audio/up_down_mixer/up_down_mixer.toml @@ -1,6 +1,6 @@ [[module.entry]] name = "UPDWMIX" - uuid = "42F8060C-832F-4DBF-B247-51E961997B34" + uuid = UUIDREG_STR_UP_DOWN_MIXER affinity_mask = "0x1" instance_count = "15" domain_types = "0" diff --git a/src/audio/volume/volume.toml b/src/audio/volume/volume.toml index 7ba4fc53ae83..db55ea9d96e3 100644 --- a/src/audio/volume/volume.toml +++ b/src/audio/volume/volume.toml @@ -5,7 +5,7 @@ #if CONFIG_COMP_PEAK_VOL [[module.entry]] name = "PEAKVOL" - uuid = "8A171323-94A3-4E1D-AFE9-FE5DBAA4C393" + uuid = UUIDREG_STR_VOLUME4 affinity_mask = "0x1" instance_count = "10" domain_types = "0" @@ -41,7 +41,7 @@ #if CONFIG_COMP_GAIN [[module.entry]] name = "GAIN" - uuid = "61BCA9A8-18D0-4A18-8E7B-2639219804B7" + uuid = UUIDREG_STR_GAIN affinity_mask = "0x1" instance_count = "40" domain_types = "0" diff --git a/src/debug/tester/tester.toml b/src/debug/tester/tester.toml index 57bf76ad41c7..68ac9f36c106 100644 --- a/src/debug/tester/tester.toml +++ b/src/debug/tester/tester.toml @@ -4,7 +4,7 @@ [[module.entry]] name = "TESTER" - uuid = "08AEB4FF-7F68-4C71-86C3-C842B4262898" + uuid = UUIDREG_STR_TESTER affinity_mask = "0x1" REM #instance_count = "10" domain_types = "0" diff --git a/src/ipc/ipc4/helper.c b/src/ipc/ipc4/helper.c index a340d4319f88..eca6acd17413 100644 --- a/src/ipc/ipc4/helper.c +++ b/src/ipc/ipc4/helper.c @@ -759,8 +759,7 @@ int ipc_comp_disconnect(struct ipc *ipc, ipc_pipe_comp_connect *_connect) #if CONFIG_COMP_CHAIN_DMA int ipc4_chain_manager_create(struct ipc4_chain_dma *cdma) { - const struct sof_uuid uuid = {0x6a0a274f, 0x27cc, 0x4afb, {0xa3, 0xe7, 0x34, - 0x44, 0x72, 0x3f, 0x43, 0x2e}}; + const struct sof_uuid uuid = SOF_REG_UUID(chain_dma); const struct comp_driver *drv; struct comp_dev *dev; diff --git a/src/math/fir.toml b/src/math/fir.toml index a81268637761..86f2d4163b34 100644 --- a/src/math/fir.toml +++ b/src/math/fir.toml @@ -1,6 +1,6 @@ [[module.entry]] name = "FIR" - uuid = "93446E12-1864-4E04-AFE0-3B1D778FFB79" + uuid = UUIDREG_STR_FIR load_type = "3" index = __COUNTER__ diff --git a/src/probe/probe.toml b/src/probe/probe.toml index 848234b0085c..5075ad866061 100644 --- a/src/probe/probe.toml +++ b/src/probe/probe.toml @@ -4,7 +4,7 @@ [[module.entry]] name = "PROBE" - uuid = "7CAD0808-AB10-CD23-EF45-12AB34CD56EF" + uuid = UUIDREG_STR_PROBE4 affinity_mask = "0x1" instance_count = "1" domain_types = "0" diff --git a/src/samples/audio/detect_test.toml b/src/samples/audio/detect_test.toml index 8173ef5f10c1..3d764d47341f 100644 --- a/src/samples/audio/detect_test.toml +++ b/src/samples/audio/detect_test.toml @@ -1,6 +1,6 @@ [[module.entry]] name = "KDTEST" - uuid = "EBA8D51F-7827-47B5-82EE-DE6E7743AF67" + uuid = UUIDREG_STR_KEYWORD affinity_mask = "0x1" instance_count = "1" domain_types = "0" diff --git a/src/samples/audio/smart_amp_test.toml b/src/samples/audio/smart_amp_test.toml index 39f2a76c47a8..58d526ee65a5 100644 --- a/src/samples/audio/smart_amp_test.toml +++ b/src/samples/audio/smart_amp_test.toml @@ -5,7 +5,7 @@ REM # smart amp test module config [[module.entry]] name = "SMATEST" - uuid = "167A961E-8AE4-11EA-89F1-000C29CE1635" + uuid = UUIDREG_STR_SMART_AMP_TEST affinity_mask = "0x1" instance_count = "1" domain_types = "0" diff --git a/test/cmocka/src/audio/eq_fir/eq_fir_process.c b/test/cmocka/src/audio/eq_fir/eq_fir_process.c index ebfd02b2411f..2b657c23c2fb 100644 --- a/test/cmocka/src/audio/eq_fir/eq_fir_process.c +++ b/test/cmocka/src/audio/eq_fir/eq_fir_process.c @@ -72,10 +72,7 @@ static struct sof_ipc_comp_process *create_eq_fir_comp_ipc(struct test_data *td) struct sof_eq_fir_config *eq; size_t ipc_size = sizeof(struct sof_ipc_comp_process); struct sof_abi_hdr *blob = (struct sof_abi_hdr *)fir_coef_2ch; - const struct sof_uuid uuid = { - .a = 0x43a90ce7, .b = 0xf3a5, .c = 0x41df, - .d = {0xac, 0x06, 0xba, 0x98, 0x65, 0x1a, 0xe6, 0xa3} - }; + const struct sof_uuid uuid = SOF_REG_UUID(eq_fir); ipc = calloc(1, ipc_size + blob->size + SOF_UUID_SIZE); memcpy_s(ipc + 1, SOF_UUID_SIZE, &uuid, SOF_UUID_SIZE); diff --git a/test/cmocka/src/audio/eq_iir/eq_iir_process.c b/test/cmocka/src/audio/eq_iir/eq_iir_process.c index 54716bcfd0f1..763d87b87518 100644 --- a/test/cmocka/src/audio/eq_iir/eq_iir_process.c +++ b/test/cmocka/src/audio/eq_iir/eq_iir_process.c @@ -71,10 +71,7 @@ static struct sof_ipc_comp_process *create_eq_iir_comp_ipc(struct test_data *td) struct sof_eq_iir_config *eq; size_t ipc_size = sizeof(struct sof_ipc_comp_process); struct sof_abi_hdr *blob = (struct sof_abi_hdr *)iir_coef_2ch; - const struct sof_uuid uuid = { - .a = 0x5150c0e6, .b = 0x27f9, .c = 0x4ec8, - .d = {0x83, 0x51, 0xc7, 0x05, 0xb6, 0x42, 0xd1, 0x2f} - }; + const struct sof_uuid uuid = SOF_REG_UUID(eq_iir); ipc = calloc(1, ipc_size + blob->size + SOF_UUID_SIZE); memcpy_s(ipc + 1, SOF_UUID_SIZE, &uuid, SOF_UUID_SIZE); diff --git a/test/cmocka/src/audio/mux/demux_copy.c b/test/cmocka/src/audio/mux/demux_copy.c index 40040023b6df..17414b4f7c25 100644 --- a/test/cmocka/src/audio/mux/demux_copy.c +++ b/test/cmocka/src/audio/mux/demux_copy.c @@ -96,10 +96,7 @@ static struct sof_ipc_comp_process *create_demux_comp_ipc(struct test_data *td) size_t ipc_size = sizeof(struct sof_ipc_comp_process); size_t mux_size = sizeof(struct sof_mux_config) + MUX_MAX_STREAMS * sizeof(struct mux_stream_data); - const struct sof_uuid uuid = { - .a = 0xc4b26868, .b = 0x1430, .c = 0x470e, - .d = {0xa0, 0x89, 0x15, 0xd1, 0xc7, 0x7f, 0x85, 0x1a} - }; + const struct sof_uuid uuid = SOF_REG_UUID(demux); int i, j; ipc = calloc(1, ipc_size + mux_size + SOF_UUID_SIZE); diff --git a/test/cmocka/src/audio/mux/mux_copy.c b/test/cmocka/src/audio/mux/mux_copy.c index 6e391269054a..2ecc814483bd 100644 --- a/test/cmocka/src/audio/mux/mux_copy.c +++ b/test/cmocka/src/audio/mux/mux_copy.c @@ -114,10 +114,7 @@ static struct sof_ipc_comp_process *create_mux_comp_ipc(struct test_data *td) size_t ipc_size = sizeof(struct sof_ipc_comp_process); size_t mux_size = sizeof(struct sof_mux_config) + MUX_MAX_STREAMS * sizeof(struct mux_stream_data); - const struct sof_uuid uuid = { - .a = 0xc607ff4d, .b = 0x9cb6, .c = 0x49dc, - .d = {0xb6, 0x78, 0x7d, 0xa3, 0xc6, 0x3e, 0xa5, 0x57} - }; + const struct sof_uuid uuid = SOF_REG_UUID(mux); int i, j; ipc = calloc(1, ipc_size + mux_size + SOF_UUID_SIZE); diff --git a/test/cmocka/src/audio/mux/mux_get_processing_function.c b/test/cmocka/src/audio/mux/mux_get_processing_function.c index af9fd418ec56..0e4f22ff7021 100644 --- a/test/cmocka/src/audio/mux/mux_get_processing_function.c +++ b/test/cmocka/src/audio/mux/mux_get_processing_function.c @@ -40,10 +40,7 @@ static struct sof_ipc_comp_process *create_mux_comp_ipc(struct test_data *td) size_t ipc_size = sizeof(struct sof_ipc_comp_process); size_t mux_size = sizeof(struct sof_mux_config) + MUX_MAX_STREAMS * sizeof(struct mux_stream_data); - const struct sof_uuid uuid = { - .a = 0xc607ff4d, .b = 0x9cb6, .c = 0x49dc, - .d = {0xb6, 0x78, 0x7d, 0xa3, 0xc6, 0x3e, 0xa5, 0x57} - }; + const struct sof_uuid uuid = SOF_REG_UUID(mux); int i, j; ipc = calloc(1, ipc_size + mux_size + SOF_UUID_SIZE); diff --git a/tools/rimage/config/lnl.toml.h b/tools/rimage/config/lnl.toml.h index 7cb581fc357a..90ac20abbace 100644 --- a/tools/rimage/config/lnl.toml.h +++ b/tools/rimage/config/lnl.toml.h @@ -2,7 +2,7 @@ [[module.entry]] name = "BRNGUP" - uuid = "2B79E4F3-4675-F649-89DF-3BC194A91AEB" + uuid = UUIDREG_STR_BRNGUP affinity_mask = "0x1" instance_count = "1" domain_types = "0" @@ -15,7 +15,7 @@ #if CONFIG_COLD_STORE_EXECUTE_DRAM [[module.entry]] name = "COLD" - uuid = "D406D134-C3C1-402C-8AEC-6821C0C2B0E6" + uuid = UUIDREG_STR_COLD affinity_mask = "3" instance_count = "1" domain_types = "0" @@ -28,7 +28,7 @@ [[module.entry]] name = "BASEFW" - uuid = "0E398C32-5ADE-BA4B-93B1-C50432280EE4" + uuid = UUIDREG_STR_BASEFW affinity_mask = "3" instance_count = "1" domain_types = "0" diff --git a/tools/rimage/config/mtl.toml.h b/tools/rimage/config/mtl.toml.h index 9b44cbcfb67f..e950865bd264 100644 --- a/tools/rimage/config/mtl.toml.h +++ b/tools/rimage/config/mtl.toml.h @@ -2,7 +2,7 @@ [[module.entry]] name = "BRNGUP" - uuid = "2B79E4F3-4675-F649-89DF-3BC194A91AEB" + uuid = UUIDREG_STR_BRNGUP affinity_mask = "0x1" instance_count = "1" domain_types = "0" @@ -15,7 +15,7 @@ #if CONFIG_COLD_STORE_EXECUTE_DRAM [[module.entry]] name = "COLD" - uuid = "D406D134-C3C1-402C-8AEC-6821C0C2B0E6" + uuid = UUIDREG_STR_COLD affinity_mask = "3" instance_count = "1" domain_types = "0" @@ -28,7 +28,7 @@ [[module.entry]] name = "BASEFW" - uuid = "0E398C32-5ADE-BA4B-93B1-C50432280EE4" + uuid = UUIDREG_STR_BASEFW affinity_mask = "3" instance_count = "1" domain_types = "0" diff --git a/tools/rimage/config/ptl.toml.h b/tools/rimage/config/ptl.toml.h index 38f6c2adf597..a5ea6fb9ca51 100644 --- a/tools/rimage/config/ptl.toml.h +++ b/tools/rimage/config/ptl.toml.h @@ -2,7 +2,7 @@ [[module.entry]] name = "BRNGUP" -uuid = "2B79E4F3-4675-F649-89DF-3BC194A91AEB" +uuid = UUIDREG_STR_BRNGUP affinity_mask = "0x1" instance_count = "1" domain_types = "0" @@ -15,7 +15,7 @@ index = __COUNTER__ #if CONFIG_COLD_STORE_EXECUTE_DRAM [[module.entry]] name = "COLD" -uuid = "D406D134-C3C1-402C-8AEC-6821C0C2B0E6" +uuid = UUIDREG_STR_COLD affinity_mask = "3" instance_count = "1" domain_types = "0" @@ -28,7 +28,7 @@ index = __COUNTER__ [[module.entry]] name = "BASEFW" -uuid = "0E398C32-5ADE-BA4B-93B1-C50432280EE4" +uuid = UUIDREG_STR_BASEFW affinity_mask = "3" instance_count = "1" domain_types = "0" diff --git a/uuid-registry.txt b/uuid-registry.txt index f06a9f259a1c..4d77005ee1a7 100644 --- a/uuid-registry.txt +++ b/uuid-registry.txt @@ -165,3 +165,5 @@ d944281a-afe9-4695-a043d7f62b89538e waves 5f1ec3f8-faaf-4099-903ccee98351f169 zephyr_idc 8fa1d42f-bc6f-464b-867f547af08834da zipc_task 1547fe68-de0c-11eb-84613158a1294853 zll_sched +2B79E4F3-4675-F649-89DF3BC194A91AEB brngup +D406D134-C3C1-402C-8AEC6821C0C2B0E6 cold diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 567c03e5e5df..2d83911c884e 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -45,19 +45,6 @@ Building LLEXT targets must be serialized. This property contains the \ previously added LLEXT module for the establishment of a dependency chain." ) -# Used by LLEXT modules to create a file with module UUIDs -function(sof_llext_write_uuids module) - file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/../${module}.toml uuids REGEX "^[ \t]*uuid *=") - - set(UUIDS_LIST_FILE ${ZEPHYR_BINARY_DIR}/${module}_llext/llext.uuid) - file(REMOVE ${UUIDS_LIST_FILE}) - foreach(line IN LISTS uuids) - # extract UUID value - drop the 'uuid = ' part of the assignment line - string(REGEX REPLACE "^[ \t]*uuid *= \"([0-9A-F\-]*)\"" "\\1" uuid ${line}) - file(APPEND ${UUIDS_LIST_FILE} "${uuid}\n") - endforeach() -endfunction() - # Build an LLEXT module. Provice a module name, a list of sources and an address # of the .text section as arguments. function(sof_llext_build module) @@ -67,8 +54,6 @@ function(sof_llext_build module) cmake_path(SET SOF_BASE NORMALIZE ${APPLICATION_SOURCE_DIR}/..) - sof_llext_write_uuids(${module}) - add_llext_target(${module} OUTPUT ${PROJECT_BINARY_DIR}/${module}_llext/${module}.llext SOURCES ${SOF_LLEXT_SOURCES} @@ -91,6 +76,7 @@ function(sof_llext_build module) COMMAND ${CMAKE_C_COMPILER} -E ${CMAKE_CURRENT_LIST_DIR}/llext.toml.h -P -DREM= -I${SOF_BASE} -I${SOF_BASE}src -imacros ../include/generated/zephyr/autoconf.h + -imacros ../include/generated/uuid-registry.h -o rimage_config.toml ) @@ -111,6 +97,12 @@ function(sof_llext_build module) endif() set_property(GLOBAL PROPERTY SOF_LLEXT_LAST_TARGET ${module}) + add_llext_command(TARGET ${module} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -DMODULE=${module} -DZEPHYR_BINARY_DIR=${ZEPHYR_BINARY_DIR} + -P ${SOF_BASE}scripts/cmake/llext_write_uuids.cmake + ) + add_llext_command(TARGET ${module} POST_BUILD COMMAND ${PYTHON_EXECUTABLE} ${SOF_BASE}scripts/llext_link_helper.py -s ${size_file}