diff --git a/kernel/BUILD.gn b/kernel/BUILD.gn index ae9c3420b99fb31dbeed16bdb6f852fcda205fbf..65f03b25b82f73d0f3ad464fc9ce825253f56a0e 100644 --- a/kernel/BUILD.gn +++ b/kernel/BUILD.gn @@ -61,7 +61,7 @@ static_library("kernel") { } else if ("$board_cpu" == "cortex-m7") { deps = [ "arch/arm/cortex-m7/gcc/:arch" ] } else if ("$board_cpu" == "cortex-m33") { - deps = [ "arch/arm/cortex-m33/gcc/:arch" ] + deps = [ "arch/arm/cortex-m33/gcc/TZ:arch" ] } else if ("$board_cpu" == "") { if ("$board_arch" == "rv32imac" || "$board_arch" == "rv32imafdc") { deps = [ "arch/risc-v/riscv32/gcc:arch" ] diff --git a/kernel/arch/arm/cortex-m33/gcc/NTZ/los_arch_interrupt.h b/kernel/arch/arm/cortex-m33/gcc/NTZ/los_arch_interrupt.h index 3c98b7455c004ed3d714e07089c5f29f0d5d7749..dd1b3ed595e6db2950408f76497ca7737b8dbc8d 100755 --- a/kernel/arch/arm/cortex-m33/gcc/NTZ/los_arch_interrupt.h +++ b/kernel/arch/arm/cortex-m33/gcc/NTZ/los_arch_interrupt.h @@ -545,7 +545,7 @@ VOID HalExcHardFault(VOID); VOID HalExcMemFault(VOID); VOID HalExcBusFault(VOID); VOID HalExcUsageFault(VOID); -VOID HalExcSvcCall(VOID); +VOID HalSVCHandler(VOID); VOID HalHwiInit(); diff --git a/kernel/arch/arm/cortex-m33/gcc/NTZ/los_exc.S b/kernel/arch/arm/cortex-m33/gcc/NTZ/los_exc.S index af0753ab13062bb794a54f938c2ddf0f0d45bead..5660c577fe57d970ce703d987ca084d360bf538f 100755 --- a/kernel/arch/arm/cortex-m33/gcc/NTZ/los_exc.S +++ b/kernel/arch/arm/cortex-m33/gcc/NTZ/los_exc.S @@ -41,7 +41,7 @@ .global HalExcMemFault .global HalExcBusFault .global HalExcUsageFault - .global HalExcSvcCall + .global HalSVCHandler .extern HalExcHandleEntry .extern g_uwExcTbl @@ -148,9 +148,9 @@ osHFExcCommonBMU: B osExcDispatch .fnend - .type HalExcSvcCall, %function - .global HalExcSvcCall -HalExcSvcCall: + .type HalSVCHandler, %function + .global HalSVCHandler +HalSVCHandler: .fnstart .cantunwind TST LR, #0x4 diff --git a/kernel/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c b/kernel/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c index c5952da681301b292e974e47185990c670bd5e98..d1f55b80037e4d6c6431cab05b8a8790b123e5cc 100755 --- a/kernel/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c +++ b/kernel/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c @@ -497,7 +497,7 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit() g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault; g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault; g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault; - g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalExcSvcCall; + g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalSVCHandler; g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV; g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = OsTickHandler; diff --git a/kernel/arch/arm/cortex-m33/gcc/TZ/BUILD.gn b/kernel/arch/arm/cortex-m33/gcc/TZ/BUILD.gn index 3c92fa3c5054a85bb9f52d5a461e35d4a6eaf540..49389c88ba81171f1217eab9057e69ca6bf36086 100644 --- a/kernel/arch/arm/cortex-m33/gcc/TZ/BUILD.gn +++ b/kernel/arch/arm/cortex-m33/gcc/TZ/BUILD.gn @@ -41,6 +41,8 @@ static_library("arch") { ] include_dirs = [ + "./non_secure", + "./secure", "../../../../../../kernel/arch/include", "../../../../../../kernel/arch/include", "../../../../../../kernel/include", diff --git a/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_arch_interrupt.h b/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_arch_interrupt.h index 3c98b7455c004ed3d714e07089c5f29f0d5d7749..dd1b3ed595e6db2950408f76497ca7737b8dbc8d 100755 --- a/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_arch_interrupt.h +++ b/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_arch_interrupt.h @@ -545,7 +545,7 @@ VOID HalExcHardFault(VOID); VOID HalExcMemFault(VOID); VOID HalExcBusFault(VOID); VOID HalExcUsageFault(VOID); -VOID HalExcSvcCall(VOID); +VOID HalSVCHandler(VOID); VOID HalHwiInit(); diff --git a/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_dispatch.S b/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_dispatch.S index 756b4f83cab3fe0bf8134afeddfcfbfc441be92f..08ac871e3629282e6c2631af7b542a3617ee14a7 100644 --- a/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_dispatch.S +++ b/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_dispatch.S @@ -48,8 +48,6 @@ .type HalStartFirstTask, %function .global HalStartFirstTask HalStartFirstTask: - .fnstart - .cantunwind MOV R0, #2 MSR CONTROL, R0 @@ -77,7 +75,6 @@ __DisabledFPU1: MSR PSP, R12 CPSIE I BX R3 - .fnend .type HalIntLock, %function .global HalIntLock diff --git a/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_exc.S b/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_exc.S index af0753ab13062bb794a54f938c2ddf0f0d45bead..e95b12c59111b8e79752876e990608030e53ece8 100755 --- a/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_exc.S +++ b/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_exc.S @@ -41,7 +41,6 @@ .global HalExcMemFault .global HalExcBusFault .global HalExcUsageFault - .global HalExcSvcCall .extern HalExcHandleEntry .extern g_uwExcTbl @@ -148,21 +147,6 @@ osHFExcCommonBMU: B osExcDispatch .fnend - .type HalExcSvcCall, %function - .global HalExcSvcCall -HalExcSvcCall: - .fnstart - .cantunwind - TST LR, #0x4 - ITE EQ - MRSEQ R0, MSP - MRSNE R0, PSP - LDR R1, [R0,#24] - LDRB R0, [R1,#-2] - MOV R1, #0 - B osExcDispatch - .fnend - .type HalExcBusFault, %function .global HalExcBusFault HalExcBusFault: diff --git a/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c b/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c index c5952da681301b292e974e47185990c670bd5e98..d1f55b80037e4d6c6431cab05b8a8790b123e5cc 100755 --- a/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c +++ b/kernel/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c @@ -497,7 +497,7 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit() g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault; g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault; g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault; - g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalExcSvcCall; + g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalSVCHandler; g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV; g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = OsTickHandler; diff --git a/kernel/arch/arm/cortex-m33/gcc/TZ/secure/los_secure_context_asm.S b/kernel/arch/arm/cortex-m33/gcc/TZ/secure/los_secure_context_asm.S index 8743d046683748f5b01b846751e04578f8299c6f..f5f0e8ace489af6a0d04c0182cf45055581544e9 100755 --- a/kernel/arch/arm/cortex-m33/gcc/TZ/secure/los_secure_context_asm.S +++ b/kernel/arch/arm/cortex-m33/gcc/TZ/secure/los_secure_context_asm.S @@ -94,7 +94,7 @@ HalSecureContextSaveAsm: MOV R0, #0 MSR PSPLIM, R0 /* No PSPLIM for the current task. */ MSR PSP, R0 /* No secure stack for the current task. */ + .fnend __ThreadMode: BX LR - .fnend \ No newline at end of file