aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-09-17 10:46:10 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-09-17 10:46:10 +0000
commite8ce6fcf43fbd53e80556ff4a50c1edb3f87ea00 (patch)
tree622d6e59e93a2e96f4e7d0d6a9195bb01e297653 /os/ports
parentf3d472965ed481a88382fe698cdab337359d553c (diff)
downloadChibiOS-e8ce6fcf43fbd53e80556ff4a50c1edb3f87ea00.tar.gz
ChibiOS-e8ce6fcf43fbd53e80556ff4a50c1edb3f87ea00.tar.bz2
ChibiOS-e8ce6fcf43fbd53e80556ff4a50c1edb3f87ea00.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4687 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports')
-rw-r--r--os/ports/GCC/PPC/SPC560Pxx/ivor.s137
-rw-r--r--os/ports/GCC/PPC/SPC560Pxx/vectors.s2
-rw-r--r--os/ports/GCC/PPC/SPC563Mxx/ivor.s80
-rw-r--r--os/ports/GCC/PPC/SPC563Mxx/vectors.s2
-rw-r--r--os/ports/GCC/PPC/chcore.c6
5 files changed, 118 insertions, 109 deletions
diff --git a/os/ports/GCC/PPC/SPC560Pxx/ivor.s b/os/ports/GCC/PPC/SPC560Pxx/ivor.s
index 2561b4eb6..5e9f7ab0e 100644
--- a/os/ports/GCC/PPC/SPC560Pxx/ivor.s
+++ b/os/ports/GCC/PPC/SPC560Pxx/ivor.s
@@ -46,80 +46,84 @@
* Fixed IVOR offset table.
*/
.globl IVORS
-IVORS: b IVOR0
- .align 16
- b IVOR1
- .align 16
- b IVOR2
- .align 16
- b IVOR3
- .align 16
- b IVOR4
- .align 16
- b IVOR5
- .align 16
- b IVOR6
- .align 16
- b IVOR7
- .align 16
- b IVOR8
- .align 16
- b IVOR9
- .align 16
- b IVOR10
- .align 16
- b IVOR11
- .align 16
- b IVOR12
- .align 16
- b IVOR13
- .align 16
- b IVOR14
- .align 16
- b IVOR15
+IVORS:
+IVOR0: b IVOR0
+ .align 4
+IVOR1: b _IVOR1
+ .align 4
+IVOR2: b _IVOR2
+ .align 4
+IVOR3: b _IVOR3
+ .align 4
+IVOR4: b _IVOR4
+ .align 4
+IVOR5: b _IVOR5
+ .align 4
+IVOR6: b _IVOR6
+ .align 4
+IVOR7: b _IVOR7
+ .align 4
+IVOR8: b _IVOR8
+ .align 4
+IVOR9: b _IVOR9
+ .align 4
+IVOR10: b _IVOR10
+ .align 4
+IVOR11: b _IVOR11
+ .align 4
+IVOR12: b _IVOR12
+ .align 4
+IVOR13: b _IVOR13
+ .align 4
+IVOR14: b _IVOR14
+ .align 4
+IVOR15: b _IVOR15
/*
* Unhandled exceptions handler.
*/
- .weak IVOR0
-IVOR0:
- .weak IVOR1
-IVOR1:
- .weak IVOR2
-IVOR2:
- .weak IVOR3
-IVOR3:
- .weak IVOR5
-IVOR5:
- .weak IVOR6
-IVOR6:
- .weak IVOR7
-IVOR7:
- .weak IVOR8
-IVOR8:
- .weak IVOR9
-IVOR9:
- .weak IVOR10
-IVOR10:
- .weak IVOR11
-IVOR11:
- .weak IVOR12
-IVOR12:
- .weak IVOR13
-IVOR13:
- .weak IVOR14
-IVOR14:
- .weak IVOR15
-IVOR15:
+ .weak _IVOR0
+_IVOR0:
+ .weak _IVOR1
+_IVOR1:
+ .weak _IVOR2
+_IVOR2:
+ .weak _IVOR3
+_IVOR3:
+ .weak _IVOR5
+_IVOR5:
+ .weak _IVOR6
+_IVOR6:
+ .weak _IVOR7
+_IVOR7:
+ .weak _IVOR8
+_IVOR8:
+ .weak _IVOR9
+_IVOR9:
+ .weak _IVOR10
+_IVOR10:
+ .weak _IVOR11
+_IVOR11:
+ .weak _IVOR12
+_IVOR12:
+ .weak _IVOR13
+_IVOR13:
+ .weak _IVOR14
+_IVOR14:
+ .weak _IVOR15
+_IVOR15:
+ .weak _unhandled_exception
+ .type _unhandled_exception, @function
_unhandled_exception:
- b _unhandled_exception
+ b _unhandled_exception
/*
* IVOR4 handler (Book-E external interrupt).
*/
.align 4
- .globl IVOR4
-IVOR4:
+ .globl _IVOR4
+ .type _IVOR4, @function
+_IVOR4:
/* Creation of the external stack frame (extctx structure).*/
stwu %sp, -80(%sp) /* Size of the extctx structure.*/
#if PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI
@@ -184,11 +188,12 @@ IVOR4:
#endif
bl chSchIsPreemptionRequired
cmpli cr0, %r3, 0
- beq cr0, .ctxrestore
+ beq cr0, _ivor_exit
bl chSchDoReschedule
/* Context restore.*/
-.ctxrestore:
+ .globl _ivor_exit
+_ivor_exit:
#if CH_DBG_SYSTEM_STATE_CHECK
bl dbg_check_unlock
#endif
diff --git a/os/ports/GCC/PPC/SPC560Pxx/vectors.s b/os/ports/GCC/PPC/SPC560Pxx/vectors.s
index 52b2b1369..1d09e9ce3 100644
--- a/os/ports/GCC/PPC/SPC560Pxx/vectors.s
+++ b/os/ports/GCC/PPC/SPC560Pxx/vectors.s
@@ -1099,7 +1099,7 @@ vector259:
.weak vector260
vector260:
- .globl _unhandled_irq
+ .weak _unhandled_irq
.type _unhandled_irq, @function
_unhandled_irq:
b _unhandled_irq
diff --git a/os/ports/GCC/PPC/SPC563Mxx/ivor.s b/os/ports/GCC/PPC/SPC563Mxx/ivor.s
index fe85492dc..0eb362ed0 100644
--- a/os/ports/GCC/PPC/SPC563Mxx/ivor.s
+++ b/os/ports/GCC/PPC/SPC563Mxx/ivor.s
@@ -45,44 +45,46 @@
/*
* Unhandled exceptions handler.
*/
- .weak IVOR0
-IVOR0:
- .weak IVOR1
-IVOR1:
- .weak IVOR2
-IVOR2:
- .weak IVOR3
-IVOR3:
- .weak IVOR5
-IVOR5:
- .weak IVOR6
-IVOR6:
- .weak IVOR7
-IVOR7:
- .weak IVOR8
-IVOR8:
- .weak IVOR9
-IVOR9:
- .weak IVOR11
-IVOR11:
- .weak IVOR12
-IVOR12:
- .weak IVOR13
-IVOR13:
- .weak IVOR14
-IVOR14:
- .weak IVOR15
-IVOR15:
- .globl _unhandled_exception
+ .weak _IVOR0
+_IVOR0:
+ .weak _IVOR1
+_IVOR1:
+ .weak _IVOR2
+_IVOR2:
+ .weak _IVOR3
+_IVOR3:
+ .weak _IVOR5
+_IVOR5:
+ .weak _IVOR6
+_IVOR6:
+ .weak _IVOR7
+_IVOR7:
+ .weak _IVOR8
+_IVOR8:
+ .weak _IVOR9
+_IVOR9:
+ .weak _IVOR11
+_IVOR11:
+ .weak _IVOR12
+_IVOR12:
+ .weak _IVOR13
+_IVOR13:
+ .weak _IVOR14
+_IVOR14:
+ .weak _IVOR15
+_IVOR15:
+ .weak _unhandled_exception
+ .type _unhandled_exception, @function
_unhandled_exception:
b _unhandled_exception
/*
- * IVOR10 handler (Book-E decrementer).
+ * _IVOR10 handler (Book-E decrementer).
*/
.align 4
- .globl IVOR10
-IVOR10:
+ .globl _IVOR10
+ .type _IVOR10, @function
+_IVOR10:
/* Creation of the external stack frame (extctx structure).*/
stwu %sp, -80(%sp) /* Size of the extctx structure.*/
#if PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI
@@ -137,14 +139,15 @@ IVOR10:
cmpli cr0, %r3, 0
beq cr0, .ctxrestore
bl chSchDoReschedule
- b .ctxrestore
+ b _ivor_exit
/*
- * IVOR4 handler (Book-E external interrupt).
+ * _IVOR4 handler (Book-E external interrupt).
*/
.align 4
- .globl IVOR4
-IVOR4:
+ .globl _IVOR4
+ .type _IVOR4, @function
+_IVOR4:
/* Creation of the external stack frame (extctx structure).*/
stwu %sp, -80(%sp) /* Size of the extctx structure.*/
#if PPC_USE_VLE && PPC_SUPPORTS_VLE_MULTI
@@ -209,11 +212,12 @@ IVOR4:
#endif
bl chSchIsPreemptionRequired
cmpli cr0, %r3, 0
- beq cr0, .ctxrestore
+ beq cr0, _ivor_exit
bl chSchDoReschedule
/* Context restore.*/
-.ctxrestore:
+ .globl
+_ivor_exit:
#if CH_DBG_SYSTEM_STATE_CHECK
bl dbg_check_unlock
#endif
diff --git a/os/ports/GCC/PPC/SPC563Mxx/vectors.s b/os/ports/GCC/PPC/SPC563Mxx/vectors.s
index c823244c8..0a7d723e5 100644
--- a/os/ports/GCC/PPC/SPC563Mxx/vectors.s
+++ b/os/ports/GCC/PPC/SPC563Mxx/vectors.s
@@ -1495,7 +1495,7 @@ vector358:
.weak vector359
vector359:
- .globl _unhandled_irq
+ .weak _unhandled_irq
.type _unhandled_irq, @function
_unhandled_irq:
b _unhandled_irq
diff --git a/os/ports/GCC/PPC/chcore.c b/os/ports/GCC/PPC/chcore.c
index 5fd97a14b..5ad1195a4 100644
--- a/os/ports/GCC/PPC/chcore.c
+++ b/os/ports/GCC/PPC/chcore.c
@@ -36,10 +36,10 @@ void port_init(void) {
#if PPC_SUPPORTS_IVORS
/* The CPU support IVOR registers, the kernel requires IVOR4 and IVOR10
and the initialization is performed here.*/
- asm volatile ("li %r3, IVOR4@l \t\n"
+ asm volatile ("li %r3, _IVOR4@l \t\n"
"mtIVOR4 %r3 \t\n"
- "li %r3, IVOR10@l \t\n"
- "mtIVOR10 %r3");
+ "li %r3, _IVOR10@l \t\n"
+ "mtIVOR10 %r3" : : : "memory");
#endif
}