Skip to content

Commit 808009f

Browse files
committed
CRLF -> LF
1 parent d3f1c8d commit 808009f

738 files changed

Lines changed: 255558 additions & 203 deletions

File tree

Some content is hidden

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

bsp/sdk_overlay/rtos/freertos/freertos-kernel/portable/GCC/ARM_CM85_NTZ/non_secure/port.c

Lines changed: 1203 additions & 0 deletions
Large diffs are not rendered by default.

bsp/sdk_overlay/rtos/freertos/freertos-kernel/portable/GCC/ARM_CM85_NTZ/non_secure/portasm.c

Lines changed: 365 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
/*
2+
* FreeRTOS Kernel V10.5.0
3+
* Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* SPDX-License-Identifier: MIT
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
8+
* this software and associated documentation files (the "Software"), to deal in
9+
* the Software without restriction, including without limitation the rights to
10+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11+
* the Software, and to permit persons to whom the Software is furnished to do so,
12+
* subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23+
*
24+
* https://www.FreeRTOS.org
25+
* https://github.com/FreeRTOS
26+
*
27+
*/
28+
29+
#ifndef __PORT_ASM_H__
30+
#define __PORT_ASM_H__
31+
32+
/* Scheduler includes. */
33+
#include "FreeRTOS.h"
34+
35+
/* MPU wrappers includes. */
36+
#include "mpu_wrappers.h"
37+
38+
/**
39+
* @brief Restore the context of the first task so that the first task starts
40+
* executing.
41+
*/
42+
void vRestoreContextOfFirstTask( void ) __attribute__( ( naked ) ) PRIVILEGED_FUNCTION;
43+
44+
/**
45+
* @brief Checks whether or not the processor is privileged.
46+
*
47+
* @return 1 if the processor is already privileged, 0 otherwise.
48+
*/
49+
BaseType_t xIsPrivileged( void ) __attribute__( ( naked ) );
50+
51+
/**
52+
* @brief Raises the privilege level by clearing the bit 0 of the CONTROL
53+
* register.
54+
*
55+
* @note This is a privileged function and should only be called from the kenrel
56+
* code.
57+
*
58+
* Bit 0 of the CONTROL register defines the privilege level of Thread Mode.
59+
* Bit[0] = 0 --> The processor is running privileged
60+
* Bit[0] = 1 --> The processor is running unprivileged.
61+
*/
62+
void vRaisePrivilege( void ) __attribute__( ( naked ) ) PRIVILEGED_FUNCTION;
63+
64+
/**
65+
* @brief Lowers the privilege level by setting the bit 0 of the CONTROL
66+
* register.
67+
*
68+
* Bit 0 of the CONTROL register defines the privilege level of Thread Mode.
69+
* Bit[0] = 0 --> The processor is running privileged
70+
* Bit[0] = 1 --> The processor is running unprivileged.
71+
*/
72+
void vResetPrivilege( void ) __attribute__( ( naked ) );
73+
74+
/**
75+
* @brief Starts the first task.
76+
*/
77+
void vStartFirstTask( void ) __attribute__( ( naked ) ) PRIVILEGED_FUNCTION;
78+
79+
/**
80+
* @brief Disables interrupts.
81+
*/
82+
uint32_t ulSetInterruptMask( void ) __attribute__( ( naked ) ) PRIVILEGED_FUNCTION;
83+
84+
/**
85+
* @brief Enables interrupts.
86+
*/
87+
void vClearInterruptMask( uint32_t ulMask ) __attribute__( ( naked ) ) PRIVILEGED_FUNCTION;
88+
89+
/**
90+
* @brief PendSV Exception handler.
91+
*/
92+
void PendSV_Handler( void ) __attribute__( ( naked ) ) PRIVILEGED_FUNCTION;
93+
94+
/**
95+
* @brief SVC Handler.
96+
*/
97+
void SVC_Handler( void ) __attribute__( ( naked ) ) PRIVILEGED_FUNCTION;
98+
99+
/**
100+
* @brief Allocate a Secure context for the calling task.
101+
*
102+
* @param[in] ulSecureStackSize The size of the stack to be allocated on the
103+
* secure side for the calling task.
104+
*/
105+
void vPortAllocateSecureContext( uint32_t ulSecureStackSize ) __attribute__( ( naked ) );
106+
107+
/**
108+
* @brief Free the task's secure context.
109+
*
110+
* @param[in] pulTCB Pointer to the Task Control Block (TCB) of the task.
111+
*/
112+
void vPortFreeSecureContext( uint32_t * pulTCB ) __attribute__( ( naked ) ) PRIVILEGED_FUNCTION;
113+
114+
#endif /* __PORT_ASM_H__ */
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
* FreeRTOS Kernel V10.5.0
3+
* Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* SPDX-License-Identifier: MIT
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
8+
* this software and associated documentation files (the "Software"), to deal in
9+
* the Software without restriction, including without limitation the rights to
10+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11+
* the Software, and to permit persons to whom the Software is furnished to do so,
12+
* subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23+
*
24+
* https://www.FreeRTOS.org
25+
* https://github.com/FreeRTOS
26+
*
27+
*/
28+
29+
#ifndef PORTMACRO_H
30+
#define PORTMACRO_H
31+
32+
#ifdef __cplusplus
33+
extern "C" {
34+
#endif
35+
36+
#include "portmacrocommon.h"
37+
38+
/*------------------------------------------------------------------------------
39+
* Port specific definitions.
40+
*
41+
* The settings in this file configure FreeRTOS correctly for the given hardware
42+
* and compiler.
43+
*
44+
* These settings should not be altered.
45+
*------------------------------------------------------------------------------
46+
*/
47+
48+
#ifndef configENABLE_MVE
49+
#error configENABLE_MVE must be defined in FreeRTOSConfig.h. Set configENABLE_MVE to 1 to enable the MVE or 0 to disable the MVE.
50+
#endif /* configENABLE_MVE */
51+
/*-----------------------------------------------------------*/
52+
53+
/**
54+
* Architecture specifics.
55+
*/
56+
#define portARCH_NAME "Cortex-M85"
57+
#define portDONT_DISCARD __attribute__( ( used ) )
58+
/*-----------------------------------------------------------*/
59+
60+
/**
61+
* @brief Critical section management.
62+
*/
63+
#define portDISABLE_INTERRUPTS() ulSetInterruptMask()
64+
#define portENABLE_INTERRUPTS() vClearInterruptMask( 0 )
65+
/*-----------------------------------------------------------*/
66+
67+
#ifdef __cplusplus
68+
}
69+
#endif
70+
71+
#endif /* PORTMACRO_H */

0 commit comments

Comments
 (0)