-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug: tester: add simple DRAM execution test #9866
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.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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; |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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>
bceb8f3
to
69a747f
Compare
Add new type of test: TESTER_MODULE_CASE_SIMPLE_DRAM_TEST to test simple dram execution scenario