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

[pull] main from FreeRTOS:main #70

Open
wants to merge 435 commits into
base: main
Choose a base branch
from
Open

[pull] main from FreeRTOS:main #70

wants to merge 435 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Nov 28, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Nov 28, 2022
@codecov-commenter
Copy link

codecov-commenter commented Feb 15, 2023

Codecov Report

Merging #70 (c1980ce) into main (b3b097b) will increase coverage by 0.16%.
The diff coverage is 85.29%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
+ Coverage   94.30%   94.46%   +0.16%     
==========================================
  Files           6        6              
  Lines        2370     2422      +52     
  Branches      579      594      +15     
==========================================
+ Hits         2235     2288      +53     
  Misses         85       85              
+ Partials       50       49       -1     
Flag Coverage Δ
unittests 94.46% <85.29%> (+0.16%) ⬆️

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

Impacted Files Coverage Δ
event_groups.c 82.23% <82.23%> (+0.85%) ⬆️
list.c 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Skptak and others added 28 commits November 23, 2023 17:21
Co-authored-by: Rahul Kar <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
* Revert formatting on WizC ports

* Fix spelling mistakes

---------

Co-authored-by: Rahul Kar <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Currently the Coverity Scan attempts to run on every fork that pulls
the file. This leads to anybody who pulls this file getting emails that 
their workflow failed to run when the cron job attempts to run. This
PR sets the scan to only run if the repo is FreeRTOS/FreeRTOS-Kernel.
Also, change the scan from a cron job to a job that runs on a commit
to mainline, or if triggered manually.
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Rahul Kar <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
… current directory. The step either needed to have the working-directory: set to the build directory, or the tar file needs to be created in the parent directory. (#903)

Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
* The value of an expression shall not be assigned to an object with a narrower essential type or of a different essential type category.
---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Rahul Kar <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Fix MISRA 2012 rule 10.4 violations
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Rahul Kar <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Suppress MISRA C rule 11.3 in MISRA.md
* Revert "The curl command to send the report expects the tar file to be in its current directory. The step either needed to have the working-directory: set to the build directory, or the tar file needs to be created in the parent directory. (#903)"

This reverts commit 76f3aa5.

* Update to separate build and upload steps

---------

Co-authored-by: tony-josi-aws <[email protected]>
* Revert the formatting on Renesas ports
* Add the changes needed to the MSVC windows port to get it to build with winsock2.h
* Rely upon the WIN32_LEAN_AND_MEAN define to include winsock2.h
* Add portMEMORY_BARRIER() to RX MCU ports

* Remove the memory barrier from the SH2A_FPU portable directory

---------

Co-authored-by: Rahul Kar <[email protected]>
Co-authored-by: Tony Josi <[email protected]>
Co-authored-by: Soren Ptak <[email protected]>
Co-authored-by: Rahul Kar <[email protected]>
Co-authored-by: Nikhil Kamath <[email protected]>
* Add SMP template port and example
* Add readme file for smp configuration
* Update SMP build flow and add CI build

---------

Co-authored-by: Soren Ptak <[email protected]>
Co-authored-by: Rahul Kar <[email protected]>
* Update xTaskGetIdleTaskHandle() in SMP

This commit updates xTaskGetIdleTaskHandle() for SMP in the following ways:

- xTaskGetIdleTaskHandle() no longer accepts xCoreID argument in SMP so that
there is not change in API between single-core and SMP
- xTaskGetIdleTaskHandle() now returns the Active idle task handle in SMP,
which matches the behavior in single-core.
- Added xTaskGetIdleTaskHandleForCore() in SMP which accepts an xCoreID
argument. This function can be used to obtain the Passive idle task handles.

* Update xTaskGetIdleTaskHandle

---------

Co-authored-by: Ching-Hsin Lee <[email protected]>
Co-authored-by: chinglee-iot <[email protected]>
Co-authored-by: Rahul Kar <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
* Suppress MISRA C:2012 rule 11.5 deviations by comment also remove this rule in global config

---------

Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Rahul Kar <[email protected]>
Co-authored-by: Soren Ptak <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>
* Wrap macro parameter expansion by parentheses
* Update parentheses in SMP macro definition

---------

Co-authored-by: Soren Ptak <[email protected]>
Co-authored-by: Monika Singh <[email protected]>
Co-authored-by: chinglee-iot <[email protected]>
* Assign return value of xPortStartScheduler API to a variable

* Add void datatype

---------

Co-authored-by: chinglee-iot <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
* Add a u or U suffix for unsigned numerical literals

* Fix formatting

* Replace u with U for naming convention

---------

Co-authored-by: Soren Ptak <[email protected]>
Co-authored-by: chinglee-iot <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Co-authored-by: chinglee-iot <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Fix MISRA_C_2012 rule 8.4 violation
* Assign volatile variables to local non-volatile variables before read

* Fix stack macro overflow check volatile access

* Explicit the read order of volatile variable

* Fix issue : ISO C90 forbids mixed declarations and code



---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: chinglee-iot <[email protected]>
Co-authored-by: Monika Singh <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
* Fix MISRA C 2012 rule 8.6 errors

* Add suppression for hook function

Signed-off-by: Gaurav Aggarwal <[email protected]>

---------

Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Soren Ptak <[email protected]>
Co-authored-by: chinglee-iot <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
* Add description about overrun warning in queue.c

* Remove the unreachable configASSERT

* Code review suggestions

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Fix formatting

Signed-off-by: Gaurav Aggarwal <[email protected]>

---------

Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Soren Ptak <[email protected]>
Co-authored-by: Rahul Kar <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>
kstribrnAmzn and others added 30 commits October 31, 2024 21:33
Removes the 'u' prefix as the variable is no longer unsigned.
* Fix spelling

---------

Co-authored-by: Rahul Kar <[email protected]>
Fix variable name mismatch introduced by #1166.
Fix MPU v2 wrappers incorrectly using UBaseType_t instead
of BaseType.
GitHub recommends to store user inputs in environments variables
and then use them in scripts. This PR updates the code as per the
GitHub recommendation.

Details here - https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections.
…h. (#1185)

Move configASSERT default definition above before including portable.h.
…1176)

Related to #189

Update `configMTIMECMP_BASE_ADDRESS` to be stored in a 64-bit integer.

* Change the type of `ullMachineTimerCompareRegisterBase` to `uint64_t` in `portable/GCC/RISC-V/port.c`.
* Change the type of `ullMachineTimerCompareRegisterBase` to `uint64_t` in `portable/IAR/RISC-V/port.c`.
* Update the initialization of `ullMachineTimerCompareRegisterBase` to use `configMTIMECMP_BASE_ADDRESS` in both files.

Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
* Fix SMP debugging issue on rp2040

Related to #1172

Add `multicore_reset_core1` before `multicore_launch_core1` in `xPortStartScheduler` function to fix debugging issue on rp2040 with SMP enabled.

* Modify `portable/ThirdParty/GCC/RP2040/port.c` to include a call to `multicore_reset_core1` before `multicore_launch_core1` within the `#if portRUNNING_ON_BOTH_CORES` block.

* Recover comments back

---------

Co-authored-by: ActoryOu <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Co-authored-by: Rahul Kar <[email protected]>
Fix FPU stack order issue and Improve FPU checking flow
Fix Interrupt depth comparison logic
Fix parameter mismatch in portmacro.h file
Add comment to explain assembly code
This commit adds new API functionality to reset xMinimumEverFreeBytesRemaining.
This functionality provides ability to get heap statistics during a particular period of time.

Signed-off-by: Tomas Galbicka <[email protected]>
* Don't suspend scheduler if task already notified
The same was added to heap 4 in this PR - #1189.

Signed-off-by: Gaurav Aggarwal <[email protected]>
* Standardize on configNUMBER_OF_CORES != 1 to select SMP functionality
* Fix SDK pico_sync interoperability (configSUPPORT_PICO_SYNC_INTEROP == 1)

Co-authored-by: graham sanderson <[email protected]>
The PACBTI is an optional hardware security feature,
the current implementation assumes that every SoC that
has Armv8.1-M architecture extension, has the PACBTI
hardware feature, which does not have to be the case.
Hence, the `portHAS_PACBTI_FEATURE` is removed
and the implementation is modified to rely on
`configENABLE_PAC` and `configENABLE_BTI` macros
that can either be set using CMake or FreeRTOSConfig.h
header file.

Enabling PAC and/or BTI on a port variant that
doesn't have the PACBTI hardware feature would be
caught by a `configASSERT` statement.

Signed-off-by: Ahmed Ismail <[email protected]>
Co-authored-by: Tony Josi <[email protected]>
Add public dependency to hardware_sync because portable\ThirdParty\GCC\RP2040\include\portmacro.h exposes include "hardware/sync.h" to FreeRTOS.h which is PUBLIC.

Add private dependency to pico_multicore because of usage prvFIFOInterruptHandler() and sio_hw in portable/ThirdParty/GCC/RP2040/port.c.
Release tags use a capitalized V.
Our manifest tag is used by our SBOM
script to generate the URL and so
this needs to be capitalized to generate
a valid URL.
…g warning. (#1208)

Add macro guard to removed definition missing warning
…_ISR (#1207)

There is a regression issue introduced in
    cfc2688.
    This PR was intended to update MIT licensed header from v9 to v10.
    But it accidentally changed "portYIELD_FROM_ISR( x )" in MSVC-MingW/portmacro.h.
    It caused "portYIELD_FROM_ISR( x )" does not return correct value to "prvProcessSimulatedInterrupts".
s0–s15 (d0–d7, q0–q3) and d16–d31 (q8–q15) are caller save
register

Signed-off-by: wangfei_chen <[email protected]>
Co-authored-by: wangfei_chen <[email protected]>
* Pass core ID to CRITICAL_NESTING_COUNT macros

* Match existing data type for xCoreID

* Get core ID when interrupts are disabled

* Implement get core ID with interrupt disabled

* Get core ID inline within vTaskSuspendAll() to resolve compiler warning

* Fix formatting check

Signed-off-by: Gaurav Aggarwal <[email protected]>

---------

Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Ching-Hsin,Lee <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
These were reported here - #1210.

Signed-off-by: Gaurav Aggarwal <[email protected]>
…null-termination of the idle task name string (#1203)

* fix(freertos): Limit idle task name copy operation and ensure null termination

This commit:
- Limits the idle task name length copy operation to prevent
  Out-of-bounds memory access warnings from static code analyzers.
- Fixes a bug where in the idle task name could be non null-terminated
  string for SMP configuration.

Signed-off-by: Sudeep Mohanty <[email protected]>
…to tash.h (#1215)

* Add an example of human readable table generated by vTaskListTasks() to task.h
Pass core ID to task/ISR lock functions
…is set to 2. (#1216)

Add a stack pointer bounds check when configCHECK_FOR_STACK_OVERFLOW is set to 2.
The function vApplicationFPUSafeIRQHandler gets the value of ICCIAR as
parameter, but a constant containing the address of ICCIAR was also
defined. Fix the name of the constant to align it with what it actually
holds.
armv8.1-m: Add task dedicated PAC key

To harden the security, each task is assigned a dedicated PAC key, so that attackers needs to guess the all the tasks' PAC keys right to exploit the system using Return Oriented Programming.

The kernel is now updated to support the following:
* A PAC key set with a random number generated and is saved in the task's context when a task is created.
* As part of scheduling, the task's PAC key is stored/restored to/from the task's context when a task is unscheduled/scheduled from/to run.

stack-overflow-check: Introduce portGET_CURRENT_TOP_OF_STACK macro

When MPU wrapper v2 is used, the task's context is stored in TCB and `pxTopOfStack`` member of TCB points to the context location in TCB. We, therefore, need to read PSP to find the task's current top of stack.

Signed-off-by: Ahmed Ismail <[email protected]>
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.