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

Add support for vApplicationFPUSafeIRQHandler #1113

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

kar-rahul-aws
Copy link
Member

@kar-rahul-aws kar-rahul-aws commented Aug 7, 2024

Description

This PR adds support for vApplicationFPUSafeIRQHandler. The application writer needs to name their IRQ handler as:

  1. vApplicationIRQHandler if the IRQ handler does not use FPU registers.
  2. vApplicationFPUSafeIRQHandler is the IRQ handler uses FPU registers.

When the application uses vApplicationFPUSafeIRQHandler, a default implementation of vApplicationIRQHandler is used which stores FPU registers and then calls vApplicationFPUSafeIRQHandler.

Test Steps

Tested on ARM_CRx_No_GIC Demo with the code snippet

    __asm volatile ( "vmov d8, r0, r1       \n"
                     "vmov d9, r0, r1       \n"
                     "vmov d10, r0, r1      \n"
                     "vmov d11, r0, r1      \n"
                     "vmov d12, r0, r1      \n"
                     "vmov d13, r0, r1      \n"
                     "vmov d14, r0, r1      \n"
                     "vmov d15, r0, r1      \n"
                     ::: "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15" );

    __asm volatile ( "vmov d0, r0, r1       \n"
                     "vmov d1, r0, r1       \n"
                     "vmov d2, r0, r1       \n"
                     "vmov d3, r0, r1       \n"
                     "vmov d4, r0, r1       \n"
                     "vmov d5, r0, r1       \n"
                     "vmov d6, r0, r1       \n"
                     "vmov d7, r0, r1       \n"
                     ::: "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7" );

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kar-rahul-aws kar-rahul-aws requested a review from a team as a code owner August 7, 2024 16:32
Copy link

sonarcloud bot commented Aug 7, 2024

@aggarg aggarg changed the title Store FPU registers {D0-D7} in IRQ_Handler Add support for vApplicationFPUSafeIRQHandler Aug 7, 2024
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.31%. Comparing base (17dfd0f) to head (171129a).
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1113   +/-   ##
=======================================
  Coverage   92.31%   92.31%           
=======================================
  Files           6        6           
  Lines        3226     3228    +2     
  Branches      885      885           
=======================================
+ Hits         2978     2980    +2     
  Misses        132      132           
  Partials      116      116           
Flag Coverage Δ
unittests 92.31% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aggarg aggarg merged commit c963d24 into FreeRTOS:main Aug 8, 2024
18 checks passed
@aggarg aggarg deleted the update_CRx_No_GIC_port branch August 8, 2024 15:37
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.

3 participants