From f3b1bd3859811a6ff5227b8f3a19de39cb57cefd Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 4 Jun 2021 14:50:58 +0000 Subject: [PATCH] Fixed documentation tags. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14469 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/common/ports/ARM/chcore_timer.h | 2 +- os/common/ports/ARMv6-M-RP2/chcore.c | 2 +- os/common/ports/ARMv6-M-RP2/chcore.h | 2 +- os/common/ports/ARMv6-M-RP2/chcore_timer.h | 2 +- .../ARMv6-M-RP2/compilers/GCC/chcoreasm.S | 2 +- .../ports/ARMv6-M-RP2/compilers/GCC/chtypes.h | 4 +- os/common/ports/ARMv6-M/chcore.c | 2 +- os/common/ports/ARMv6-M/chcore.h | 2 +- os/common/ports/ARMv6-M/chcore_timer.h | 4 +- .../ports/ARMv6-M/compilers/GCC/chcoreasm.S | 2 +- .../ports/ARMv6-M/compilers/GCC/chtypes.h | 2 +- .../ports/ARMv6-M/compilers/IAR/chcoreasm.s | 2 +- .../ports/ARMv6-M/compilers/IAR/chtypes.h | 2 +- .../ports/ARMv6-M/compilers/RVCT/chcoreasm.s | 2 +- .../ports/ARMv6-M/compilers/RVCT/chtypes.h | 2 +- os/common/ports/ARMv7-M/chcore.c | 2 +- os/common/ports/ARMv7-M/chcore.h | 2 +- os/common/ports/ARMv7-M/chcore_timer.h | 2 +- .../ports/ARMv7-M/compilers/GCC/chcoreasm.S | 2 +- .../ports/ARMv7-M/compilers/GCC/chtypes.h | 2 +- .../ports/ARMv7-M/compilers/IAR/chcoreasm.s | 2 +- .../ports/ARMv7-M/compilers/IAR/chtypes.h | 6 +- .../ports/ARMv7-M/compilers/RVCT/chcoreasm.s | 2 +- .../ports/ARMv7-M/compilers/RVCT/chtypes.h | 6 +- os/common/ports/ARMv7-M/mpu.h | 2 +- os/common/ports/ARMv8-M-ML-TZ/chcore.c | 6 +- os/common/ports/ARMv8-M-ML-TZ/chcore.h | 19 ++--- os/common/ports/ARMv8-M-ML-TZ/chcore_timer.h | 2 +- os/common/ports/ARMv8-M-ML-TZ/chtypes.h | 83 ++++++++++--------- .../ARMv8-M-ML-TZ/compilers/GCC/chcoreasm.S | 8 +- os/common/ports/ARMv8-M-ML-TZ/mpu_v8m.h | 61 -------------- os/common/ports/ARMv8-M-ML/chcore.c | 2 +- os/common/ports/ARMv8-M-ML/chcore.h | 15 ++-- os/common/ports/ARMv8-M-ML/chcore_timer.h | 4 +- .../ARMv8-M-ML/compilers/GCC/chcoreasm.S | 2 +- .../ports/ARMv8-M-ML/compilers/GCC/chtypes.h | 4 +- 36 files changed, 105 insertions(+), 163 deletions(-) delete mode 100644 os/common/ports/ARMv8-M-ML-TZ/mpu_v8m.h diff --git a/os/common/ports/ARM/chcore_timer.h b/os/common/ports/ARM/chcore_timer.h index 145a6bb3d..86d94d514 100644 --- a/os/common/ports/ARM/chcore_timer.h +++ b/os/common/ports/ARM/chcore_timer.h @@ -18,7 +18,7 @@ */ /** - * @file chcore_timer.h + * @file ARM/chcore_timer.h * @brief System timer header file. * * @addtogroup ARM_TIMER diff --git a/os/common/ports/ARMv6-M-RP2/chcore.c b/os/common/ports/ARMv6-M-RP2/chcore.c index 35c4d9731..be2b39f07 100644 --- a/os/common/ports/ARMv6-M-RP2/chcore.c +++ b/os/common/ports/ARMv6-M-RP2/chcore.c @@ -21,7 +21,7 @@ * @file ARMv6-M-RP2/chcore.c * @brief ARMv6-M-RP2 port code. * - * @addtogroup ARMv6_M_RP2_CORE + * @addtogroup ARMV6M_RP2_CORE * @{ */ diff --git a/os/common/ports/ARMv6-M-RP2/chcore.h b/os/common/ports/ARMv6-M-RP2/chcore.h index 22d363eec..2e24df418 100644 --- a/os/common/ports/ARMv6-M-RP2/chcore.h +++ b/os/common/ports/ARMv6-M-RP2/chcore.h @@ -21,7 +21,7 @@ * @file ARMv6-M-RP2/chcore.h * @brief ARMv6-M-RP2 port macros and structures. * - * @addtogroup ARMv6_M_RP2_CORE + * @addtogroup ARMV6M_RP2_CORE * @{ */ diff --git a/os/common/ports/ARMv6-M-RP2/chcore_timer.h b/os/common/ports/ARMv6-M-RP2/chcore_timer.h index 4d3712e14..4f522e6db 100644 --- a/os/common/ports/ARMv6-M-RP2/chcore_timer.h +++ b/os/common/ports/ARMv6-M-RP2/chcore_timer.h @@ -21,7 +21,7 @@ * @file ARMv6-M-RP2/chcore_timer.h * @brief System timer header file. * - * @addtogroup ARMv6_M_RP2_TIMER + * @addtogroup ARMV6M_RP2_TIMER * @{ */ diff --git a/os/common/ports/ARMv6-M-RP2/compilers/GCC/chcoreasm.S b/os/common/ports/ARMv6-M-RP2/compilers/GCC/chcoreasm.S index c655f458f..0c5f3061f 100644 --- a/os/common/ports/ARMv6-M-RP2/compilers/GCC/chcoreasm.S +++ b/os/common/ports/ARMv6-M-RP2/compilers/GCC/chcoreasm.S @@ -21,7 +21,7 @@ * @file ARMv6-M-RP2/compilers/GCC/chcoreasm.S * @brief ARMv6-M-RP2 port low level code. * - * @addtogroup ARMv6_M_RP2_GCC_CORE + * @addtogroup ARMV6M_RP2_GCC_CORE * @{ */ diff --git a/os/common/ports/ARMv6-M-RP2/compilers/GCC/chtypes.h b/os/common/ports/ARMv6-M-RP2/compilers/GCC/chtypes.h index 730cb38f1..7f808bb81 100644 --- a/os/common/ports/ARMv6-M-RP2/compilers/GCC/chtypes.h +++ b/os/common/ports/ARMv6-M-RP2/compilers/GCC/chtypes.h @@ -19,9 +19,9 @@ /** * @file ARMv6-M-RP2/compilers/GCC/chtypes.h - * @brief ARMv6-M port system types. + * @brief ARMv6-M-RP2 port system types. * - * @addtogroup ARMv6_M_RP2_GCC_CORE + * @addtogroup ARMV6M_RP2_GCC_CORE * @{ */ diff --git a/os/common/ports/ARMv6-M/chcore.c b/os/common/ports/ARMv6-M/chcore.c index bc5672bbc..3a897e806 100644 --- a/os/common/ports/ARMv6-M/chcore.c +++ b/os/common/ports/ARMv6-M/chcore.c @@ -21,7 +21,7 @@ * @file ARMv6-M/chcore.c * @brief ARMv6-M port code. * - * @addtogroup ARMv6_M_CORE + * @addtogroup ARMV6M_CORE * @{ */ diff --git a/os/common/ports/ARMv6-M/chcore.h b/os/common/ports/ARMv6-M/chcore.h index bbb56fac1..ebd1af97d 100644 --- a/os/common/ports/ARMv6-M/chcore.h +++ b/os/common/ports/ARMv6-M/chcore.h @@ -21,7 +21,7 @@ * @file ARMv6-M/chcore.h * @brief ARMv6-M port macros and structures. * - * @addtogroup ARMv6_M_CORE + * @addtogroup ARMV6M_CORE * @{ */ diff --git a/os/common/ports/ARMv6-M/chcore_timer.h b/os/common/ports/ARMv6-M/chcore_timer.h index 4f231efd1..7a0652102 100644 --- a/os/common/ports/ARMv6-M/chcore_timer.h +++ b/os/common/ports/ARMv6-M/chcore_timer.h @@ -18,10 +18,10 @@ */ /** - * @file chcore_timer.h + * @file ARMv6-M/chcore_timer.h * @brief System timer header file. * - * @addtogroup ARMv6_M_TIMER + * @addtogroup ARMV6M_TIMER * @{ */ diff --git a/os/common/ports/ARMv6-M/compilers/GCC/chcoreasm.S b/os/common/ports/ARMv6-M/compilers/GCC/chcoreasm.S index 29886d9c0..b16f41b02 100644 --- a/os/common/ports/ARMv6-M/compilers/GCC/chcoreasm.S +++ b/os/common/ports/ARMv6-M/compilers/GCC/chcoreasm.S @@ -21,7 +21,7 @@ * @file ARMv6-M/compilers/GCC/chcoreasm.S * @brief ARMv6-M port low level code. * - * @addtogroup ARMv6_M_GCC_CORE + * @addtogroup ARMV6M_GCC_CORE * @{ */ diff --git a/os/common/ports/ARMv6-M/compilers/GCC/chtypes.h b/os/common/ports/ARMv6-M/compilers/GCC/chtypes.h index 78151969e..21b6f1f30 100644 --- a/os/common/ports/ARMv6-M/compilers/GCC/chtypes.h +++ b/os/common/ports/ARMv6-M/compilers/GCC/chtypes.h @@ -21,7 +21,7 @@ * @file ARMv6-M/compilers/GCC/chtypes.h * @brief ARMv6-M port system types. * - * @addtogroup ARMv6_M_GCC_CORE + * @addtogroup ARMV6M_GCC_CORE * @{ */ diff --git a/os/common/ports/ARMv6-M/compilers/IAR/chcoreasm.s b/os/common/ports/ARMv6-M/compilers/IAR/chcoreasm.s index c238b6eb2..9921b7d27 100644 --- a/os/common/ports/ARMv6-M/compilers/IAR/chcoreasm.s +++ b/os/common/ports/ARMv6-M/compilers/IAR/chcoreasm.s @@ -21,7 +21,7 @@ * @file ARMv6-M/compilers/IAR/chcoreasm.s * @brief ARMv6-M port low level code. * - * @addtogroup ARMv6_M_IAR_CORE + * @addtogroup ARMV6M_IAR_CORE * @{ */ diff --git a/os/common/ports/ARMv6-M/compilers/IAR/chtypes.h b/os/common/ports/ARMv6-M/compilers/IAR/chtypes.h index 93a80b224..f89b61f77 100644 --- a/os/common/ports/ARMv6-M/compilers/IAR/chtypes.h +++ b/os/common/ports/ARMv6-M/compilers/IAR/chtypes.h @@ -21,7 +21,7 @@ * @file ARMCMx/compilers/IAR/chtypes.h * @brief ARM Cortex-Mx port system types. * - * @addtogroup ARMCMx_IAR_CORE + * @addtogroup ARMV6M_IAR_CORE * @{ */ diff --git a/os/common/ports/ARMv6-M/compilers/RVCT/chcoreasm.s b/os/common/ports/ARMv6-M/compilers/RVCT/chcoreasm.s index 5e501de20..70d5b6122 100644 --- a/os/common/ports/ARMv6-M/compilers/RVCT/chcoreasm.s +++ b/os/common/ports/ARMv6-M/compilers/RVCT/chcoreasm.s @@ -21,7 +21,7 @@ * @file ARMv6-M/compilers/RVCT/chcoreasm.s * @brief ARMv6-M port low level code. * - * @addtogroup ARMv6_M_RVCT_CORE + * @addtogroup ARMV6M_RVCT_CORE * @{ */ diff --git a/os/common/ports/ARMv6-M/compilers/RVCT/chtypes.h b/os/common/ports/ARMv6-M/compilers/RVCT/chtypes.h index 53bb3e220..57646bead 100644 --- a/os/common/ports/ARMv6-M/compilers/RVCT/chtypes.h +++ b/os/common/ports/ARMv6-M/compilers/RVCT/chtypes.h @@ -21,7 +21,7 @@ * @file ARMCMx/compilers/RVCT/chtypes.h * @brief ARM Cortex-Mx port system types. * - * @addtogroup ARMCMx_RVCT_CORE + * @addtogroup ARMV6M_RVCT_CORE * @{ */ diff --git a/os/common/ports/ARMv7-M/chcore.c b/os/common/ports/ARMv7-M/chcore.c index 2a55387e7..45bc5875c 100644 --- a/os/common/ports/ARMv7-M/chcore.c +++ b/os/common/ports/ARMv7-M/chcore.c @@ -21,7 +21,7 @@ * @file ARMv7-M/chcore.c * @brief ARMv7-M port code. * - * @addtogroup ARMv7_M_CORE + * @addtogroup ARMV7M_CORE * @{ */ diff --git a/os/common/ports/ARMv7-M/chcore.h b/os/common/ports/ARMv7-M/chcore.h index 4efcf08fe..e4089d813 100644 --- a/os/common/ports/ARMv7-M/chcore.h +++ b/os/common/ports/ARMv7-M/chcore.h @@ -21,7 +21,7 @@ * @file ARMv7-M/chcore.h * @brief ARMv7-M port macros and structures. * - * @addtogroup ARMv7_M_CORE + * @addtogroup ARMV7M_CORE * @{ */ diff --git a/os/common/ports/ARMv7-M/chcore_timer.h b/os/common/ports/ARMv7-M/chcore_timer.h index 76e8d1cca..15be2f951 100644 --- a/os/common/ports/ARMv7-M/chcore_timer.h +++ b/os/common/ports/ARMv7-M/chcore_timer.h @@ -21,7 +21,7 @@ * @file ARMv7-M/chcore_timer.h * @brief System timer header file. * - * @addtogroup ARMv7_M_TIMER + * @addtogroup ARMV7M_TIMER * @{ */ diff --git a/os/common/ports/ARMv7-M/compilers/GCC/chcoreasm.S b/os/common/ports/ARMv7-M/compilers/GCC/chcoreasm.S index 689a966bb..4e7ec96e2 100644 --- a/os/common/ports/ARMv7-M/compilers/GCC/chcoreasm.S +++ b/os/common/ports/ARMv7-M/compilers/GCC/chcoreasm.S @@ -21,7 +21,7 @@ * @file ARMv7-M/compilers/GCC/chcoreasm.S * @brief ARMv7-M port low level code. * - * @addtogroup ARMv7_M_GCC_CORE + * @addtogroup ARMV7M_GCC_CORE * @{ */ diff --git a/os/common/ports/ARMv7-M/compilers/GCC/chtypes.h b/os/common/ports/ARMv7-M/compilers/GCC/chtypes.h index f2e3605cf..6aff29ad7 100644 --- a/os/common/ports/ARMv7-M/compilers/GCC/chtypes.h +++ b/os/common/ports/ARMv7-M/compilers/GCC/chtypes.h @@ -21,7 +21,7 @@ * @file ARMv7-M/compilers/GCC/chtypes.h * @brief ARMv7-M port system types. * - * @addtogroup ARMv7_M_GCC_CORE + * @addtogroup ARMV7M_GCC_CORE * @{ */ diff --git a/os/common/ports/ARMv7-M/compilers/IAR/chcoreasm.s b/os/common/ports/ARMv7-M/compilers/IAR/chcoreasm.s index 98f91e255..647fa6f96 100644 --- a/os/common/ports/ARMv7-M/compilers/IAR/chcoreasm.s +++ b/os/common/ports/ARMv7-M/compilers/IAR/chcoreasm.s @@ -21,7 +21,7 @@ * @file ARMv7-M/compilers/IAR/chcoreasm.s * @brief ARMv7-M port low level code. * - * @addtogroup ARMv7_M_IAR_CORE + * @addtogroup ARMV7M_IAR_CORE * @{ */ diff --git a/os/common/ports/ARMv7-M/compilers/IAR/chtypes.h b/os/common/ports/ARMv7-M/compilers/IAR/chtypes.h index b223a8f2f..3c2d304a8 100644 --- a/os/common/ports/ARMv7-M/compilers/IAR/chtypes.h +++ b/os/common/ports/ARMv7-M/compilers/IAR/chtypes.h @@ -18,10 +18,10 @@ */ /** - * @file ARMCMx/compilers/IAR/chtypes.h - * @brief ARM Cortex-Mx port system types. + * @file ARMv7-M/compilers/IAR/chtypes.h + * @brief ARMv7-M port system types. * - * @addtogroup ARMv7_M_IAR_CORE + * @addtogroup ARMV7M_IAR_CORE * @{ */ diff --git a/os/common/ports/ARMv7-M/compilers/RVCT/chcoreasm.s b/os/common/ports/ARMv7-M/compilers/RVCT/chcoreasm.s index f81c3564b..e4ed4b9dc 100644 --- a/os/common/ports/ARMv7-M/compilers/RVCT/chcoreasm.s +++ b/os/common/ports/ARMv7-M/compilers/RVCT/chcoreasm.s @@ -21,7 +21,7 @@ * @file ARMv7-M/compilers/RVCT/chcoreasm.s * @brief ARMv7-M port low level code. * - * @addtogroup ARMv7_M_RVCT_CORE + * @addtogroup ARMV7M_RVCT_CORE * @{ */ diff --git a/os/common/ports/ARMv7-M/compilers/RVCT/chtypes.h b/os/common/ports/ARMv7-M/compilers/RVCT/chtypes.h index 76a099154..299c56fca 100644 --- a/os/common/ports/ARMv7-M/compilers/RVCT/chtypes.h +++ b/os/common/ports/ARMv7-M/compilers/RVCT/chtypes.h @@ -18,10 +18,10 @@ */ /** - * @file ARMCMx/compilers/RVCT/chtypes.h - * @brief ARM Cortex-Mx port system types. + * @file ARMv7-M/compilers/RVCT/chtypes.h + * @brief ARMv7-M port system types. * - * @addtogroup ARMv7_M_RVCT_CORE + * @addtogroup ARMV7M_RVCT_CORE * @{ */ diff --git a/os/common/ports/ARMv7-M/mpu.h b/os/common/ports/ARMv7-M/mpu.h index 48dfd416b..2c98e939f 100644 --- a/os/common/ports/ARMv7-M/mpu.h +++ b/os/common/ports/ARMv7-M/mpu.h @@ -18,7 +18,7 @@ * @file ARMv7-M/mpu.h * @brief ARMv7-M MPU support macros and structures. * - * @addtogroup ARMv7_M_MPU + * @addtogroup ARMV7M_MPU * @{ */ diff --git a/os/common/ports/ARMv8-M-ML-TZ/chcore.c b/os/common/ports/ARMv8-M-ML-TZ/chcore.c index 448d49646..aacf8fee2 100644 --- a/os/common/ports/ARMv8-M-ML-TZ/chcore.c +++ b/os/common/ports/ARMv8-M-ML-TZ/chcore.c @@ -18,10 +18,10 @@ */ /** - * @file ARMv8-M-ML/chcore.c - * @brief ARMv8-M mainline port code. + * @file ARMv8-M-ML-TZ/chcore.c + * @brief ARMv8-M MainLine port code. * - * @addtogroup ARMV8M_ML_CORE + * @addtogroup ARMV8M_ML_TZ_CORE * @{ */ diff --git a/os/common/ports/ARMv8-M-ML-TZ/chcore.h b/os/common/ports/ARMv8-M-ML-TZ/chcore.h index 40f06516e..6071a73c8 100644 --- a/os/common/ports/ARMv8-M-ML-TZ/chcore.h +++ b/os/common/ports/ARMv8-M-ML-TZ/chcore.h @@ -18,10 +18,10 @@ */ /** - * @file ARMv8-M-ML/chcore.h - * @brief ARMv8-M mainline port macros and structures. + * @file ARMv8-M-ML-TZ/chcore.h + * @brief ARMv8-M MainLine port macros and structures. * - * @addtogroup ARMV8M_ML_CORE + * @addtogroup ARMV8M_ML_TZ_CORE * @{ */ @@ -378,14 +378,6 @@ asm module.*/ #if !defined(_FROM_ASM_) -/** - * @brief Type of stack and memory alignment enforcement. - * @note In this architecture the stack alignment is enforced to 64 bits, - * 32 bits alignment is supported by hardware but deprecated by ARM, - * the implementation choice is to not offer the option. - */ -typedef uint64_t stkalign_t; - /** * @brief Interrupt saved context. * @details This structure represents the stack frame saved during a @@ -497,6 +489,11 @@ struct port_context { #define PORT_IRQ_IS_VALID_KERNEL_PRIORITY(n) \ (((n) >= CORTEX_MAX_KERNEL_PRIORITY) && ((n) <= CORTEX_PRIORITY_PENDSV)) +/** + * @brief Optimized thread function declaration macro. + */ +#define PORT_THD_FUNCTION(tname, arg) void tname(void *arg) + /** * @brief Initialization of stack check part of thread context. */ diff --git a/os/common/ports/ARMv8-M-ML-TZ/chcore_timer.h b/os/common/ports/ARMv8-M-ML-TZ/chcore_timer.h index 85b1f7450..a2792759c 100644 --- a/os/common/ports/ARMv8-M-ML-TZ/chcore_timer.h +++ b/os/common/ports/ARMv8-M-ML-TZ/chcore_timer.h @@ -21,7 +21,7 @@ * @file ARMv8-M-ML/chcore_timer.h * @brief System timer header file. * - * @addtogroup ARMV8M_ML_TIMER + * @addtogroup ARMV8M_ML_TZ_TIMER * @{ */ diff --git a/os/common/ports/ARMv8-M-ML-TZ/chtypes.h b/os/common/ports/ARMv8-M-ML-TZ/chtypes.h index 25f479f9c..454df781c 100644 --- a/os/common/ports/ARMv8-M-ML-TZ/chtypes.h +++ b/os/common/ports/ARMv8-M-ML-TZ/chtypes.h @@ -18,10 +18,10 @@ */ /** - * @file ARMv8-M-ML/compilers/GCC/chtypes.h - * @brief ARMv8-M mainline port system types. + * @file ARMv8-M-ML-TZ/chtypes.h + * @brief ARMv8-M MainLine port system types. * - * @addtogroup ARMV8M_ML_CORE + * @addtogroup ARMV8M_ML_TZ_CORE * @{ */ @@ -32,65 +32,74 @@ #include #include +#include "ccportab.h" + /** - * @name Kernel types + * @name Architecture data constraints + */ +#define PORT_ARCH_SIZEOF_DATA_PTR 4 +#define PORT_ARCH_SIZEOF_CODE_PTR 4 +#define PORT_ARCH_REGISTERS_WIDTH 32 +#define PORT_ARCH_REVERSE_ORDER 1 +/** @} */ + +/** + * @name Port types * @{ */ -typedef uint32_t rtcnt_t; /**< Realtime counter. */ -typedef uint64_t rttime_t; /**< Realtime accumulator. */ -typedef uint32_t syssts_t; /**< System status word. */ -typedef uint8_t tmode_t; /**< Thread flags. */ -typedef uint8_t tstate_t; /**< Thread state. */ -typedef uint8_t trefs_t; /**< Thread references counter. */ -typedef uint8_t tslices_t; /**< Thread time slices counter.*/ -typedef uint32_t tprio_t; /**< Thread priority. */ -typedef int32_t msg_t; /**< Inter-thread message. */ -typedef int32_t eventid_t; /**< Numeric event identifier. */ -typedef uint32_t eventmask_t; /**< Mask of event identifiers. */ -typedef uint32_t eventflags_t; /**< Mask of event flags. */ -typedef int32_t cnt_t; /**< Generic signed counter. */ -typedef uint32_t ucnt_t; /**< Generic unsigned counter. */ +/** + * @brief Realtime counter. + */ +typedef uint32_t port_rtcnt_t; + +/** + * @brief Realtime accumulator. + */ +typedef uint64_t port_rttime_t; + +/** + * @brief System status word. + */ +typedef uint32_t port_syssts_t; + +/** + * @brief Type of stack and memory alignment enforcement. + * @note In this architecture the stack alignment is enforced to 64 bits, + * 32 bits alignment is supported by hardware but deprecated by ARM, + * the implementation choice is to not offer the option. + */ +typedef uint64_t port_stkalign_t; /** @} */ +/** + * @brief This port does not define OS-related types. + */ +#define PORT_DOES_NOT_PROVIDE_TYPES + /** * @brief ROM constant modifier. * @note It is set to use the "const" keyword in this port. */ -#define ROMCONST const +#define ROMCONST CC_ROMCONST /** * @brief Makes functions not inlineable. * @note If the compiler does not support such attribute then some * time-dependent services could be degraded. */ -#define NOINLINE __attribute__((noinline)) - -/** - * @brief Optimized thread function declaration macro. - */ -#define PORT_THD_FUNCTION(tname, arg) void tname(void *arg) - -/** - * @brief Packed variable specifier. - */ -#define PACKED_VAR __attribute__((packed)) +#define NOINLINE CC_NO_INLINE /** * @brief Memory alignment enforcement for variables. */ -#define ALIGNED_VAR(n) __attribute__((aligned(n))) +#define ALIGNED_VAR(n) CC_ALIGN_DATA(n) /** * @brief Size of a pointer. * @note To be used where the sizeof operator cannot be used, preprocessor * expressions for example. */ -#define SIZEOF_PTR 4 - -/** - * @brief True if alignment is low-high in current architecture. - */ -#define REVERSE_ORDER 1 +#define SIZEOF_PTR PORT_ARCH_SIZEOF_DATA_PTR #endif /* CHTYPES_H */ diff --git a/os/common/ports/ARMv8-M-ML-TZ/compilers/GCC/chcoreasm.S b/os/common/ports/ARMv8-M-ML-TZ/compilers/GCC/chcoreasm.S index b731217cd..509bb542e 100644 --- a/os/common/ports/ARMv8-M-ML-TZ/compilers/GCC/chcoreasm.S +++ b/os/common/ports/ARMv8-M-ML-TZ/compilers/GCC/chcoreasm.S @@ -18,10 +18,10 @@ */ /** - * @file compilers/GCC/chcoreasm_v7m.S - * @brief ARMv7-M architecture port low level code. + * @file ARMv8-M-ML-TZ/compilers/GCC/chcoreasm.S + * @brief ARMv8-M MainLine architecture port low level code. * - * @addtogroup ARMCMx_GCC_CORE + * @addtogroup ARMV8M_ML_TZ_GCC_CORE * @{ */ @@ -218,7 +218,7 @@ PendSV_Handler: beq.w port_delay_reschedule /* Tail call on far address.*/ #endif /* Pointer to the current thread.*/ - ldr r0, =ch + ldr r0, =ch0 // movw r0, #:lower16:ch // movt r0, #:upper16:ch ldr r0, [r0, #CURRENT_OFFSET] diff --git a/os/common/ports/ARMv8-M-ML-TZ/mpu_v8m.h b/os/common/ports/ARMv8-M-ML-TZ/mpu_v8m.h deleted file mode 100644 index f1bfcccc6..000000000 --- a/os/common/ports/ARMv8-M-ML-TZ/mpu_v8m.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file common/ARMCMx/mpu_v8m.h - * @brief ARMv8-M MPU support macros and structures. - * - * @addtogroup COMMON_ARMV8M_MPU - * @{ - */ - -#ifndef MPU_ARMV8M_H -#define MPU_ARMV8M_H - -/*===========================================================================*/ -/* Driver constants. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver pre-compile time settings. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Derived constants and error checks. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver data structures and types. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* Driver macros. */ -/*===========================================================================*/ - -/*===========================================================================*/ -/* External declarations. */ -/*===========================================================================*/ - -#ifdef __cplusplus -extern "C" { -#endif -#ifdef __cplusplus -} -#endif - -#endif /* MPU_ARMV8M_H */ - -/** @} */ diff --git a/os/common/ports/ARMv8-M-ML/chcore.c b/os/common/ports/ARMv8-M-ML/chcore.c index d4039530f..5794dc1bc 100644 --- a/os/common/ports/ARMv8-M-ML/chcore.c +++ b/os/common/ports/ARMv8-M-ML/chcore.c @@ -21,7 +21,7 @@ * @file ARMv8-M-ML/chcore.c * @brief ARMv8-M MainLine port code. * - * @addtogroup ARMv8_M_ML_CORE + * @addtogroup ARMV8M_ML_CORE * @{ */ diff --git a/os/common/ports/ARMv8-M-ML/chcore.h b/os/common/ports/ARMv8-M-ML/chcore.h index ecfda540f..8ef2222d5 100644 --- a/os/common/ports/ARMv8-M-ML/chcore.h +++ b/os/common/ports/ARMv8-M-ML/chcore.h @@ -21,7 +21,7 @@ * @file ARMv8-M-ML/chcore.h * @brief ARMv8-M MainLine port macros and structures. * - * @addtogroup ARMv8_M_ML_CORE + * @addtogroup ARMV8M_ML_CORE * @{ */ @@ -299,14 +299,6 @@ asm module.*/ #if !defined(_FROM_ASM_) -/** - * @brief Type of stack and memory alignment enforcement. - * @note In this architecture the stack alignment is enforced to 64 bits, - * 32 bits alignment is supported by hardware but deprecated by ARM, - * the implementation choice is to not offer the option. - */ -typedef uint64_t stkalign_t; - /** * @brief Interrupt saved context. * @details This structure represents the stack frame saved during a @@ -410,6 +402,11 @@ struct port_context { #define PORT_IRQ_IS_VALID_KERNEL_PRIORITY(n) \ (((n) >= CORTEX_MAX_KERNEL_PRIORITY) && ((n) < CORTEX_PRIORITY_LEVELS)) +/** + * @brief Optimized thread function declaration macro. + */ +#define PORT_THD_FUNCTION(tname, arg) void tname(void *arg) + /** * @brief Initialization of stack check part of thread context. */ diff --git a/os/common/ports/ARMv8-M-ML/chcore_timer.h b/os/common/ports/ARMv8-M-ML/chcore_timer.h index fbf1b2275..85b1f7450 100644 --- a/os/common/ports/ARMv8-M-ML/chcore_timer.h +++ b/os/common/ports/ARMv8-M-ML/chcore_timer.h @@ -18,10 +18,10 @@ */ /** - * @file chcore_timer.h + * @file ARMv8-M-ML/chcore_timer.h * @brief System timer header file. * - * @addtogroup ARMv8_M_ML_TIMER + * @addtogroup ARMV8M_ML_TIMER * @{ */ diff --git a/os/common/ports/ARMv8-M-ML/compilers/GCC/chcoreasm.S b/os/common/ports/ARMv8-M-ML/compilers/GCC/chcoreasm.S index 6a1321af3..ba21685bc 100644 --- a/os/common/ports/ARMv8-M-ML/compilers/GCC/chcoreasm.S +++ b/os/common/ports/ARMv8-M-ML/compilers/GCC/chcoreasm.S @@ -21,7 +21,7 @@ * @file ARMv8-M-ML/compilers/GCC/chcoreasm.S * @brief ARMv8-M MainLine port low level code. * - * @addtogroup ARMv8_M_ML_GCC_CORE + * @addtogroup ARMV8M_ML_GCC_CORE * @{ */ diff --git a/os/common/ports/ARMv8-M-ML/compilers/GCC/chtypes.h b/os/common/ports/ARMv8-M-ML/compilers/GCC/chtypes.h index c96223336..65efc182f 100644 --- a/os/common/ports/ARMv8-M-ML/compilers/GCC/chtypes.h +++ b/os/common/ports/ARMv8-M-ML/compilers/GCC/chtypes.h @@ -19,9 +19,9 @@ /** * @file ARMv8-M-ML/compilers/GCC/chtypes.h - * @brief ARMv8-M-ML port system types. + * @brief ARMv8-M MainLine port system types. * - * @addtogroup ARMv8_M_ML_GCC_CORE + * @addtogroup ARMV8M_ML_GCC_CORE * @{ */