增加所有文件
This commit is contained in:
42
arch/armv7-r/gcc/arm_switchcontext.S
Normal file
42
arch/armv7-r/gcc/arm_switchcontext.S
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* arm_switchcontext.S
|
||||
*
|
||||
* Copyright (c) 2022 Semidrive Semiconductor.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Description: ARM switch context.
|
||||
*
|
||||
* Revision History:
|
||||
* -----------------
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <compiler.h>
|
||||
#include <armv7-r/svcall.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
.text
|
||||
|
||||
/****************************************************************************
|
||||
* Name: arm_switchcontext
|
||||
****************************************************************************/
|
||||
|
||||
.globl arm_switchcontext
|
||||
.type arm_switchcontext, function
|
||||
|
||||
arm_switchcontext:
|
||||
|
||||
/* Perform the System call with R0=2 */
|
||||
|
||||
mov r0, #SYS_switch_context /* R0: context switch */
|
||||
svc 0 /* Force synchronous SVCall (or Hard Fault) */
|
||||
|
||||
/* We will get here only after the rerturn from the context switch */
|
||||
|
||||
bx lr
|
||||
|
||||
.size arm_switchcontext, .-arm_switchcontext
|
||||
.end
|
||||
Reference in New Issue
Block a user