diff --git a/arch/arm/cortex-m3/keil/los_interrupt.c b/arch/arm/cortex-m3/keil/los_interrupt.c index 41f3544f..e5c1f50d 100644 --- a/arch/arm/cortex-m3/keil/los_interrupt.c +++ b/arch/arm/cortex-m3/keil/los_interrupt.c @@ -47,7 +47,7 @@ UINT32 g_intCount = 0; #ifdef __ICCARM__ #pragma location = ".data.vector" #elif defined(__CC_ARM) || defined(__GNUC__) -#pragma data_alignment=0x100 +#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN LITE_OS_SEC_VEC #endif /* * diff --git a/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c b/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c index f0378c8f..c5835fbd 100755 --- a/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c +++ b/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c @@ -49,7 +49,7 @@ UINT32 g_intCount = 0; * @ingroup los_hwi * Hardware interrupt form mapping handling function array. */ -STATIC HWI_PROC_FUNC __attribute__((aligned(0x100))) g_hwiForm[OS_VECTOR_CNT] = {0}; +STATIC HWI_PROC_FUNC __attribute__((aligned(LOSCFG_ARCH_HWI_VECTOR_ALIGN))) g_hwiForm[OS_VECTOR_CNT] = {0}; #if (LOSCFG_PLATFORM_HWI_WITH_ARG == 1) diff --git a/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c b/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c index f0378c8f..c5835fbd 100755 --- a/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c +++ b/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c @@ -49,7 +49,7 @@ UINT32 g_intCount = 0; * @ingroup los_hwi * Hardware interrupt form mapping handling function array. */ -STATIC HWI_PROC_FUNC __attribute__((aligned(0x100))) g_hwiForm[OS_VECTOR_CNT] = {0}; +STATIC HWI_PROC_FUNC __attribute__((aligned(LOSCFG_ARCH_HWI_VECTOR_ALIGN))) g_hwiForm[OS_VECTOR_CNT] = {0}; #if (LOSCFG_PLATFORM_HWI_WITH_ARG == 1) diff --git a/arch/arm/cortex-m33/iar/NTZ/los_interrupt.c b/arch/arm/cortex-m33/iar/NTZ/los_interrupt.c index b12bb5ac..0477c509 100644 --- a/arch/arm/cortex-m33/iar/NTZ/los_interrupt.c +++ b/arch/arm/cortex-m33/iar/NTZ/los_interrupt.c @@ -46,7 +46,7 @@ UINT32 g_intCount = 0; /*lint -restore*/ #pragma location = ".data.vector" -#pragma data_alignment=0x100 +#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN /* * * @ingroup los_hwi * hardware interrupt form mapping handling function array. diff --git a/arch/arm/cortex-m33/iar/TZ/non_secure/los_interrupt.c b/arch/arm/cortex-m33/iar/TZ/non_secure/los_interrupt.c index b12bb5ac..0477c509 100644 --- a/arch/arm/cortex-m33/iar/TZ/non_secure/los_interrupt.c +++ b/arch/arm/cortex-m33/iar/TZ/non_secure/los_interrupt.c @@ -46,7 +46,7 @@ UINT32 g_intCount = 0; /*lint -restore*/ #pragma location = ".data.vector" -#pragma data_alignment=0x100 +#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN /* * * @ingroup los_hwi * hardware interrupt form mapping handling function array. diff --git a/arch/arm/cortex-m4/gcc/los_interrupt.c b/arch/arm/cortex-m4/gcc/los_interrupt.c index 7aa9f794..b1eea747 100644 --- a/arch/arm/cortex-m4/gcc/los_interrupt.c +++ b/arch/arm/cortex-m4/gcc/los_interrupt.c @@ -44,17 +44,12 @@ UINT32 g_intCount = 0; /*lint -restore*/ -#ifdef __ICCARM__ -#pragma location = ".data.vector" -#pragma data_alignment=0x100 -#elif defined(__CC_ARM) || defined(__GNUC__) -LITE_OS_SEC_VEC -#endif + /* * * @ingroup los_hwi * Hardware interrupt form mapping handling function array. */ -STATIC HWI_PROC_FUNC __attribute__((aligned(0x100))) g_hwiForm[OS_VECTOR_CNT] = {0}; +STATIC HWI_PROC_FUNC __attribute__((aligned(LOSCFG_ARCH_HWI_VECTOR_ALIGN))) g_hwiForm[OS_VECTOR_CNT] = {0}; #if (LOSCFG_PLATFORM_HWI_WITH_ARG == 1) diff --git a/arch/arm/cortex-m4/iar/los_interrupt.c b/arch/arm/cortex-m4/iar/los_interrupt.c index fa60e5be..921f98d2 100644 --- a/arch/arm/cortex-m4/iar/los_interrupt.c +++ b/arch/arm/cortex-m4/iar/los_interrupt.c @@ -47,7 +47,7 @@ UINT32 g_intCount = 0; /*lint -restore*/ #ifdef __ICCARM__ #pragma location = ".data.vector" -#pragma data_alignment=0x100 +#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN #elif defined(__CC_ARM) || defined(__GNUC__) LITE_OS_SEC_VEC #endif diff --git a/arch/arm/cortex-m7/gcc/los_interrupt.c b/arch/arm/cortex-m7/gcc/los_interrupt.c index 65c55774..46a99401 100644 --- a/arch/arm/cortex-m7/gcc/los_interrupt.c +++ b/arch/arm/cortex-m7/gcc/los_interrupt.c @@ -49,7 +49,7 @@ UINT32 g_intCount = 0; * @ingroup los_hwi * Hardware interrupt form mapping handling function array. */ -STATIC HWI_PROC_FUNC __attribute__((aligned(0x100))) g_hwiForm[OS_VECTOR_CNT] = {0}; +STATIC HWI_PROC_FUNC __attribute__((aligned(LOSCFG_ARCH_HWI_VECTOR_ALIGN))) g_hwiForm[OS_VECTOR_CNT] = {0}; #if (LOSCFG_PLATFORM_HWI_WITH_ARG == 1) diff --git a/arch/arm/cortex-m7/iar/los_interrupt.c b/arch/arm/cortex-m7/iar/los_interrupt.c index 99f207e4..5d2bd6ee 100644 --- a/arch/arm/cortex-m7/iar/los_interrupt.c +++ b/arch/arm/cortex-m7/iar/los_interrupt.c @@ -46,7 +46,7 @@ UINT32 g_intCount = 0; /*lint -restore*/ #pragma location = ".data.vector" -#pragma data_alignment=0x100 +#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN /* * * @ingroup los_hwi * Hardware interrupt form mapping handling function array. diff --git a/arch/xtensa/lx6/gcc/los_interrupt.c b/arch/xtensa/lx6/gcc/los_interrupt.c index 6cd2879f..05aebef8 100644 --- a/arch/xtensa/lx6/gcc/los_interrupt.c +++ b/arch/xtensa/lx6/gcc/los_interrupt.c @@ -48,7 +48,7 @@ UINT32 g_intCount = 0; * @ingroup los_hwi * Hardware interrupt form mapping handling function array. */ -STATIC HWI_PROC_FUNC __attribute__((aligned(0x100))) g_hwiForm[OS_VECTOR_CNT] = {0}; +STATIC HWI_PROC_FUNC __attribute__((aligned(LOSCFG_ARCH_HWI_VECTOR_ALIGN))) g_hwiForm[OS_VECTOR_CNT] = {0}; #if (LOSCFG_PLATFORM_HWI_WITH_ARG == 1) diff --git a/kernel/include/los_config.h b/kernel/include/los_config.h index 9f81f09a..43993749 100644 --- a/kernel/include/los_config.h +++ b/kernel/include/los_config.h @@ -631,6 +631,14 @@ extern UINT8 *m_aucSysMem0; #define LOSCFG_PLATFORM_HWI_WITH_ARG 0 #endif +/** + * @ingroup los_config + * Configuration item to set interrupt vector align size. + */ +#ifndef LOSCFG_ARCH_HWI_VECTOR_ALIGN +#define LOSCFG_ARCH_HWI_VECTOR_ALIGN 0x100 +#endif + #ifdef __cplusplus #if __cplusplus }