Skip to content

Commit

Permalink
goil: code: armv8: Fix ISR id mismatch
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
yhamamachi committed Mar 15, 2024
1 parent 9a3768b commit dbd52f9
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ foreach objList in objForSRC do
FUNC(void, OS_CODE) % !objList_KEY %_Handler(void)
{
%
let indexISR2 := 0
foreach obj in objList do
if obj::KIND == "ISR" then
# ISR 1
Expand All @@ -100,9 +99,8 @@ FUNC(void, OS_CODE) % !objList_KEY %_Handler(void)
if obj::CATEGORY == 2 then
# ISR2
%
tpl_central_interrupt_handler(% !([TASKS length] + indexISR2) %);
tpl_central_interrupt_handler(% !obj::NAME %_id);
%
let indexISR2 := indexISR2 + 1
else
error obj::CATEGORY : "This interrupt category ".obj::CATEGORY." does not exist"
end if
Expand Down

0 comments on commit dbd52f9

Please sign in to comment.