Skip to content

Conversation

Skptak
Copy link
Contributor

@Skptak Skptak commented Mar 5, 2024

Description

In the MPU Wrappers functions registers are pushed to determine if the CPU is operating in a privileged mode
These registers are currently restored after the branch instruction, leading to a duplicate pop instruction being placed into each MPU wrapper function.
This PR moves the pop to be before the branch is taken, removing the duplicate instruction.

Test Steps

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.

Related Issue

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

Skptak added 13 commits March 5, 2024 10:00
… duplicate pop instruction in mpu_wrappers_v2_asm
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.00%. Comparing base (6dcce92) to head (bf66205).

Additional details and impacted files
@@ Coverage Diff @@ ## main #1008 +/- ## ======================================= Coverage 93.00% 93.00% ======================================= Files 6 6 Lines 3200 3200 Branches 879 879 ======================================= Hits 2976 2976 Misses 111 111 Partials 113 113 
Flag Coverage Δ
unittests 93.00% <ø> (ø)

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.

@Skptak Skptak requested a review from a team as a code owner March 18, 2024 08:45
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@kar-rahul-aws kar-rahul-aws merged commit 625b24a into FreeRTOS:main Mar 18, 2024
@Skptak Skptak deleted the RemoveDuplicatePopFromMPUWrappers branch April 2, 2024 01:25
laroche pushed a commit to laroche/FreeRTOS-Kernel that referenced this pull request Apr 18, 2024
laroche pushed a commit to laroche/FreeRTOS-Kernel that referenced this pull request Apr 18, 2024
….(32bit/64bit) (FreeRTOS#1199) * [WIN32-MingW Demo] Add tick type width definition based on compiler type.(32bit/64bit) 32bit TickType_t is used if compiler is MinGW32. 64bit TickType_t is used if compiler is MinGW64. Reason of change: Before this change, 32bit TickType_t is always used in MinGW demo. It is inefficient for 64bit compiler. In addition, MinGW64 reported warnings for the cast operation between TickType_t and (void *) pointer because of different width. 64bit TickType_t should be used instead of 32bit if compiler is 64bit. * [WIN32-MingW Demo] Change printf() format specifiers from %u to %llu. Reason of change: %u specifier corrupts 64bit tick count because it supports only 32bit value. %llu can be used for both of 64bit value and 32bit value.(After casting to 64bit) * [WIN32-MingW Demo] Change type of some variables from uint32_t to UBaseType_t. Reason of change: These variables are cast to/from pointer type in existing codes. 64bit compiler(MinGW64) reports warnings for the cast operations between uint32_t and pointer type. UBaseType_t solves those warnings because it has same width as pointer type on both of MinGW32 and MinGW64. * [WIN32-MingW Demo] Change type of some variables from uint32_t to UBaseType_t. Same change as previous commit is applied to source codes which are built only on Debug configuration. * [WIN32-MingW Demo] Add brackets to the condition in #if statement. Behavior is not changed. Reason of change is to follow coding style guide of FreeRTOS. * Update "FreeRTOS/Source" submodule(FreeRTOS-kernel) to FreeRTOS#1008. * [WIN32-MingW Demo] Change type of one more variable from uint32_t to UBaseType_t. Additional modification for solving compiler warnings for the cast operation on MinGW64. * Update FreeRTOS-kernel submodule version in manifest.yml. * Modify prefix of variables to follow coding style guide. * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: ActoryOu <ousc@amazon.com> Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants