Changeset 2700423 in rtems for c/src/lib/libbsp/sparc
- Timestamp:
- Nov 13, 2000, 10:29:14 PM (20 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 3eec211
- Parents:
- 7f5213d
- Location:
- c/src/lib/libbsp/sparc/erc32
- Files:
-
- 5 added
- 3 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/sparc/erc32/ChangeLog
r7f5213d r2700423 1 2000-11-13 Jiri Gaisler <jgais@ws.estec.esa.nl> 2 3 * Makefile.am, configure.in, gnatsupp/Makefile.am, 4 gnatsupp/gnatsupp.c, include/Makefile.am, include/bsp.h, 5 start/Makefile.am, startup/Makefile.am, startup/setvec.c, 6 wrapup/Makefile.am: 7 * erc32sonic: New directory. 8 * erc32sonic/Makefile.am, erc32sonic/erc32sonic.c, 9 erc32sonic/.cvsignore: New files. 10 * include/erc32.h: New file. 11 * startup/boardinit.S: New file. 12 Big update of SPARC support for ERC32 and LEON. 13 Added support for ERC32 without floating point. 14 Added SONIC support as configured on Tharsys ERC32 board. 15 The bsp's share various code in the shared directory: 16 gnat-support, start-up code, etc. 17 To decrease the foot-print, I removed the 16 kbyte start-up 18 stack that was put in .bss and never reused once the system 19 was up. The stack is now put between the heap and the 20 workspace. To reclaim it, the user can do a rtems_region_extend 21 to merge the stack to the heap region once the system is up. 22 1 23 2000-11-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 24 -
c/src/lib/libbsp/sparc/erc32/Makefile.am
r7f5213d r2700423 8 8 # wrapup is the one that actually builds and installs the library 9 9 # from the individual .rel files built in other directories 10 SUBDIRS = . start include startup gnatsupp console clock timer wrapup tools 10 SUBDIRS = . include start startup gnatsupp console clock timer \ 11 erc32sonic wrapup tools 11 12 12 13 include $(top_srcdir)/../../bsp.am -
c/src/lib/libbsp/sparc/erc32/configure.in
r7f5213d r2700423 18 18 RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP) 19 19 RTEMS_CHECK_BSP_CACHE(RTEMS_BSP) 20 RTEMS_CHECK_NETWORKING 20 21 RTEMS_CANONICAL_HOST 22 23 AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes") 21 24 22 25 RTEMS_CONFIG_BUILD_SUBDIRS(tools) … … 29 32 clock/Makefile 30 33 console/Makefile 34 erc32sonic/Makefile 31 35 gnatsupp/Makefile 32 36 include/Makefile -
c/src/lib/libbsp/sparc/erc32/gnatsupp/Makefile.am
r7f5213d r2700423 5 5 AUTOMAKE_OPTIONS = foreign 1.4 6 6 7 VPATH = @srcdir@:@srcdir@/../../ ../shared7 VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared 8 8 9 9 PGM = $(ARCH)/gnatsupp.rel 10 10 11 C_FILES = gnatsupp.c 11 C_FILES = gnatsupp.c gnatcommon.c 12 12 C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o) 13 13 … … 29 29 .PRECIOUS: $(PGM) 30 30 31 EXTRA_DIST = gnatsupp.c 31 EXTRA_DIST = gnatsupp.c gnatcommon.c 32 32 33 33 include $(top_srcdir)/../../../../../../automake/local.am -
c/src/lib/libbsp/sparc/erc32/gnatsupp/gnatsupp.c
r7f5213d r2700423 6 6 */ 7 7 8 #include <bsp.h>9 #include <signal.h>10 11 /*12 * Synchronous trap handler. Map the trap number of SIGFPE, SIGSEGV13 * or SIGILL to generate the corresponding Ada exception.14 */15 16 rtems_isr __gnat_exception_handler17 (rtems_vector_number trap)18 {19 rtems_unsigned32 real_trap;20 rtems_unsigned32 signal;21 22 real_trap = SPARC_REAL_TRAP_NUMBER (trap);23 switch (real_trap)24 {25 case 0x08: /* FPU exception */26 case 0x0A: /* TAG overflow */27 case 0x82: /* divide by zero */28 signal = SIGFPE; /* Will cause Constraint_Error */29 break;30 case 0x01: /* Instruction access exception */31 case 0x09: /* Data access exception */32 signal = SIGSEGV; /* Will cause Storage_Error */33 break;34 default: /* Anything else ... */35 signal = SIGILL; /* Will cause Program_Error */36 break;37 }38 kill (getpid (), signal);39 }40 41 /*42 * Asynchronous trap handler. As it happens, the interrupt trap numbers for43 * SPARC is 17 - 31, so we just map then directly on the same signal number.44 */45 46 rtems_isr __gnat_interrupt_handler47 (rtems_vector_number trap)48 {49 rtems_unsigned32 real_trap;50 51 real_trap = SPARC_REAL_TRAP_NUMBER (trap);52 53 kill (getpid (), real_trap);54 55 }56 57 /*58 * Default signal handler with error reporting59 */60 61 void62 __gnat_signals_Abormal_termination_handler (int signo)63 {64 switch (signo)65 {66 case SIGFPE:67 DEBUG_puts ("\nConstraint_Error\n");68 break;69 case SIGSEGV:70 DEBUG_puts ("\nStorage_Error\n");71 break;72 default:73 DEBUG_puts ("\nProgram_Error\n");74 break;75 }76 exit (1);77 }78 79 const struct sigaction __gnat_error_vector =80 {0, -1,81 {__gnat_signals_Abormal_termination_handler}};82 83 8 void 84 9 __gnat_install_handler () 85 10 { 86 rtems_unsigned32 trap; 87 rtems_isr_entry previous_isr; 88 89 sigaction (SIGSEGV, &__gnat_error_vector, NULL); 90 sigaction (SIGFPE, &__gnat_error_vector, NULL); 91 sigaction (SIGILL, &__gnat_error_vector, NULL); 92 93 for (trap = 0; trap < 256; trap++) 94 { 95 96 /* 97 * Skip window overflow, underflow, and flush as well as software 98 * trap 0 which we will use as a shutdown. Also avoid trap 0x70 - 0x7f 99 * which cannot happen and where some of the space is used to pass 100 * paramaters to the program. Trap 0x1d is used by the clock tick, 101 * 0x80 for system traps and 0x81 - 0x83 by the remote debugging stub. 102 * Avoid 0x15 (UART B interrupt) which is also used by the stub 103 * to generate a 'break-in' interrupt. 104 */ 105 106 if ((trap >= 0x11) && (trap <= 0x1f)) 107 { 108 if ((trap != 0x1d) && (trap != 0x15)) 109 rtems_interrupt_catch (__gnat_interrupt_handler, trap, &previous_isr); 110 } 111 else if ((trap != 5 && trap != 6) && ((trap < 0x70) || (trap > 0x83))) 112 set_vector (__gnat_exception_handler, SPARC_SYNCHRONOUS_TRAP (trap), 1); 113 } 11 __gnat_install_handler_common (0x1d, 0x15); 114 12 } -
c/src/lib/libbsp/sparc/erc32/include/Makefile.am
r7f5213d r2700423 5 5 AUTOMAKE_OPTIONS = foreign 1.4 6 6 7 H_FILES = bsp.h coverhd.h 7 H_FILES = bsp.h coverhd.h erc32.h 8 8 9 9 $(PROJECT_INCLUDE): -
c/src/lib/libbsp/sparc/erc32/include/bsp.h
r7f5213d r2700423 42 42 #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 43 43 #define CONFIGURE_INTERRUPT_STACK_MEMORY (16 * 1024) 44 45 /* 46 * Network driver configuration 47 */ 48 49 struct rtems_bsdnet_ifconfig; 50 extern int rtems_erc32_sonic_driver_attach (struct rtems_bsdnet_ifconfig *config); 51 #define RTEMS_BSP_NETWORK_DRIVER_NAME "sonic1" 52 #define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_erc32_sonic_driver_attach 44 53 45 54 /* -
c/src/lib/libbsp/sparc/erc32/start/Makefile.am
r7f5213d r2700423 4 4 5 5 AUTOMAKE_OPTIONS = foreign 1.4 6 7 VPATH = @srcdir@:@srcdir@/../../shared 6 8 7 9 PGM = $(ARCH)/start.o -
c/src/lib/libbsp/sparc/erc32/startup/Makefile.am
r7f5213d r2700423 5 5 AUTOMAKE_OPTIONS = foreign 1.4 6 6 7 VPATH = @srcdir@:@srcdir@/../../ ../shared7 VPATH = @srcdir@:@srcdir@/../../shared:@srcdir@/../../../shared 8 8 9 9 PGM = $(ARCH)/startup.rel … … 13 13 C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o) 14 14 15 OBJS = $(C_O_FILES) 15 S_FILES = boardinit.S 16 S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.o) 17 18 OBJS = $(C_O_FILES) $(S_O_FILES) 16 19 17 20 include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg … … 38 41 .PRECIOUS: $(PGM) 39 42 40 EXTRA_DIST = bspclean.c bspstart.c linkcmds setvec.c spurious.c43 EXTRA_DIST = linkcmds setvec.c spurious.c boardinit.S 41 44 42 45 include $(top_srcdir)/../../../../../../automake/local.am -
c/src/lib/libbsp/sparc/erc32/startup/setvec.c
r7f5213d r2700423 61 61 } 62 62 63 /* ERC32 power-down function */ 64 65 void _CPU_Thread_Idle_body( void ) 66 { 67 while (1) { 68 ERC32_MEC.Power_Down = 0; /* value is irrelevant */ 69 } 70 } 71 -
c/src/lib/libbsp/sparc/erc32/wrapup/Makefile.am
r7f5213d r2700423 5 5 AUTOMAKE_OPTIONS = foreign 1.4 6 6 7 BSP_PIECES = startup console clock timer gnatsupp 7 # We only build the networking device driver if HAS_NETWORKING was defined 8 if HAS_NETWORKING 9 NETWORKING_DRIVER = erc32sonic 10 endif 11 12 BSP_PIECES = startup console clock timer gnatsupp $(NETWORKING_DRIVER) 8 13 # pieces to pick up out of libcpu/sparc 9 14 CPU_PIECES = reg_win syscall
Note: See TracChangeset
for help on using the changeset viewer.