5
Last change
on this file since 2afb22b was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
995 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief ARMV7M Start Multitasking |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * Copyright (c) 2011-2014 Sebastian Huber. All rights reserved. |
---|
9 | * |
---|
10 | * embedded brains GmbH |
---|
11 | * Dornierstr. 4 |
---|
12 | * 82178 Puchheim |
---|
13 | * Germany |
---|
14 | * <rtems@embedded-brains.de> |
---|
15 | * |
---|
16 | * The license and distribution terms for this file may be |
---|
17 | * found in the file LICENSE in this distribution or at |
---|
18 | * http://www.rtems.org/license/LICENSE. |
---|
19 | */ |
---|
20 | |
---|
21 | #ifdef HAVE_CONFIG_H |
---|
22 | #include "config.h" |
---|
23 | #endif |
---|
24 | |
---|
25 | #include <rtems/score/armv7m.h> |
---|
26 | |
---|
27 | #ifdef ARM_MULTILIB_ARCH_V7M |
---|
28 | |
---|
29 | void __attribute__((naked)) _ARMV7M_Start_multitasking( |
---|
30 | Context_Control *heir |
---|
31 | ) |
---|
32 | { |
---|
33 | __asm__ volatile ( |
---|
34 | /* Restore heir context */ |
---|
35 | "ldr r2, [r0, %[spctxoff]]\n" |
---|
36 | "msr psp, r2\n" |
---|
37 | "ldm r0, {r4-r11, lr}\n" |
---|
38 | /* Enable process stack pointer (PSP) */ |
---|
39 | "mrs r2, control\n" |
---|
40 | "orr r2, #0x2\n" |
---|
41 | "msr control, r2\n" |
---|
42 | /* Return to heir */ |
---|
43 | "bx lr\n" |
---|
44 | : |
---|
45 | : [spctxoff] "J" (offsetof(Context_Control, register_sp)) |
---|
46 | ); |
---|
47 | } |
---|
48 | |
---|
49 | #endif /* ARM_MULTILIB_ARCH_V7M */ |
---|
Note: See
TracBrowser
for help on using the repository browser.