Skip to content

Conversation

@abonislawski
Copy link
Member

Add new type of test: TESTER_MODULE_CASE_SIMPLE_DRAM_TEST to test simple dram execution scenario


if (validate_l3_memory(tester_interface_simple_dram_test.init) != 0 ||
validate_l3_memory(tester_interface_simple_dram_test.process) != 0 ||
validate_l3_memory(tester_interface_simple_dram_test.free) != 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering whether this makes sense if the build does not support mapping cold section to DRAM, but I guess these checks will apply in that case as well and would signal an invalid build of the FW.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abonislawski the way relocations are resolved during dynamic linking, sometimes addresses of functions when examined and when jumped to might be different. E.g. in

    printf("about to call x() at %p\n", x);
    x();

doesn't guarantee that the address you print will be the same address that you jump to. In your above code I actually think it will be necessarily the same, but I'm not 100% sure and it's a bit at the compiler's discretion. To make absolutely sure when debugging I use __builtin_return_address(), e.g.

void *caller_addr(void)
{
    return __builtin_return_address(0);
}

__cold void x(void)
{
    printf("running at %p\n", caller_addr());
}

Would be good to use this here too (1) to make sure we run in DRAM, (2) to document this method for everybody to use for debugging. Maybe even actually make that caller_address() function available in SOF globally.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One open for me.


/* copy every second cycle */
*do_copy = data->do_copy_data;
data->do_copy_data = !data->do_copy_data;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why every second buffer instead of every buffer ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My plan was to do the same thing as existing TESTER_MODULE_CASE_DUMMY_TEST (switching do_copy) and make difference only in DRAM execution

Add new type of test: TESTER_MODULE_CASE_SIMPLE_DRAM_TEST
This will allow to test simple dram execution scenario

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
@lgirdwood lgirdwood merged commit 87fef1b into thesofproject:main Mar 2, 2025
45 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants