[rtems commit] bsps/arm: Copy vector table only if necessary
Sebastian Huber
sebh at rtems.org
Tue Jan 19 07:38:40 UTC 2016
Module: rtems
Branch: master
Commit: 76a51c6841209ac1447a72f90f2729bf22ffc7d4
Changeset: http://git.rtems.org/rtems/commit/?id=76a51c6841209ac1447a72f90f2729bf22ffc7d4
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jan 13 14:07:41 2016 +0100
bsps/arm: Copy vector table only if necessary
---
c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c b/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c
index 6ad9482..53ab513 100644
--- a/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c
+++ b/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c
@@ -42,11 +42,13 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
ARMV7M_Exception_handler *vector_table =
(ARMV7M_Exception_handler *) bsp_vector_table_begin;
- memcpy(
- vector_table,
- bsp_start_vector_table_begin,
- (size_t) bsp_vector_table_size
- );
+ if (bsp_vector_table_begin != bsp_start_vector_table_begin) {
+ memcpy(
+ vector_table,
+ bsp_start_vector_table_begin,
+ (size_t) bsp_vector_table_size
+ );
+ }
for (i = BSP_INTERRUPT_VECTOR_MIN; i <= BSP_INTERRUPT_VECTOR_MAX; ++i) {
vector_table [ARMV7M_VECTOR_IRQ(i)] = _ARMV7M_NVIC_Interrupt_dispatch;
More information about the vc
mailing list