debug: tester: add simple DRAM execution test#9866
debug: tester: add simple DRAM execution test#9866lgirdwood merged 1 commit intothesofproject:mainfrom
Conversation
|
|
||
| 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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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 every second cycle */ | ||
| *do_copy = data->do_copy_data; | ||
| data->do_copy_data = !data->do_copy_data; |
There was a problem hiding this comment.
Just curious, why every second buffer instead of every buffer ?
There was a problem hiding this comment.
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>
bceb8f3 to
69a747f
Compare
Add new type of test: TESTER_MODULE_CASE_SIMPLE_DRAM_TEST to test simple dram execution scenario