diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-10-08 15:06:52 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-10-10 10:16:57 -0500 |
commit | 8536b67bab9886ea992f08fe23e35a84579df573 (patch) | |
tree | 4d4997eacaacc0ea4ecbb6f6a8f10797dfe731a6 | |
parent | arm: Fix warning (diff) | |
download | rtems-8536b67bab9886ea992f08fe23e35a84579df573.tar.bz2 |
Move Mongoose-V specific devices into BSP.
Putting the duart in libcpu was very optimistic and presumptuous.
It has never been used again on another SoC and is BSP specific.
15 files changed, 85 insertions, 45 deletions
diff --git a/c/src/lib/libbsp/mips/genmongoosev/Makefile.am b/c/src/lib/libbsp/mips/genmongoosev/Makefile.am index fe21df4d9d..a99fd56056 100644 --- a/c/src/lib/libbsp/mips/genmongoosev/Makefile.am +++ b/c/src/lib/libbsp/mips/genmongoosev/Makefile.am @@ -16,6 +16,11 @@ include_bsp_HEADERS += include/irq.h nodist_include_HEADERS = include/bspopts.h nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h +nodist_include_bsp_HEADERS += include/lr33000.h +nodist_include_bsp_HEADERS += include/lr333x0.h +nodist_include_bsp_HEADERS += include/mongoose-v.h +nodist_include_bsp_HEADERS += include/r3000.h +nodist_include_bsp_HEADERS += console/mg5uart.h DISTCLEANFILES = include/bspopts.h noinst_PROGRAMS = @@ -47,6 +52,7 @@ libbsp_a_SOURCES += clock/clockdrv.c libbsp_a_SOURCES += ../../shared/clockdrv_shell.h # console libbsp_a_SOURCES += console/conscfg.c +libbsp_a_SOURCES += console/mg5uart.c libbsp_a_SOURCES += ../../shared/console.c libbsp_a_SOURCES += ../../shared/console_select.c libbsp_a_SOURCES += ../../shared/console_control.c @@ -75,7 +81,6 @@ gdbstub_rel_LDFLAGS = $(RTEMS_RELLDFLAGS) libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/cache.rel libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/interrupts.rel -libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/mongoosev/duart.rel include $(srcdir)/preinstall.am include $(top_srcdir)/../../../../automake/local.am diff --git a/c/src/lib/libbsp/mips/genmongoosev/README b/c/src/lib/libbsp/mips/genmongoosev/README index 97db696554..d8b9bd5b99 100644 --- a/c/src/lib/libbsp/mips/genmongoosev/README +++ b/c/src/lib/libbsp/mips/genmongoosev/README @@ -1,6 +1,56 @@ BSP supporting the on-CPU capabilities of the Synova Mongoose-V. -This BSP assumes that basic HW initialization is performed by -PMON. +The Synova Mongoose-V is a radiation hardened derivative of the +LSI 33K with on-CPU peripherals. + +This BSP assumes that basic HW initialization is performed by PMON. + +Status +====== +Per-task floating point enable/disable is supported for both immediate +and deferred FPU context swaps. + +Interrupt Levels are adapted reasonably well to the MIPS interrupt +model. Bit 0 of the int level is a global enable/disable, corresponding +to bit 0 of the processor's SR register. Bits 1 thru 6 are configured +as masks for the Int0 thru Int5 interrupts. The 2 software interrupt +bits are always enabled by default. Each task maintains its own +Interrupt Level setting, reconfiguring the SR register's interrupt bits +whenever scheduled in. The software ints, though not addressable via +the various Interrupt Level functions, are maintained on a per-task +basis, so if software manipulates them directly, things should behave as +expected. At the time of these udpates, the Interrupt Level was only 8 +bits, and completely supporting the global enable, software ints and the +hardware ints would require 9 bits. When more than 8 bits are +available, there is no reason the software interrupts could not be added +to the Interrupt Level. + +While supporting the Int0 thru Int5 bits in this way doesn't seem +wonderfully useful, it does increase the level of compliance with the +RTEMS spec. + +Interrupt Level 0 corresponds to interrupts globally enabled, software +ints enabled and Int0 thru Int5 enabled. If values other than 0 are +supplied, they should be formulated to impose the desired bitmask. +Interrupt priority is not a strong concept on this bsp, it is provided +only by the order in which interrupts are checked. + +If during the vectoring of an interrupt, others arrive, they will all be +processed in accordance with their ordering in SR & the peripheral +register. For example, if while we're vectoring Int4, Int3 and Int5 are +asserted, Int3 will be serviced before Int5. The peripheral interrupts +are individually vectored as a consequence of Int5 being asserted, +however Int5 is not itself vectored. Within the set of peripheral +interrupts, bit 0 is vectored first, 31 is last. + +Interrupts are not nested for MIPS1 or MIPS3 processors, but are +processed serially as possible. On an unloaded 50 task RTEMS program, +runnning on a 12mhz MIPS1 processor, worst-case latencies of 100us were +observed, the average being down at 60us or below. + + +These features are principally a consequence of fixes and tweaks to the +MIPS1 and MIPS3 processor support, and should be equally effective on +both levels of MIPS processors for any of their bsp's. Address Map =========== diff --git a/c/src/lib/libcpu/mips/mongoosev/duart/README.mguart b/c/src/lib/libbsp/mips/genmongoosev/console/README.mguart index 8073ab7526..8073ab7526 100644 --- a/c/src/lib/libcpu/mips/mongoosev/duart/README.mguart +++ b/c/src/lib/libbsp/mips/genmongoosev/console/README.mguart diff --git a/c/src/lib/libbsp/mips/genmongoosev/console/conscfg.c b/c/src/lib/libbsp/mips/genmongoosev/console/conscfg.c index 61ac56e04a..87df736cde 100644 --- a/c/src/lib/libbsp/mips/genmongoosev/console/conscfg.c +++ b/c/src/lib/libbsp/mips/genmongoosev/console/conscfg.c @@ -21,7 +21,7 @@ #include <bsp/irq.h> #include <libchip/serial.h> -#include <libchip/mg5uart.h> +#include <bsp/mg5uart.h> /* #define CONSOLE_USE_INTERRUPTS */ diff --git a/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.c b/c/src/lib/libbsp/mips/genmongoosev/console/mg5uart.c index 50f6586aa7..e3243adf9d 100644 --- a/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.c +++ b/c/src/lib/libbsp/mips/genmongoosev/console/mg5uart.c @@ -20,9 +20,9 @@ #include <stdlib.h> #include <libchip/serial.h> -#include <libchip/mg5uart.h> #include <libchip/sersupp.h> -#include <libcpu/mongoose-v.h> +#include <bsp/mg5uart.h> +#include <bsp/mongoose-v.h> #include <bsp/irq.h> #include <bsp.h> diff --git a/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.h b/c/src/lib/libbsp/mips/genmongoosev/console/mg5uart.h index fa7bed6522..fa7bed6522 100644 --- a/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.h +++ b/c/src/lib/libbsp/mips/genmongoosev/console/mg5uart.h diff --git a/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart_reg.c b/c/src/lib/libbsp/mips/genmongoosev/console/mg5uart_reg.c index 134695fb98..134695fb98 100644 --- a/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart_reg.c +++ b/c/src/lib/libbsp/mips/genmongoosev/console/mg5uart_reg.c diff --git a/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h b/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h index da4c198c65..5146b7f303 100644 --- a/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h +++ b/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h @@ -28,7 +28,7 @@ extern "C" { #include <rtems/iosupp.h> #include <rtems/console.h> #include <rtems/clockdrv.h> -#include <libcpu/mongoose-v.h> +#include <bsp/mongoose-v.h> #define BSP_FEATURE_IRQ_EXTENSION #define BSP_SHARED_HANDLER_SUPPORT 1 diff --git a/c/src/lib/libcpu/mips/mongoosev/include/mongoose-v.h b/c/src/lib/libbsp/mips/genmongoosev/include/mongoose-v.h index b8ded3d9ed..b8ded3d9ed 100644 --- a/c/src/lib/libcpu/mips/mongoosev/include/mongoose-v.h +++ b/c/src/lib/libbsp/mips/genmongoosev/include/mongoose-v.h diff --git a/c/src/lib/libbsp/mips/genmongoosev/irq/vectorisrs.c b/c/src/lib/libbsp/mips/genmongoosev/irq/vectorisrs.c index 8a23643f75..b7210f7c84 100644 --- a/c/src/lib/libbsp/mips/genmongoosev/irq/vectorisrs.c +++ b/c/src/lib/libbsp/mips/genmongoosev/irq/vectorisrs.c @@ -15,7 +15,7 @@ #include <rtems.h> #include <stdlib.h> -#include <libcpu/mongoose-v.h> +#include <bsp/mongoose-v.h> #include <rtems/mips/iregdef.h> #include <rtems/mips/idtcpu.h> diff --git a/c/src/lib/libbsp/mips/genmongoosev/preinstall.am b/c/src/lib/libbsp/mips/genmongoosev/preinstall.am index f11c87a502..e5988a4ce5 100644 --- a/c/src/lib/libbsp/mips/genmongoosev/preinstall.am +++ b/c/src/lib/libbsp/mips/genmongoosev/preinstall.am @@ -69,6 +69,26 @@ $(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INC $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h +$(PROJECT_INCLUDE)/bsp/lr33000.h: include/lr33000.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/lr33000.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/lr33000.h + +$(PROJECT_INCLUDE)/bsp/lr333x0.h: include/lr333x0.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/lr333x0.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/lr333x0.h + +$(PROJECT_INCLUDE)/bsp/mongoose-v.h: include/mongoose-v.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/mongoose-v.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/mongoose-v.h + +$(PROJECT_INCLUDE)/bsp/r3000.h: include/r3000.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/r3000.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/r3000.h + +$(PROJECT_INCLUDE)/bsp/mg5uart.h: console/mg5uart.h $(PROJECT_INCLUDE)/bsp/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/mg5uart.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/mg5uart.h + $(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h diff --git a/c/src/lib/libbsp/mips/genmongoosev/startup/bspstart.c b/c/src/lib/libbsp/mips/genmongoosev/startup/bspstart.c index 744dd691f6..a8dd2cb07c 100644 --- a/c/src/lib/libbsp/mips/genmongoosev/startup/bspstart.c +++ b/c/src/lib/libbsp/mips/genmongoosev/startup/bspstart.c @@ -23,7 +23,7 @@ #include <string.h> #include <bsp.h> -#include <libcpu/mongoose-v.h> +#include <bsp/mongoose-v.h> #include <libcpu/isr_entries.h> #include <bsp/irq-generic.h> diff --git a/c/src/lib/libbsp/mips/genmongoosev/startup/gdb-support.c b/c/src/lib/libbsp/mips/genmongoosev/startup/gdb-support.c index 5f6ec0d942..481774e3d4 100644 --- a/c/src/lib/libbsp/mips/genmongoosev/startup/gdb-support.c +++ b/c/src/lib/libbsp/mips/genmongoosev/startup/gdb-support.c @@ -11,7 +11,7 @@ #include <rtems.h> #include <rtems/bspIo.h> -#include <libcpu/mongoose-v.h> +#include <bsp/mongoose-v.h> #include "gdb_if.h" #include <rtems/libio.h> diff --git a/c/src/lib/libcpu/mips/Makefile.am b/c/src/lib/libcpu/mips/Makefile.am index 6dc6258b76..e4dd7caf33 100644 --- a/c/src/lib/libcpu/mips/Makefile.am +++ b/c/src/lib/libcpu/mips/Makefile.am @@ -31,10 +31,6 @@ if tx49 interrupts_CPPFLAGS = -DTX49 endif -if mongoosev -interrupts_CPPFLAGS = -DMONGOOSEV -endif - noinst_PROGRAMS += shared/interrupts.rel shared_interrupts_rel_SOURCES = shared/interrupts/installisrentries.c \ shared/interrupts/isr_entries.S shared/interrupts/isr_entries.h @@ -42,23 +38,6 @@ shared_interrupts_rel_CPPFLAGS = $(AM_CPPFLAGS) $(interrupts_CPPFLAGS) shared_interrupts_rel_LDFLAGS = $(RTEMS_RELLDFLAGS) include_libcpu_HEADERS += shared/interrupts/isr_entries.h -EXTRA_DIST += mongoosev/README -EXTRA_DIST += mongoosev/duart/README.mguart -if mongoosev -include_libcpu_HEADERS += mongoosev/include/mongoose-v.h - -## mongoosev/duart -include_libchipdir = $(includedir)/libchip -include_libchip_HEADERS = mongoosev/duart/mg5uart.h - -noinst_PROGRAMS += mongoosev/duart.rel -mongoosev_duart_rel_SOURCES = mongoosev/duart/mg5uart.c \ - mongoosev/duart/mg5uart.h mongoosev/duart/mg5uart_reg.c -mongoosev_duart_rel_CPPFLAGS = $(AM_CPPFLAGS) -mongoosev_duart_rel_LDFLAGS = $(RTEMS_RELLDFLAGS) - -endif - if tx39 include_libcpu_HEADERS += tx39/include/tx3904.h endif diff --git a/c/src/lib/libcpu/mips/preinstall.am b/c/src/lib/libcpu/mips/preinstall.am index 4a83d60afb..85aec82749 100644 --- a/c/src/lib/libcpu/mips/preinstall.am +++ b/c/src/lib/libcpu/mips/preinstall.am @@ -26,20 +26,6 @@ $(PROJECT_INCLUDE)/libcpu/isr_entries.h: shared/interrupts/isr_entries.h $(PROJE $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/isr_entries.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/isr_entries.h -if mongoosev -$(PROJECT_INCLUDE)/libcpu/mongoose-v.h: mongoosev/include/mongoose-v.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/mongoose-v.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/mongoose-v.h - -$(PROJECT_INCLUDE)/libchip/$(dirstamp): - @$(MKDIR_P) $(PROJECT_INCLUDE)/libchip - @: > $(PROJECT_INCLUDE)/libchip/$(dirstamp) -PREINSTALL_DIRS += $(PROJECT_INCLUDE)/libchip/$(dirstamp) - -$(PROJECT_INCLUDE)/libchip/mg5uart.h: mongoosev/duart/mg5uart.h $(PROJECT_INCLUDE)/libchip/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/mg5uart.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/mg5uart.h -endif if tx39 $(PROJECT_INCLUDE)/libcpu/tx3904.h: tx39/include/tx3904.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/tx3904.h |