Skip to content
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

goil: code: armv8: Fix ISR id mismatch #162

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

yhamamachi
Copy link
Contributor

Currently, interrupt handler has same id so that interrupt doesn't work correctly on envrionment which has multiple ISR.
This is caused by the scope of indexISR2 variable.

And, even if this issue is fixed, function order and index is not matched always because function order is change by priotiry. So, non-expected function may be called.

Thus, this patch fixes to use defined variable instead of index.


I tested by using Whitebox SDK v5.x-dev branch which contains following patch.
renesas-rcar/whitebox-sdk@4b2d930

Log without patch:

-> % grep tpl_central_interrupt_handler examples/cortex-a-r/armv8/spider/sample/sample/*
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(5);
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(5);
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(5);
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(5);
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(5);
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(5);

Log with patch:

-> % grep tpl_central_interrupt_handler examples/cortex-a-r/armv8/spider/sample/sample/*
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(coma_err_int_id);
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(etha1_err_int_id);
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(gwca0_err_int_id);
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(gwca0_rx_ts_int_id);
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(gwca0_rx_tx_int_id);
examples/cortex-a-r/armv8/spider/sample/sample/tpl_app_config.c:  tpl_central_interrupt_handler(iccomInt_id);

Currently, interrupt handler has same id so that interrupt doesn't work
correctly on envrionment which has multiple ISR.
This is caused by the scope of indexISR2 variable.

And, even if this issue is fixed, function order and index is not
matched always because function order is change by priotiry.
So, non-expected function may be called.

Thus, this patch fixes to use defined variable instead of index.

Signed-off-by: Yuya Hamamachi <yuya.hamamachi.sx@renesas.com>
@RICCIARDI-Adrien
Copy link
Contributor

Hi @fsylvestre, do you want to take a look ? I did not work on this part and I'm not a Goil expert at all !

@fsylvestre
Copy link
Contributor

The patch seems great. (Surprised that we have missed that, but could probably explain why some corner cases could generate some failures)

@fsylvestre fsylvestre merged commit 1ff0f13 into TrampolineRTOS:master Mar 20, 2024
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants