Skip to content

Commit cd06778

Browse files
authored
Merge branch 'main' into feature/smp_granular_locks_v4
2 parents 8fe9539 + 7d76dce commit cd06778

File tree

193 files changed

+2733
-378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+2733
-378
lines changed

.github/.cSpellWords.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ MAINRDY
448448
MAIR
449449
Mang
450450
Mbits
451+
mbranch
451452
mcause
452453
MCFR
453454
MCKA
@@ -586,6 +587,8 @@ OWATCOM
586587
OWDR
587588
OWER
588589
OWSR
590+
pacbti
591+
PACBTI
589592
PAGEN
590593
PCDR
591594
PCER
@@ -900,6 +903,7 @@ TXTEN
900903
TXUBR
901904
TXVC
902905
TXVDIS
906+
UBTI
903907
UDCP
904908
UNACKED
905909
uncrustify
@@ -915,6 +919,7 @@ UNSUB
915919
UNSUBACK
916920
unsubscriptions
917921
unsuspended
922+
UPAC
918923
URAD
919924
URAT
920925
URSTEN

.github/scripts/kernel_checker.py

Lines changed: 91 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
# */
2929

3030
import os
31+
import re
3132
from common.header_checker import HeaderChecker
3233

3334
#--------------------------------------------------------------------------------------------------
@@ -106,6 +107,15 @@
106107
r'.*portable/GCC/AVR32_UC3/.*',
107108
]
108109

