diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-06 15:04:57 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-06 15:04:57 +0000 |
commit | e888bb3a55e974475a87fee0371f4405ddab696e (patch) | |
tree | 2c614deb71dfee72cfb36f54e47cc7c9475ef9c7 /nuttx/arch/arm/src/cortexm3/up_fullcontextrestore.S | |
parent | 767a6400de3f6e709a6a453ea3c90422a316a598 (diff) | |
download | px4-nuttx-e888bb3a55e974475a87fee0371f4405ddab696e.tar.gz px4-nuttx-e888bb3a55e974475a87fee0371f4405ddab696e.tar.bz2 px4-nuttx-e888bb3a55e974475a87fee0371f4405ddab696e.zip |
Integrate syscall with existing svcall logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3472 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/cortexm3/up_fullcontextrestore.S')
-rwxr-xr-x | nuttx/arch/arm/src/cortexm3/up_fullcontextrestore.S | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/nuttx/arch/arm/src/cortexm3/up_fullcontextrestore.S b/nuttx/arch/arm/src/cortexm3/up_fullcontextrestore.S index aab30b309..1194510b9 100755 --- a/nuttx/arch/arm/src/cortexm3/up_fullcontextrestore.S +++ b/nuttx/arch/arm/src/cortexm3/up_fullcontextrestore.S @@ -1,7 +1,7 @@ /************************************************************************************ * arch/arm/src/cortexm3/up_fullcontextrestore.S * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -39,7 +39,9 @@ #include <nuttx/config.h> #include <arch/irq.h> + #include "nvic.h" +#include "svcall.h" /************************************************************************************ * Preprocessor Definitions @@ -49,9 +51,9 @@ * Global Symbols ************************************************************************************/ - .syntax unified + .syntax unified .thumb - .file "up_fullcontextrestore.S" + .file "up_fullcontextrestore.S" /************************************************************************************ * Macros @@ -75,19 +77,19 @@ **************************************************************************/ .thumb_func - .globl up_fullcontextrestore - .type up_fullcontextrestore, function + .globl up_fullcontextrestore + .type up_fullcontextrestore, function up_fullcontextrestore: /* Perform the System call with R0=1 and R1=regs */ - mov r1, r0 /* R1: regs */ - mov r0, #1 /* R0: 1 means restore context */ - svc 0 /* Force synchronous SVCall (or Hard Fault) */ + mov r1, r0 /* R1: regs */ + mov r0, #SYS_restore_context /* R0: restore context */ + svc 0 /* Force synchronous SVCall (or Hard Fault) */ /* This call should not return */ - bx lr /* Unnecessary ... will not return */ - .size up_fullcontextrestore, .-up_fullcontextrestore + bx lr /* Unnecessary ... will not return */ + .size up_fullcontextrestore, .-up_fullcontextrestore .end |