[rtems commit] sparc: Move _CPU_Trap_slot_template
Sebastian Huber
sebh at rtems.org
Fri Apr 20 13:29:40 UTC 2018
Module: rtems
Branch: master
Commit: 28b4c7acc4ef668488103a67341460caa862af36
Changeset: http://git.rtems.org/rtems/commit/?id=28b4c7acc4ef668488103a67341460caa862af36
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Apr 20 13:19:28 2018 +0200
sparc: Move _CPU_Trap_slot_template
The definition of _CPU_Trap_slot_template is BSP-independent. A
potential para-virtualization support may use <rtems/score/paravirt.h>.
This patch is a part of the BSP source reorganization.
Update #3285.
---
c/src/lib/libbsp/sparc/erc32/Makefile.am | 1 -
c/src/lib/libbsp/sparc/leon2/Makefile.am | 1 -
c/src/lib/libbsp/sparc/leon3/Makefile.am | 1 -
c/src/lib/libbsp/sparc/shared/cpu.c | 36 --------------------------------
cpukit/score/cpu/sparc/cpu.c | 16 ++++++++++++++
5 files changed, 16 insertions(+), 39 deletions(-)
diff --git a/c/src/lib/libbsp/sparc/erc32/Makefile.am b/c/src/lib/libbsp/sparc/erc32/Makefile.am
index 7668a98..63df570 100644
--- a/c/src/lib/libbsp/sparc/erc32/Makefile.am
+++ b/c/src/lib/libbsp/sparc/erc32/Makefile.am
@@ -35,7 +35,6 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/erc32/start/bspdelay.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/shared/start/bsp_fatal_exit.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/shared/start/bsp_fatal_halt.c
# ISR Handler
-librtemsbsp_a_SOURCES += ../shared/cpu.c
librtemsbsp_a_SOURCES += ../shared/irq_asm.S
# gnatsupp
librtemsbsp_a_SOURCES += gnatsupp/gnatsupp.c
diff --git a/c/src/lib/libbsp/sparc/leon2/Makefile.am b/c/src/lib/libbsp/sparc/leon2/Makefile.am
index 7e5d8b6..9930a1a 100644
--- a/c/src/lib/libbsp/sparc/leon2/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon2/Makefile.am
@@ -36,7 +36,6 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/shared/start/bsp_fatal_exi
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/shared/start/bsp_fatal_halt.c
# ISR Handler
-librtemsbsp_a_SOURCES += ../shared/cpu.c
librtemsbsp_a_SOURCES += ../shared/irq_asm.S
# gnatsupp
librtemsbsp_a_SOURCES += gnatsupp/gnatsupp.c
diff --git a/c/src/lib/libbsp/sparc/leon3/Makefile.am b/c/src/lib/libbsp/sparc/leon3/Makefile.am
index 71a020c..a08944b 100644
--- a/c/src/lib/libbsp/sparc/leon3/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon3/Makefile.am
@@ -40,7 +40,6 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/shared/start/bsp_fatal_exi
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/leon3/start/bsp_fatal_halt.c
# ISR Handler
-librtemsbsp_a_SOURCES += ../shared/cpu.c
librtemsbsp_a_SOURCES += ../shared/irq_asm.S
# gnatsupp
librtemsbsp_a_SOURCES += gnatsupp/gnatsupp.c
diff --git a/c/src/lib/libbsp/sparc/shared/cpu.c b/c/src/lib/libbsp/sparc/shared/cpu.c
deleted file mode 100644
index 12d3475..0000000
--- a/c/src/lib/libbsp/sparc/shared/cpu.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * @file
- *
- * @brief SPARC CPU Dependent Source
- */
-
-/*
- * COPYRIGHT (c) 1989-2007.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <rtems/score/cpu.h>
-
-/*
- * This initializes the set of opcodes placed in each trap
- * table entry. The routine which installs a handler is responsible
- * for filling in the fields for the _handler address and the _vector
- * trap type.
- *
- * The constants following this structure are masks for the fields which
- * must be filled in when the handler is installed.
- *
- * This table is defined here to allow BSP specific versions, e.g. for guest
- * systems under paravirtualization.
- */
-
-const CPU_Trap_table_entry _CPU_Trap_slot_template = {
- 0xa1480000, /* mov %psr, %l0 */
- 0x29000000, /* sethi %hi(_handler), %l4 */
- 0x81c52000, /* jmp %l4 + %lo(_handler) */
- 0xa6102000 /* mov _vector, %l3 */
-};
diff --git a/cpukit/score/cpu/sparc/cpu.c b/cpukit/score/cpu/sparc/cpu.c
index 8916a7d..cb94b14 100644
--- a/cpukit/score/cpu/sparc/cpu.c
+++ b/cpukit/score/cpu/sparc/cpu.c
@@ -146,6 +146,22 @@ RTEMS_STATIC_ASSERT(
);
/*
+ * This initializes the set of opcodes placed in each trap
+ * table entry. The routine which installs a handler is responsible
+ * for filling in the fields for the _handler address and the _vector
+ * trap type.
+ *
+ * The constants following this structure are masks for the fields which
+ * must be filled in when the handler is installed.
+ */
+const CPU_Trap_table_entry _CPU_Trap_slot_template = {
+ 0xa1480000, /* mov %psr, %l0 */
+ 0x29000000, /* sethi %hi(_handler), %l4 */
+ 0x81c52000, /* jmp %l4 + %lo(_handler) */
+ 0xa6102000 /* mov _vector, %l3 */
+};
+
+/*
* _CPU_Initialize
*
* This routine performs processor dependent initialization.
More information about the vc
mailing list