110+
KERNEL_ARM_COLLAB_FILES_PATTERNS = [
111+
r'.*portable/ARMv8M/*',
112+
r'.*portable/.*/ARM_CM23*',
113+
r'.*portable/.*/ARM_CM33*',
114+
r'.*portable/.*/ARM_CM35*',
115+
r'.*portable/.*/ARM_CM55*',
116+
r'.*portable/.*/ARM_CM85*',
117+
]
118+
109119
KERNEL_HEADER = [
110120
'/*\n',
111121
' * FreeRTOS Kernel <DEVELOPMENT BRANCH>\n',
@@ -139,19 +149,92 @@
139149

140150
FREERTOS_COPYRIGHT_REGEX = r"^(;|#)?( *(\/\*|\*|#|\/\/))? Copyright \(C\) 20\d\d Amazon.com, Inc. or its affiliates. All Rights Reserved\.( \*\/)?$"
141151

152+
FREERTOS_ARM_COLLAB_COPYRIGHT_REGEX = r"(^(;|#)?( *(\/\*|\*|#|\/\/))? Copyright \(C\) 20\d\d Amazon.com, Inc. or its affiliates. All Rights Reserved\.( \*\/)?$)|" + \
153+
r"(^(;|#)?( *(\/\*|\*|#|\/\/))? Copyright 20\d\d Arm Limited and/or its affiliates( \*\/)?$)|" + \
154+
r"(^(;|#)?( *(\/\*|\*|#|\/\/))? <[email protected]>( \*\/)?$)"
155+
156+
157+
class KernelHeaderChecker(HeaderChecker):
158+
def __init__(
159+
self,
160+
header,
161+
padding=1000,
162+
ignored_files=None,
163+
ignored_ext=None,
164+
ignored_patterns=None,
165+
py_ext=None,
166+
asm_ext=None,
167+
third_party_patterns=None,
168+
copyright_regex = None
169+
):
170+
super().__init__(header, padding, ignored_files, ignored_ext, ignored_patterns,
171+
py_ext, asm_ext, third_party_patterns, copyright_regex)
172+
173+
self.armCollabRegex = re.compile(FREERTOS_ARM_COLLAB_COPYRIGHT_REGEX)
174+
175+
self.armCollabFilesPatternList = []
176+
for pattern in KERNEL_ARM_COLLAB_FILES_PATTERNS:
177+
self.armCollabFilesPatternList.append(re.compile(pattern))
178+
179+
def isArmCollabFile(self, path):
180+
for pattern in self.armCollabFilesPatternList:
181+
if pattern.match(path):
182+
return True
183+
return False
184+
185+
def checkArmCollabFile(self, path):
186+
isValid = False
187+
file_ext = os.path.splitext(path)[-1]
188+
189+
with open(path, encoding="utf-8", errors="ignore") as file:
190+
chunk = file.read(len("".join(self.header)) + self.padding)
191+
lines = [("%s\n" % line) for line in chunk.strip().splitlines()][
192+
: len(self.header) + 2
193+
]
194+
if (len(lines) > 0) and (lines[0].find("#!") == 0):
195+
lines.remove(lines[0])
196+
197+
# Split lines in sections.
198+
headers = dict()
199+
headers["text"] = []
200+
headers["copyright"] = []
201+
headers["spdx"] = []
202+
for line in lines:
203+
if self.armCollabRegex.match(line):
204+
headers["copyright"].append(line)
205+
elif "SPDX-License-Identifier:" in line:
206+
headers["spdx"].append(line)
207+
else:
208+
headers["text"].append(line)
209+
210+
text_equal = self.isValidHeaderSection(file_ext, "text", headers["text"])
211+
spdx_equal = self.isValidHeaderSection(file_ext, "spdx", headers["spdx"])
212+
213+
if text_equal and spdx_equal and len(headers["copyright"]) == 3:
214+
isValid = True
215+
216+
return isValid
217+
218+
def customCheck(self, path):
219+
isValid = False
220+
if self.isArmCollabFile(path):
221+
isValid = self.checkArmCollabFile(path)
222+
return isValid
223+
224+
142225
def main():
143226
parser = HeaderChecker.configArgParser()
144227
args = parser.parse_args()
145228

146229
# Configure the checks then run
147-
checker = HeaderChecker(KERNEL_HEADER,
148-
copyright_regex=FREERTOS_COPYRIGHT_REGEX,
149-
ignored_files=KERNEL_IGNORED_FILES,
150-
ignored_ext=KERNEL_IGNORED_EXTENSIONS,
151-
ignored_patterns=KERNEL_IGNORED_PATTERNS,
152-
third_party_patterns=KERNEL_THIRD_PARTY_PATTERNS,
153-
py_ext=KERNEL_PY_EXTENSIONS,
154-
asm_ext=KERNEL_ASM_EXTENSIONS)
230+
checker = KernelHeaderChecker(KERNEL_HEADER,
231+
copyright_regex=FREERTOS_COPYRIGHT_REGEX,
232+
ignored_files=KERNEL_IGNORED_FILES,
233+
ignored_ext=KERNEL_IGNORED_EXTENSIONS,
234+
ignored_patterns=KERNEL_IGNORED_PATTERNS,
235+
third_party_patterns=KERNEL_THIRD_PARTY_PATTERNS,
236+
py_ext=KERNEL_PY_EXTENSIONS,
237+
asm_ext=KERNEL_ASM_EXTENSIONS)
155238
checker.ignoreFile(os.path.split(__file__)[-1])
156239

157240
rc = checker.processArgs(args)

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,18 @@ if(NOT FREERTOS_PORT)
138138
" IAR_ARM_CM33_NONSECURE - Compiler: IAR Target: ARM Cortex-M33 non-secure\n"
139139
" IAR_ARM_CM33_SECURE - Compiler: IAR Target: ARM Cortex-M33 secure\n"
140140
" IAR_ARM_CM33_NTZ_NONSECURE - Compiler: IAR Target: ARM Cortex-M33 non-trustzone non-secure\n"
141+
" IAR_ARM_CM33_TFM - Compiler: IAR Target: ARM Cortex-M33 non-secure for TF-M\n"
141142
" IAR_ARM_CM35P_NONSECURE - Compiler: IAR Target: ARM Cortex-M35P non-secure\n"
142143
" IAR_ARM_CM35P_SECURE - Compiler: IAR Target: ARM Cortex-M35P secure\n"
143144
" IAR_ARM_CM35P_NTZ_NONSECURE - Compiler: IAR Target: ARM Cortex-M35P non-trustzone non-secure\n"
144145
" IAR_ARM_CM55_NONSECURE - Compiler: IAR Target: ARM Cortex-M55 non-secure\n"
145146
" IAR_ARM_CM55_SECURE - Compiler: IAR Target: ARM Cortex-M55 secure\n"
146147
" IAR_ARM_CM55_NTZ_NONSECURE - Compiler: IAR Target: ARM Cortex-M55 non-trustzone non-secure\n"
148+
" IAR_ARM_CM55_TFM - Compiler: IAR Target: ARM Cortex-M55 non-secure for TF-M\n"
147149
" IAR_ARM_CM85_NONSECURE - Compiler: IAR Target: ARM Cortex-M85 non-secure\n"
148150
" IAR_ARM_CM85_SECURE - Compiler: IAR Target: ARM Cortex-M85 secure\n"
149151
" IAR_ARM_CM85_NTZ_NONSECURE - Compiler: IAR Target: ARM Cortex-M85 non-trustzone non-secure\n"
152+
" IAR_ARM_CM85_TFM - Compiler: IAR Target: ARM Cortex-M85 non-secure for TF-M\n"
150153
" IAR_ARM_CRX_NOGIC - Compiler: IAR Target: ARM Cortex-Rx no GIC\n"
151154
" IAR_ATMEGA323 - Compiler: IAR Target: ATMega323\n"
152155
" IAR_ATMEL_SAM7S64 - Compiler: IAR Target: Atmel SAM7S64\n"

History.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ Changes between FreeRTOS V10.4.3 and FreeRTOS V10.4.4 released May 28 2021
528528
in more files.
529529
+ Other minor updates include adding additional configASSERT() checks and
530530
correcting and improving code comments.
531-
+ Go look at the smp branch to see the progress towards the Symetric
531+
+ Go look at the smp branch to see the progress towards the Symmetric
532532
Multiprocessing Kernel. https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/smp
533533

534534
Changes between FreeRTOS V10.4.2 and FreeRTOS V10.4.3 released December 14 2020
@@ -2015,7 +2015,7 @@ Changes between V6.1.0 and V6.1.1 released January 14 2011
20152015
Embedded Workbench.
20162016
+ Added a new port for the MSP430X core using the IAR Embedded Workbench.
20172017
+ Updated all the RX62N demo projects that target the Renesas Demonstration
2018-
Kit (RDK) to take into account the revered LED wiring on later hardware
2018+
Kit (RDK) to take into account the reversed LED wiring on later hardware
20192019
revisions, and the new J-Link debug interface DLL.
20202020
+ Updated all the RX62N demo projects so the IO page served by the example
20212021
embedded web server works with all web browsers.
@@ -3174,7 +3174,7 @@ Changes between V1.2.3 and V1.2.4
31743174
xSerialPortInitMinimal() and the function xPortInit() has been renamed
31753175
to xSerialPortInit().
31763176
+ The function sSerialPutChar() has been renamed cSerialPutChar() and
3177-
the function return type chaned to portCHAR.
3177+
the function return type changed to portCHAR.
31783178
+ The integer and flop tasks now include calls to tskYIELD(), allowing
31793179
them to be used with the cooperative scheduler.
31803180
+ All the demo applications now use the integer and comtest tasks when the
@@ -3308,7 +3308,7 @@ Changes between V1.01 and V1.2.0
33083308
ports to allocate a different maximum number of priorities.
33093309
+ By default the trace facility is off, previously USE_TRACE_FACILITY
33103310
was defined.
3311-
+ comtest.c now uses a psuedo random delay between sends. This allows for
3311+
+ comtest.c now uses a pseudo random delay between sends. This allows for
33123312
better testing as the interrupts do not arrive at regular intervals.
33133313
+ Minor change to the Flashlite serial port driver. The driver is written
33143314
to demonstrate the scheduler and is not written to be efficient.

examples/coverity/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ files.
1717

1818
## Getting Started
1919
### Prerequisites
20-
Coverity can be run on any platform mentioned [here](https://sig-docs.synopsys.com/polaris/topics/c_coverity-compatible-platforms.html).
20+
Coverity can be run on any platform mentioned [here](https://documentation.blackduck.com/bundle/coverity-docs/page/deploy-install-guide/topics/supported_platforms_for_coverity_analysis.html).
2121
The following are the prerequisites to generate coverity report:
2222

2323
1. CMake version > 3.13.0 (You can check whether you have this by typing `cmake --version`).
@@ -35,7 +35,7 @@ commands in a terminal:
3535
~~~
3636
2. Create the build files using CMake in a `build` directory:
3737

38-
Singe core FreeRTOS:
38+
Single core FreeRTOS:
3939
~~~
4040
cmake -B build -S examples/coverity
4141
~~~

examples/template_configuration/FreeRTOSConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@
643643
* contain the most recent error for that task. */
644644
#define configUSE_POSIX_ERRNO 0
645645

646-
/* Set the following INCLUDE_* constants to 1 to incldue the named API function,
646+
/* Set the following INCLUDE_* constants to 1 to include the named API function,
647647
* or 0 to exclude the named API function. Most linkers will remove unused
648648
* functions even when the constant is 1. */
649649
#define INCLUDE_vTaskPrioritySet 1

include/FreeRTOS.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3185,6 +3185,18 @@
31853185
#define configCONTROL_INFINITE_LOOP()
31863186
#endif
31873187

3188+
/* Set configENABLE_PAC and/or configENABLE_BTI to 1 to enable PAC and/or BTI
3189+
* support and 0 to disable them. These are currently used in ARMv8.1-M ports. */
3190+
#if ( portHAS_PACBTI_FEATURE == 1 )
3191+
#ifndef configENABLE_PAC
3192+
#define configENABLE_PAC 0
3193+
#endif
3194+
3195+
#ifndef configENABLE_BTI
3196+
#define configENABLE_BTI 0
3197+
#endif
3198+
#endif
3199+
31883200
/* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
31893201
* dynamically allocated RAM, in which case when any task is deleted it is known
31903202
* that both the task's stack and TCB need to be freed. Sometimes the

include/mpu_prototypes.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ BaseType_t MPU_xTimerGenericCommandFromTask( TimerHandle_t xTimer,
335335
BaseType_t MPU_xTimerGenericCommandFromTaskEntry( const xTimerGenericCommandFromTaskParams_t * pxParams ) FREERTOS_SYSTEM_CALL;
336336
const char * MPU_pcTimerGetName( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL;
337337
void MPU_vTimerSetReloadMode( TimerHandle_t xTimer,
338-
const BaseType_t uxAutoReload ) FREERTOS_SYSTEM_CALL;
338+
const BaseType_t xAutoReload ) FREERTOS_SYSTEM_CALL;
339339
BaseType_t MPU_xTimerGetReloadMode( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL;
340340
UBaseType_t MPU_uxTimerGetReloadMode( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL;
341341
TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL;
@@ -346,12 +346,12 @@ TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer ) FREERTOS_SYSTEM_CALL;
346346
* with all the APIs. */
347347
TimerHandle_t MPU_xTimerCreate( const char * const pcTimerName,
348348
const TickType_t xTimerPeriodInTicks,
349-
const UBaseType_t uxAutoReload,
349+
const BaseType_t xAutoReload,
350350
void * const pvTimerID,
351351
TimerCallbackFunction_t pxCallbackFunction ) PRIVILEGED_FUNCTION;
352352
TimerHandle_t MPU_xTimerCreateStatic( const char * const pcTimerName,
353353
const TickType_t xTimerPeriodInTicks,
354-
const UBaseType_t uxAutoReload,
354+
const BaseType_t xAutoReload,
355355
void * const pvTimerID,
356356
TimerCallbackFunction_t pxCallbackFunction,
357357
StaticTimer_t * pxTimerBuffer ) PRIVILEGED_FUNCTION;

include/task.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2386,7 +2386,7 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION;
23862386
*
23872387
* WARN: This function assumes that the pcWriteBuffer is of length
23882388
* configSTATS_BUFFER_MAX_LENGTH. This function is there only for
2389-
* backward compatiblity. New applications are recommended to use
2389+
* backward compatibility. New applications are recommended to use
23902390
* vTaskGetRunTimeStatistics and supply the length of the pcWriteBuffer
23912391
* explicitly.
23922392
*

0 commit comments

Comments
 (0)