diff options
50 files changed, 0 insertions, 4935 deletions
diff --git a/c/src/lib/libbsp/i386/force386/Makefile.in b/c/src/lib/libbsp/i386/force386/Makefile.in deleted file mode 100644 index 59fa172305..0000000000 --- a/c/src/lib/libbsp/i386/force386/Makefile.in +++ /dev/null @@ -1,31 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../.. -subdir = i386/force386 - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/directory.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# We only build the multiprocessing support if HAS_MP was defined -MP_SUPPORT_yes_V = shmsupp -MP_SUPPORT = $(MP_SUPPORT_$(HAS_MP)_V) - -# wrapup is the one that actually builds and installs the library -# from the individual .rel files built in other directories -SUB_DIRS = include start startup clock console $(MP_SUPPORT) timer wrapup - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/force386/bsp_specs b/c/src/lib/libbsp/i386/force386/bsp_specs deleted file mode 100644 index 61dac86b53..0000000000 --- a/c/src/lib/libbsp/i386/force386/bsp_specs +++ /dev/null @@ -1,23 +0,0 @@ -%rename cpp old_cpp -%rename lib old_lib -%rename endfile old_endfile -%rename startfile old_startfile -%rename link old_link - -*cpp: -%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded) - -*lib: -%{!qrtems: %(old_lib)} %{qrtems: --start-group \ -%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \ --lc -lgcc --end-group \ -%{!qnolinkcmds: -T linkcmds%s}} - -*startfile: -%{!qrtems: %(old_startfile)} %{qrtems: \ -%{!qrtems_debug: start.o%s} \ -%{qrtems_debug: start_g.o%s}} - -*link: -%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start} - diff --git a/c/src/lib/libbsp/i386/force386/clock/Makefile.in b/c/src/lib/libbsp/i386/force386/clock/Makefile.in deleted file mode 100644 index 7b48d0d316..0000000000 --- a/c/src/lib/libbsp/i386/force386/clock/Makefile.in +++ /dev/null @@ -1,65 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/force386/clock - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGM = ${ARCH}/clock.rel - -# C source names, if any, go here -- minus the .c -C_PIECES = ckinit -C_FILES = $(C_PIECES:%=%.c) -C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) - -H_FILES = - -SRCS = $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/force386/clock/ckinit.c b/c/src/lib/libbsp/i386/force386/clock/ckinit.c deleted file mode 100644 index 947b777654..0000000000 --- a/c/src/lib/libbsp/i386/force386/clock/ckinit.c +++ /dev/null @@ -1,135 +0,0 @@ -/* Clock_initialize - * - * This routine initializes the Motorola MFP 68901 on the - * FORCE CPU386 board. The tick frequency is 1 millisecond. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> - -#include <rtems/libio.h> - -#include <stdlib.h> - -#define CLOCK_VECTOR 0x38 - -rtems_unsigned32 Clock_isrs; /* ISRs until next tick */ - -volatile rtems_unsigned32 Clock_driver_ticks; - -rtems_isr_entry Old_ticker; - -void Clock_exit( void ); - -/* - * These are set by clock driver during its init - */ - -rtems_device_major_number rtems_clock_major = ~0; -rtems_device_major_number rtems_clock_minor = 0; - -/* - * This is the ISR handler. - */ - -rtems_isr Clock_isr( - rtems_vector_number vector -) -{ - /* enable_tracing(); */ - Clock_driver_ticks += 1; - if ( Clock_isrs == 1 ) { - rtems_clock_tick(); - Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000; - } - else - Clock_isrs -= 1; -} - -void Install_clock( - rtems_isr_entry clock_isr -) -{ - Clock_driver_ticks = 0; - Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000; - - if ( BSP_Configuration.ticks_per_timeslice ) { - Old_ticker = ( rtems_isr_entry ) set_vector( clock_isr, CLOCK_VECTOR, 1 ); - outport_byte( TBCR, 0x14 ); /* reset it, delay mode, 50X */ - outport_byte( TBDR, 0x50 ); /* 1 millisecond */ - outport_byte( IERA, 0x41 ); /* enable interrupt for B */ - } - atexit( Clock_exit ); -} - -void Clock_exit( void ) -{ - if ( BSP_Configuration.ticks_per_timeslice ) { - outport_byte( TBCR, 0x00 ); /* initial value */ - outport_byte( IERA, 0x40 ); /* disable interrupt */ - /* ??? Is "do not restore old vector" causing problems? */ - } -} - -rtems_device_driver Clock_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - Install_clock( Clock_isr ); - - /* - * make major/minor avail to others such as shared memory driver - */ - - rtems_clock_major = major; - rtems_clock_minor = minor; - - return RTEMS_SUCCESSFUL; -} - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - rtems_unsigned32 isrlevel; - rtems_libio_ioctl_args_t *args = pargp; - - if (args == 0) - goto done; - - /* - * This is hokey, but until we get a defined interface - * to do this, it will just be this simple... - */ - - if (args->command == rtems_build_name('I', 'S', 'R', ' ')) - { - Clock_isr(CLOCK_VECTOR); - } - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) - { - rtems_interrupt_disable( isrlevel ); - (void) set_vector( args->buffer, CLOCK_VECTOR, 1 ); - rtems_interrupt_enable( isrlevel ); - } - -done: - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libbsp/i386/force386/console/Makefile.in b/c/src/lib/libbsp/i386/force386/console/Makefile.in deleted file mode 100644 index ce5401f88f..0000000000 --- a/c/src/lib/libbsp/i386/force386/console/Makefile.in +++ /dev/null @@ -1,65 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/force386/console - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGM = ${ARCH}/console.rel - -# C source names, if any, go here -- minus the .c -C_PIECES = console -C_FILES = $(C_PIECES:%=%.c) -C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) - -H_FILES = - -SRCS = $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/force386/console/console.c b/c/src/lib/libbsp/i386/force386/console/console.c deleted file mode 100644 index bf669748f8..0000000000 --- a/c/src/lib/libbsp/i386/force386/console/console.c +++ /dev/null @@ -1,285 +0,0 @@ -/* - * This file contains the Force CPU386 console IO package. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#define F386_INIT - -#include <bsp.h> -#include <rtems/libio.h> - -#include <stdlib.h> - -/* console_cleanup - * - * This routine is called at exit to clean up the console hardware. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - */ - -void console_cleanup( void ) -{ - register rtems_unsigned8 ignored; - /* - * FORCE technical support mentioned that it may be necessary to - * read the DUSCC RX_BUFFER port four times to remove all junk. - * This code is a little more paranoid. - */ - - inport_byte( RX_BUFFER, ignored ); - inport_byte( RX_BUFFER, ignored ); - inport_byte( RX_BUFFER, ignored ); - inport_byte( RX_BUFFER, ignored ); - inport_byte( RX_BUFFER, ignored ); -} - -/* console_initialize - * - * This routine initializes the console IO driver. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - */ - -rtems_device_driver console_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg -) -{ - rtems_status_code status; - - /* - * flush the console now and at exit. Just in case. - */ - - console_cleanup(); - - status = rtems_io_register_name( - "/dev/console", - major, - (rtems_device_minor_number) 0 - ); - - if (status != RTEMS_SUCCESSFUL) - rtems_fatal_error_occurred(status); - - atexit( console_cleanup ); - - return RTEMS_SUCCESSFUL; -} - - -/* is_character_ready - * - * This routine returns TRUE if a character is available. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - */ - -rtems_boolean is_character_ready( - char *ch -) -{ - register rtems_unsigned8 status; - - inport_byte( RX_STATUS, status ); - - if ( Is_rx_ready( status ) ) { - inport_byte( RX_BUFFER, status ); - *ch = status; - return TRUE; - } - return FALSE; -} - -/* inbyte - * - * This routine reads a character from the UART. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - * character read from UART - */ - -char inbyte( void ) -{ - register rtems_unsigned8 status; - char ch; - - do { - inport_byte( RX_STATUS, status ); - } while ( !Is_rx_ready( status ) ); - -#if ( PORTB == 1 ) - /* - * Force example code resets the Channel B Receiver here. - * It appears to cause XON's to be lost. - */ - - /* outport_byte( RX_STATUS, 0x10 ); */ -#endif - - inport_byte( RX_BUFFER, ch ); - - return ch; -} - -/* outbyte - * - * This routine transmits a character out the port. It supports - * XON/XOFF flow control. - * - * Input parameters: - * ch - character to be transmitted - * - * Output parameters: NONE - */ - -void outbyte( - char ch -) -{ - rtems_unsigned8 status; - - do { - inport_byte( TX_STATUS, status ); - } while ( !Is_tx_ready( status ) ); - -#if 0 - while ( is_character_ready( &status ) == TRUE ) { /* must be an XOFF */ - if ( status == XOFF ) - do { - while ( is_character_ready( &status ) == FALSE ) ; - } while ( status != XON ); - } -#endif - - outport_byte( TX_BUFFER, ch ); -} - -/* - * Open entry point - */ - -rtems_device_driver console_open( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} - -/* - * Close entry point - */ - -rtems_device_driver console_close( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} - -/* - * read bytes from the serial port. We only have stdin. - */ - -rtems_device_driver console_read( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - rtems_libio_rw_args_t *rw_args; - char *buffer; - int maximum; - int count = 0; - - rw_args = (rtems_libio_rw_args_t *) arg; - - buffer = rw_args->buffer; - maximum = rw_args->count; - - for (count = 0; count < maximum; count++) { - buffer[ count ] = inbyte(); - if (buffer[ count ] == '\n' || buffer[ count ] == '\r') { - buffer[ count++ ] = '\n'; - break; - } - } - - rw_args->bytes_moved = count; - return (count >= 0) ? RTEMS_SUCCESSFUL : RTEMS_UNSATISFIED; -} - -/* - * write bytes to the serial port. Stdout and stderr are the same. - */ - -rtems_device_driver console_write( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - int count; - int maximum; - rtems_libio_rw_args_t *rw_args; - char *buffer; - - rw_args = (rtems_libio_rw_args_t *) arg; - - buffer = rw_args->buffer; - maximum = rw_args->count; - - for (count = 0; count < maximum; count++) { - if ( buffer[ count ] == '\n') { - outbyte('\r'); - } - outbyte( buffer[ count ] ); - } - - rw_args->bytes_moved = maximum; - return 0; -} - -/* - * IO Control entry point - */ - -rtems_device_driver console_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} - diff --git a/c/src/lib/libbsp/i386/force386/include/Makefile.in b/c/src/lib/libbsp/i386/force386/include/Makefile.in deleted file mode 100644 index 40235277b8..0000000000 --- a/c/src/lib/libbsp/i386/force386/include/Makefile.in +++ /dev/null @@ -1,50 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/force386/include - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.h - -# -# Equate files are for including from assembly preprocessed by -# gm4 or gasp. No examples are provided except for those for -# other CPUs. The best way to generate them would be to -# provide a program which generates the constants used based -# on the C equivalents. -# - -EQ_FILES = - -SRCS = $(H_FILES) $(EQ_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ -mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs - -INSTALLDIRS = $(PROJECT_INCLUDE) - -$(INSTALLDIRS): - @$(mkinstalldirs) $(INSTALLDIRS) - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -all: $(SRCS) - @$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE) - @$(INSTALL_CHANGE) -m 644 $(EQ_FILES) $(PROJECT_INCLUDE) - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/force386/include/bsp.h b/c/src/lib/libbsp/i386/force386/include/bsp.h deleted file mode 100644 index 63e06e2326..0000000000 --- a/c/src/lib/libbsp/i386/force386/include/bsp.h +++ /dev/null @@ -1,173 +0,0 @@ -/* bsp.h - * - * This include file definitions related to the Force CPU-386 board. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __FORCE386_h -#define __FORCE386_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include <rtems.h> -#include <iosupp.h> -#include <console.h> -#include <clockdrv.h> - -/* - * Define the time limits for RTEMS Test Suite test durations. - * Long test and short test duration limits are provided. These - * values are in seconds and need to be converted to ticks for the - * application. - * - */ - -#define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ -#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ - -/* - * Define the interrupt mechanism for Time Test 27 - * - * NOTE: Use a software interrupt for the i386. - */ - -#define MUST_WAIT_FOR_INTERRUPT 0 - -#define Install_tm27_vector( handler ) set_vector( (handler), 0x90, 1 ) - -#define Cause_tm27_intr() asm volatile( "int $0x90" : : ); - -#define Clear_tm27_intr() - -#define Lower_tm27_intr() - -/* - * Simple spin delay in microsecond units for device drivers. - * This is very dependent on the clock speed of the target. - */ - -#define delay( _microseconds ) \ - { \ - rtems_unsigned32 _counter; \ - \ - _counter = (_microseconds); \ - \ - asm volatile ( "0: nop;" \ - " mov %0,%0 ;" \ - " loop 0b" : "=c" (_counter) \ - : "0" (_counter) \ - ); \ - \ - } - -/* Constants */ - -#define RAM_START 0 -#define RAM_END 0x100000 - -/* I/O addressing */ - -/* - * The following determines whether Port B or the Console should - * be used for test I/O. Setting ONE (and only ONE) of these to 1 - * enables I/O on that port. - * - * PORT A - DUSCC MC68562 Channel A - * PORT B - DUSCC MC68562 Channel B - * PORT C - MFP MC68901 Channel (*** FORCEbug console ***) - */ - -#define PORTB 1 /* use port b as test port */ -#define PORTC 0 /* use console port as test port */ - -#if ( PORTB == 1 ) -#define TX_STATUS 0x1b6 /* DUSCC General Status Register */ -#define RX_STATUS 0x1b6 /* DUSCC General Status Register */ -#define TX_BUFFER 0x1e0 /* DUSCC Transmitter Channel B */ -#define RX_BUFFER 0x1e8 /* DUSCC Receiver Channel B */ -#define Is_tx_ready( _status ) ( (_status) & 0x20 ) -#define Is_rx_ready( _status ) ( (_status) & 0x10 ) -#endif - -#if ( PORTC == 1 ) -#define TX_STATUS 0x12c /* MFP Transmit Status Register */ -#define RX_STATUS 0x12a /* MFP Receive Status Register */ -#define TX_BUFFER 0x12e /* MFP Transmitter Channel */ -#define RX_BUFFER 0x12e /* MFP Receiver Channel */ -#define Is_tx_ready( _status ) ( (_status) & 0x80 ) -#define Is_rx_ready( _status ) ( (_status) & 0x80 ) -#endif - -/* Timer constants */ - -#define IERA 0x106 /* Interrupt Enable Register A */ -#define IMRA 0x112 /* Interrupt Mask Register A */ -#define TACR 0x118 /* Timer A Control Register */ -#define TADR 0x11e /* Timer A Data Register */ - -#define IERB 0x108 /* Interrupt Enable Register B */ -#define TBCR 0x11a /* Timer B Control Register */ -#define TBDR 0x120 /* Timer B Data Register */ - -/* Structures */ - -#ifdef F386_INIT -#undef BSP_EXTERN -#define BSP_EXTERN -#else -#undef BSP_EXTERN -#define BSP_EXTERN extern -#endif - -/* - * Device Driver Table Entries - */ - -/* - * NOTE: Use the standard Console driver entry - */ - -/* - * NOTE: Use the standard Clock driver entry - */ - -/* miscellaneous stuff assumed to exist */ - -extern rtems_configuration_table BSP_Configuration; - -#define IDT_SIZE 256 -#define GDT_SIZE 8192 - -extern interrupt_gate_descriptor Interrupt_descriptor_table[IDT_SIZE]; -extern segment_descriptors Global_descriptor_table [GDT_SIZE]; - -BSP_EXTERN unsigned short Idt[3]; /* Interrupt Descriptor Table Address */ -BSP_EXTERN unsigned short Gdt[3]; /* Global Descriptor Table Address */ -BSP_EXTERN unsigned int Idt_base; -BSP_EXTERN unsigned int Gdt_base; - -/* routines */ - -i386_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/libbsp/i386/force386/include/coverhd.h b/c/src/lib/libbsp/i386/force386/include/coverhd.h deleted file mode 100644 index de5e7aa742..0000000000 --- a/c/src/lib/libbsp/i386/force386/include/coverhd.h +++ /dev/null @@ -1,104 +0,0 @@ -/* coverhd.h - * - * This include file has defines to represent the overhead associated - * with calling a particular directive from C on this target. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __COVERHD_h -#define __COVERHD_h - -#ifdef __cplusplus -extern "C" { -#endif - -#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 3 -#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 3 -#define CALLING_OVERHEAD_TASK_CREATE 4 -#define CALLING_OVERHEAD_TASK_IDENT 4 -#define CALLING_OVERHEAD_TASK_START 4 -#define CALLING_OVERHEAD_TASK_RESTART 3 -#define CALLING_OVERHEAD_TASK_DELETE 3 -#define CALLING_OVERHEAD_TASK_SUSPEND 3 -#define CALLING_OVERHEAD_TASK_RESUME 3 -#define CALLING_OVERHEAD_TASK_SET_PRIORITY 4 -#define CALLING_OVERHEAD_TASK_MODE 4 -#define CALLING_OVERHEAD_TASK_GET_NOTE 4 -#define CALLING_OVERHEAD_TASK_SET_NOTE 4 -#define CALLING_OVERHEAD_TASK_WAKE_WHEN 7 -#define CALLING_OVERHEAD_TASK_WAKE_AFTER 3 -#define CALLING_OVERHEAD_INTERRUPT_CATCH 4 -#define CALLING_OVERHEAD_CLOCK_GET 7 -#define CALLING_OVERHEAD_CLOCK_SET 7 -#define CALLING_OVERHEAD_CLOCK_TICK 2 - -#define CALLING_OVERHEAD_TIMER_CREATE 3 -#define CALLING_OVERHEAD_TIMER_IDENT 3 -#define CALLING_OVERHEAD_TIMER_DELETE 3 -#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 4 -#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 8 -#define CALLING_OVERHEAD_TIMER_RESET 3 -#define CALLING_OVERHEAD_TIMER_CANCEL 3 -#define CALLING_OVERHEAD_SEMAPHORE_CREATE 4 -#define CALLING_OVERHEAD_SEMAPHORE_DELETE 3 -#define CALLING_OVERHEAD_SEMAPHORE_IDENT 4 -#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 4 -#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 3 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 4 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 4 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 3 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 3 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 3 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 4 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 4 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 3 - -#define CALLING_OVERHEAD_EVENT_SEND 4 -#define CALLING_OVERHEAD_EVENT_RECEIVE 4 -#define CALLING_OVERHEAD_SIGNAL_CATCH 3 -#define CALLING_OVERHEAD_SIGNAL_SEND 3 -#define CALLING_OVERHEAD_PARTITION_CREATE 4 -#define CALLING_OVERHEAD_PARTITION_IDENT 4 -#define CALLING_OVERHEAD_PARTITION_DELETE 3 -#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 4 -#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 4 -#define CALLING_OVERHEAD_REGION_CREATE 4 -#define CALLING_OVERHEAD_REGION_IDENT 3 -#define CALLING_OVERHEAD_REGION_DELETE 3 -#define CALLING_OVERHEAD_REGION_GET_SEGMENT 4 -#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 4 -#define CALLING_OVERHEAD_PORT_CREATE 4 -#define CALLING_OVERHEAD_PORT_IDENT 3 -#define CALLING_OVERHEAD_PORT_DELETE 3 -#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 4 -#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 4 - -#define CALLING_OVERHEAD_IO_INITIALIZE 4 -#define CALLING_OVERHEAD_IO_OPEN 4 -#define CALLING_OVERHEAD_IO_CLOSE 4 -#define CALLING_OVERHEAD_IO_READ 4 -#define CALLING_OVERHEAD_IO_WRITE 4 -#define CALLING_OVERHEAD_IO_CONTROL 4 -#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 3 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 3 -#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 3 -#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 3 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 3 -#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 3 -#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 2 - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/libbsp/i386/force386/shmsupp/Makefile.in b/c/src/lib/libbsp/i386/force386/shmsupp/Makefile.in deleted file mode 100644 index bce7fda89d..0000000000 --- a/c/src/lib/libbsp/i386/force386/shmsupp/Makefile.in +++ /dev/null @@ -1,65 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/force386/shmsupp - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGM = ${ARCH}/shmsupp.rel - -# C source names, if any, go here -- minus the .c -C_PIECES = addrconv getcfg lock mpisr -C_FILES = $(C_PIECES:%=%.c) -C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) - -H_FILES = - -SRCS = $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/force386/shmsupp/addrconv.c b/c/src/lib/libbsp/i386/force386/shmsupp/addrconv.c deleted file mode 100644 index 6a38f515f6..0000000000 --- a/c/src/lib/libbsp/i386/force386/shmsupp/addrconv.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Shm_Convert_address - * - * The CPU386 has a "normal" view of the VME address space. - * No address range conversion is required. - * - * Input parameters: - * address - address to convert - * - * Output parameters: - * returns - converted address - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> -#include <shm.h> - -void *Shm_Convert_address( - void *address -) -{ - return ( address ); -} diff --git a/c/src/lib/libbsp/i386/force386/shmsupp/getcfg.c b/c/src/lib/libbsp/i386/force386/shmsupp/getcfg.c deleted file mode 100644 index b10d5bf4fe..0000000000 --- a/c/src/lib/libbsp/i386/force386/shmsupp/getcfg.c +++ /dev/null @@ -1,73 +0,0 @@ -/* void Shm_Get_configuration( localnode, &shmcfg ) - * - * This routine initializes, if necessary, and returns a pointer - * to the Shared Memory Configuration Table for the FORCE CPU-386 - * - * INPUT PARAMETERS: - * localnode - local node number - * shmcfg - address of pointer to SHM Config Table - * - * OUTPUT PARAMETERS: - * *shmcfg - pointer to SHM Config Table - * - * NOTES: The FORCE CPU-386 does not have an interprocessor interrupt. - * - * The following table illustrates the configuration limitations: - * - * BUS MAX - * MODE ENDIAN NODES - * ========= ====== ======= - * POLLED BIG 2+ - * INTERRUPT **** NOT SUPPORTED **** - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <rtems.h> -#include <shm.h> -#include <bsp.h> - -#define INTERRUPT 0 -#define POLLING 1 /* FORCE CPU-386 target is polling ONLY!!! */ - - -shm_config_table BSP_shm_cfgtbl; - -void Shm_Get_configuration( - rtems_unsigned32 localnode, - shm_config_table **shmcfg -) -{ - set_segment( get_ds(), 0x00002000, 0xffffd000 ); - - BSP_shm_cfgtbl.base = i386_Physical_to_logical( - get_ds(), - (void *) 0x20000000 - ); - - BSP_shm_cfgtbl.length = 1 * MEGABYTE; - BSP_shm_cfgtbl.format = SHM_BIG; - - BSP_shm_cfgtbl.cause_intr = Shm_Cause_interrupt; - -#ifdef NEUTRAL_BIG - BSP_shm_cfgtbl.convert = NULL_CONVERT; -#else - BSP_shm_cfgtbl.convert = CPU_swap_u32; -#endif - - BSP_shm_cfgtbl.poll_intr = POLLED_MODE; - BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT; - BSP_shm_cfgtbl.Intr.value = NO_INTERRUPT; - BSP_shm_cfgtbl.Intr.length = NO_INTERRUPT; - - *shmcfg = &BSP_shm_cfgtbl; -} diff --git a/c/src/lib/libbsp/i386/force386/shmsupp/lock.c b/c/src/lib/libbsp/i386/force386/shmsupp/lock.c deleted file mode 100644 index d5f74fb8e3..0000000000 --- a/c/src/lib/libbsp/i386/force386/shmsupp/lock.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Shared Memory Lock Routines - * - * This shared memory locked queue support routine need to be - * able to lock the specified locked queue. Interrupts are - * disabled while the queue is locked to prevent preemption - * and deadlock when two tasks poll for the same lock. - * previous level. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> -#include <shm.h> - -/* - * Shm_Initialize_lock - * - * Initialize the lock for the specified locked queue. - */ - -void Shm_Initialize_lock( - Shm_Locked_queue_Control *lq_cb -) -{ - lq_cb->lock = LQ_UNLOCKED; -} - -/* void _Shm_Lock( &lq_cb ) - * - * This shared memory locked queue support routine locks the - * specified locked queue. It disables interrupts to prevent - * a deadlock condition. - */ - -void Shm_Lock( - Shm_Locked_queue_Control *lq_cb -) -{ - rtems_unsigned32 isr_level; - volatile rtems_unsigned32 *lockptr = &lq_cb->lock; - rtems_unsigned32 lock_value; - - lock_value = SHM_LOCK_VALUE; - rtems_interrupt_disable( isr_level ); - - Shm_isrstat = isr_level; - while ( 1 ) { - asm volatile( "lock ; xchg (%0),%1" - : "=r" (lockptr), "=r" (lock_value) - : "0" (lockptr), "1" (lock_value) - ); - if ( lock_value == SHM_UNLOCK_VALUE ) - break; - delay( 10 ); /* approximately 10 microseconds */ - } -} - -/* - * Shm_Unlock - * - * Unlock the lock for the specified locked queue. - */ - -void Shm_Unlock( - Shm_Locked_queue_Control *lq_cb -) -{ - rtems_unsigned32 isr_level; - - lq_cb->lock = SHM_UNLOCK_VALUE; - isr_level = Shm_isrstat; - rtems_interrupt_enable( isr_level ); -} - diff --git a/c/src/lib/libbsp/i386/force386/shmsupp/mpisr.c b/c/src/lib/libbsp/i386/force386/shmsupp/mpisr.c deleted file mode 100644 index ae0c2dd673..0000000000 --- a/c/src/lib/libbsp/i386/force386/shmsupp/mpisr.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Shm_setvec - * - * This driver routine sets the SHM interrupt vector to point to the - * driver's SHM interrupt service routine. - * - * NOTE: This routine is not used by the FORCE CPU-386 because it - * only supports polling mode. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> -#include <shm.h> - -void Shm_setvec() -{ - /* NOT USED ON FORCE CPU-386!!! */ -} diff --git a/c/src/lib/libbsp/i386/force386/start/Makefile.in b/c/src/lib/libbsp/i386/force386/start/Makefile.in deleted file mode 100644 index 8535cda245..0000000000 --- a/c/src/lib/libbsp/i386/force386/start/Makefile.in +++ /dev/null @@ -1,68 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/force386/start - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGMS = ${ARCH}/start.o - -# C source names, if any, go here -- minus the .c -C_PIECES = -C_FILES = $(C_PIECES:%=%.c) -C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) - -H_FILES = - -# Assembly source names, if any, go here -- minus the .S -S_PIECES = start -S_FILES = $(S_PIECES:%=%.S) -S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o) - -SRCS = $(C_FILES) $(H_FILES) $(S_FILES) -OBJS = $(C_O_FILES) $(S_O_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -all: ${ARCH} $(SRCS) $(OBJS) $(PGM) - $(INSTALL_VARIANT) -m 755 ${PGMS} $(PROJECT_RELEASE)/lib - -# Install the program(s), appending _g or _p as appropriate. -# for include files, just use $(INSTALL_CHANGE) - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/force386/start/start.S b/c/src/lib/libbsp/i386/force386/start/start.S deleted file mode 100644 index c1d0ffd099..0000000000 --- a/c/src/lib/libbsp/i386/force386/start/start.S +++ /dev/null @@ -1,267 +0,0 @@ -/* start.s - * - * This file contains the entry point for the application. - * The name of this entry point is compiler dependent. - * It jumps to the BSP which is responsible for performing - * all initialization. - * - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include "asm.h" - -/* - * A Descriptor table register has the following format - */ - -.set DTR_LIMIT, 0 # offset of two byte limit -.set DTR_BASE, 2 # offset of four byte base address -.set DTR_SIZE, 6 # size of DTR register - - BEGIN_DATA - EXTERN (Do_Load_IDT) - EXTERN (Do_Load_GDT) - END_DATA - - BEGIN_CODE - - PUBLIC (start) # GNU default entry point - - EXTERN (boot_card) - EXTERN (load_segments) - EXTERN (exit) - -SYM (start): - nop - cli # DISABLE INTERRUPTS!!! -/* - * Load the segment registers - * - * NOTE: Upon return, gs will contain the segment descriptor for - * a segment which maps directly to all of physical memory. - */ - jmp SYM (_load_segments) # load board dependent segments - -/* - * Set up the stack - */ - - PUBLIC (_establish_stack) -SYM (_establish_stack): - - movl $end,eax # eax = end of bss/start of heap - addl $heap_size,eax # eax = end of heap - movl eax,stack_start # Save for brk() routine - addl $stack_size,eax # make room for stack - andl $0xffffffc0,eax # align it on 16 byte boundary - movl eax,esp # set stack pointer - movl eax,ebp # set base pointer -/* - * Zero out the BSS segment - */ -SYM (zero_bss): - cld # make direction flag count up - movl $ SYM (end),ecx # find end of .bss - movl $ SYM (_bss_start),edi # edi = beginning of .bss - subl edi,ecx # ecx = size of .bss in bytes - shrl ecx # size of .bss in longs - shrl ecx - xorl eax,eax # value to clear out memory - repne # while ecx != 0 - stosl # clear a long in the bss - -/* - * Copy the Global Descriptor Table to our space - */ - - sgdt SYM (_Original_GDTR) # save original GDT - movzwl SYM (_Original_GDTR)+DTR_LIMIT,ecx - /* size of GDT in bytes; limit is */ - /* 8192 entries * 8 bytes per */ - - /* - * make ds:esi point to the original GDT - */ - - movl SYM (_Original_GDTR)+DTR_BASE,esi - push ds # save ds - movw gs,ax - movw ax,ds - - /* - * make es:edi point to the new (our copy) GDT - */ - - movl $ SYM (_Global_descriptor_table),edi - - rep - movsb # copy the GDT (ds:esi -> es:edi) - - pop ds # restore ds - - /* - * Build and load new contents of GDTR - */ - movw SYM (_Original_GDTR)+DTR_LIMIT,ecx # set new limit - movw cx, SYM (_New_GDTR)+DTR_LIMIT - - push $ SYM (_Global_descriptor_table) - push es - call SYM (i386_Logical_to_physical) - addl $6,esp - movl eax, SYM (_New_GDTR)+DTR_BASE # set new base - - cmpb $0, SYM (_Do_Load_GDT) # Should the new GDT be loaded? - je SYM (no_gdt_load) # NO, then branch - lgdt SYM (_New_GDTR) # load the new GDT -SYM (no_gdt_load): - -/* - * Copy the Interrupt Descriptor Table to our space - */ - - sidt SYM (_Original_IDTR) # save original IDT - movzwl SYM (_Original_IDTR)+DTR_LIMIT,ecx - /* size of IDT in bytes; limit is */ - /* 256 entries * 8 bytes per */ - - - /* - * make ds:esi point to the original IDT - */ - movl SYM (_Original_IDTR)+DTR_BASE,esi - - push ds # save ds - movw gs,ax - movw ax,ds - - /* - * make es:edi point to the new (our copy) IDT - */ - movl $ SYM (Interrupt_descriptor_table),edi - - rep - movsb # copy the IDT (ds:esi -> es:edi) - pop ds # restore ds - - /* - * Build and load new contents of IDTR - */ - movw SYM (_Original_IDTR+DTR_LIMIT),ecx # set new limit - movw cx,SYM (_New_IDTR)+DTR_LIMIT - - push $ SYM (Interrupt_descriptor_table) - push es - call SYM (i386_Logical_to_physical) - addl $6,esp - movl eax, SYM (_New_IDTR)+DTR_BASE # set new base - - cmpb $0, SYM (_Do_Load_IDT) # Should the new IDT be loaded? - je SYM (no_idt_load) # NO, then branch - lidt SYM (_New_IDTR) # load the new IDT -SYM (no_idt_load): - -/* - * Initialize the i387. - * - * Using the NO WAIT form of the instruction insures that - * if it is not present the board will not lock up or get an - * exception. - */ - - fninit # MUST USE NO-WAIT FORM - -/* - * Transfer control to User's Board Support Package - */ - pushl $0 # environp - pushl $0 # argv - pushl $0 # argc - call SYM (boot_card) - addl $12,esp - -/* - * Clean up - */ - - EXTERN (return_to_monitor) - - PUBLIC (Bsp_cleanup) -SYM (Bsp_cleanup): - cmpb $0, SYM (_Do_Load_IDT) # Was the new IDT loaded? - je SYM (no_idt_restore) # NO, then branch - lidt SYM (_Original_IDTR) # restore the new IDT -SYM (no_idt_restore): - - cmpb $0, SYM (_Do_Load_GDT) # Was the new GDT loaded? - je SYM (no_gdt_restore) # NO, then branch - lgdt SYM (_Original_GDTR) # restore the new GDT -SYM (no_gdt_restore): - jmp SYM (_return_to_monitor) - -END_CODE - -BEGIN_DATA - - .align 2 - PUBLIC (start_frame) -SYM (start_frame): - .long 0 - - PUBLIC (stack_start) -SYM (stack_start): - .long 0 - -END_DATA - -BEGIN_BSS - - PUBLIC(heap_size) - .set heap_size,0x2000 - - PUBLIC(stack_size) - .set stack_size,0x1000 - - PUBLIC (Interrupt_descriptor_table) -SYM (Interrupt_descriptor_table): - .space 256*8 - - PUBLIC (_Original_IDTR) -SYM (_Original_IDTR): - .space DTR_SIZE - - PUBLIC (_New_IDTR) -SYM (_New_IDTR): - .space DTR_SIZE - - PUBLIC (_Global_descriptor_table) -SYM (_Global_descriptor_table): - .space 8192*8 - - PUBLIC (_Original_GDTR) -SYM (_Original_GDTR): - .space DTR_SIZE - - PUBLIC (_New_GDTR) -SYM (_New_GDTR): - .space DTR_SIZE - - PUBLIC (_Physical_base_of_ds) -SYM (_Physical_base_of_ds): - .space 4 - - PUBLIC (_Physical_base_of_cs) -SYM (_Physical_base_of_cs): - .space 4 - -END_BSS -END diff --git a/c/src/lib/libbsp/i386/force386/startup/Makefile.in b/c/src/lib/libbsp/i386/force386/startup/Makefile.in deleted file mode 100644 index 109b51e33d..0000000000 --- a/c/src/lib/libbsp/i386/force386/startup/Makefile.in +++ /dev/null @@ -1,76 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/force386/startup - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@:@srcdir@/../../../shared - -PGM = ${ARCH}/startup.rel - -# C source names, if any, go here -- minus the .c -C_PIECES = bspclean bsplibc bsppost bspstart bootcard main sbrk setvec \ - gnatinstallhandler -C_FILES = $(C_PIECES:%=%.c) -C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) - -H_FILES = - -# Assembly source names, if any, go here -- minus the .S -S_PIECES = ldsegs -S_FILES = $(S_PIECES:%=%.S) -S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o) - -SRCS = $(srcdir)/linkcmds $(C_FILES) $(H_FILES) $(S_FILES) -OBJS = $(C_O_FILES) $(S_O_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ -mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs - -INSTALLDIRS = $(PROJECT_RELEASE)/lib - -$(INSTALLDIRS): - @$(mkinstalldirs) $(INSTALLDIRS) - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) -all: ${ARCH} $(SRCS) $(PGM) - $(INSTALL_CHANGE) -m 644 $(srcdir)/linkcmds $(PROJECT_RELEASE)/lib - -# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/force386/startup/bspstart.c b/c/src/lib/libbsp/i386/force386/startup/bspstart.c deleted file mode 100644 index c4ea26cdfb..0000000000 --- a/c/src/lib/libbsp/i386/force386/startup/bspstart.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> -#include <rtems/libio.h> - -#include <libcsupport.h> - -/* - * The original table from the application and our copy of it with - * some changes. - */ - -extern rtems_configuration_table Configuration; -rtems_configuration_table BSP_Configuration; - -rtems_cpu_table Cpu_table; - -char *rtems_progname; - -/* - * Use the shared implementations of the following routines - */ - -void bsp_postdriver_hook(void); -void bsp_libc_init( void *, unsigned32, int ); - -/* - * Function: bsp_pretasking_hook - * Created: 95/03/10 - * - * Description: - * BSP pretasking hook. Called just before drivers are initialized. - * Used to setup libc and install any BSP extensions. - * - * NOTES: - * Must not use libc (to do io) from here, since drivers are - * not yet initialized. - * - */ - -void bsp_pretasking_hook(void) -{ - extern int end; - rtems_unsigned32 heap_start; - - heap_start = (rtems_unsigned32) &end; - if (heap_start & (CPU_ALIGNMENT-1)) - heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); - - bsp_libc_init((void *) heap_start, 64 * 1024, 0); - - -#ifdef RTEMS_DEBUG - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); -#endif -} - -/* - * bsp_start - * - * This routine does the bulk of the system initialization. - */ - -void bsp_start( void ) -{ - - /* - * FORCE documentation incorrectly states that the bus request - * level is initialized to 3. It is actually initialized by - * FORCEbug to 0. - */ - - outport_byte( 0x00, 0x3f ); /* resets VMEbus request level */ - - Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ - - Cpu_table.postdriver_hook = bsp_postdriver_hook; - - Cpu_table.interrupt_table_segment = get_ds(); - - Cpu_table.interrupt_table_offset = (void *)Interrupt_descriptor_table; - - Cpu_table.interrupt_stack_size = 4096; - - BSP_Configuration.work_space_start = (void *) - RAM_END - BSP_Configuration.work_space_size; - -} diff --git a/c/src/lib/libbsp/i386/force386/startup/exit.c b/c/src/lib/libbsp/i386/force386/startup/exit.c deleted file mode 100644 index c17d97fa6e..0000000000 --- a/c/src/lib/libbsp/i386/force386/startup/exit.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * exit - * - * This routine returns control to FORCEbug. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> -#include <clockdrv.h> -#include <iodrv.h> - -void _exit( ) -{ - /* Clock or Timer cleanup is run by at_exit() */ - - Io_cleanup(); - - bsp_cleanup(); -} diff --git a/c/src/lib/libbsp/i386/force386/startup/ldsegs.S b/c/src/lib/libbsp/i386/force386/startup/ldsegs.S deleted file mode 100644 index 7689a7693f..0000000000 --- a/c/src/lib/libbsp/i386/force386/startup/ldsegs.S +++ /dev/null @@ -1,86 +0,0 @@ -/* _load_segments - * - * This file assists the board independent startup code by - * loading the proper segment register values. The values - * loaded are board dependent. - * - * NOTE: No stack has been established when this routine - * is invoked. It returns by jumping back to bspentry. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include "asm.h" - -BEGIN_CODE - -/* - * FORCEBUG loads us into a virtual address space which - * really starts at PHYSICAL_ADDRESS_BASE. - */ - -.set PHYSICAL_ADDRESS_BASE, 0x00002000 - -/* - * At reset time, FORCEBUG normally has the segment selectors preloaded. - * If a human resets the instruction pointer, this will not have occurred. - * However, no guarantee can be made of the other registers if cs:ip was - * modified to restart the program. Because of this, the BSP reloads all - * segment registers (except cs) with the values they have following - * a reset. - */ - - -.set RESET_SS, 0x40 # initial value of stack segment register -.set RESET_DS, 0x40 # initial value of data segment register -.set RESET_ES, 0x40 # initial value of extra segment register -.set RESET_FS, 0x40 # initial value of "f" segment register -.set RESET_GS, 0x30 # initial value of "g" segment register - - -#define LOAD_SEGMENTS(_value,_segment) \ - movw $ ## _value, ax ; \ - movw ax, _segment - - EXTERN (establish_stack) - - PUBLIC (_load_segments) -SYM (_load_segments): - LOAD_SEGMENTS( RESET_SS, ss ) - LOAD_SEGMENTS( RESET_DS, ds ) - LOAD_SEGMENTS( RESET_ES, es ) - LOAD_SEGMENTS( RESET_FS, fs ) - LOAD_SEGMENTS( RESET_GS, gs ) - - jmp SYM (_establish_stack) # return to the bsp entry code - - PUBLIC (_return_to_monitor) -SYM (_return_to_monitor): - - call SYM (Clock_exit) - movb $0,al - int $0x20 # restart FORCEbug - jmp SYM (start) # FORCEbug does not reset PC - -END_CODE - -BEGIN_DATA - - PUBLIC (_Do_Load_IDT) -SYM (_Do_Load_IDT): - .byte 1 - - PUBLIC (_Do_Load_GDT) -SYM (_Do_Load_GDT): - .byte 0 - -END_DATA -END diff --git a/c/src/lib/libbsp/i386/force386/startup/linkcmds b/c/src/lib/libbsp/i386/force386/startup/linkcmds deleted file mode 100644 index 3892b7dedf..0000000000 --- a/c/src/lib/libbsp/i386/force386/startup/linkcmds +++ /dev/null @@ -1,71 +0,0 @@ -/* - * This file contains directives for the GNU linker which are specific - * to the FORCE CPU386 board. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -MEMORY - { - ram : org = 0x0, l = 1M - } - -SECTIONS -{ - .text 0x0 : - { - _text_start = . ; - *(.text) - . = ALIGN (16); - - *(.eh_fram) - . = ALIGN (16); - - /* - * C++ constructors - */ - __CTOR_LIST__ = .; - LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) - *(.ctors) - LONG(0) - __CTOR_END__ = .; - - __DTOR_LIST__ = .; - LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) - *(.dtors) - LONG(0) - __DTOR_END__ = .; - _etext = ALIGN( 0x10 ) ; - - - } >RAM - - .init : { *(.init) } >RAM - .fini : { *(.fini) } >RAM - .rodata : { *(.rodata) *(.gnu.linkonce.r*) } >RAM - - .data : - { - _data_start = . ; - *(.data) - _edata = ALIGN( 0x10 ) ; - } >RAM - - .bss : - { - _bss_start = . ; - *(.bss) - *(COMMON) - end = . ; - _end = . ; - __end = . ; - } >RAM -} diff --git a/c/src/lib/libbsp/i386/force386/startup/setvec.c b/c/src/lib/libbsp/i386/force386/startup/setvec.c deleted file mode 100644 index eb2cf51e42..0000000000 --- a/c/src/lib/libbsp/i386/force386/startup/setvec.c +++ /dev/null @@ -1,59 +0,0 @@ -/* set_vector - * - * This routine installs an interrupt vector on the Force CPU-386. - * - * INPUT: - * handler - interrupt handler entry point - * vector - vector number - * type - 0 indicates raw hardware connect - * 1 indicates RTEMS interrupt connect - * - * RETURNS: - * address of previous interrupt handler - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> - -i386_isr_entry set_vector( /* returns old vector */ - rtems_isr_entry handler, /* isr routine */ - rtems_vector_number vector, /* vector number */ - int type /* RTEMS or RAW intr */ -) -{ - i386_isr_entry previous_isr; - interrupt_gate_descriptor idt; - - if ( type ) - rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr ); - else { - /* get the address of the old handler */ - - idt = Interrupt_descriptor_table[ vector ]; - - previous_isr = (i386_isr_entry) - ((idt.offset_16_31 << 16) | idt.offset_0_15); - - /* build the IDT entry */ - idt.offset_0_15 = ((rtems_unsigned32) handler) & 0xffff; - idt.segment_selector = get_cs(); - idt.reserved = 0x00; - idt.p_dpl = 0x8e; /* present, ISR */ - idt.offset_16_31 = ((rtems_unsigned32) handler) >> 16; - - /* install the IDT entry */ - Interrupt_descriptor_table[ vector ] = idt; - } - return previous_isr; -} - diff --git a/c/src/lib/libbsp/i386/force386/timer/Makefile.in b/c/src/lib/libbsp/i386/force386/timer/Makefile.in deleted file mode 100644 index d1c7a1e5b8..0000000000 --- a/c/src/lib/libbsp/i386/force386/timer/Makefile.in +++ /dev/null @@ -1,70 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/force386/timer - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGM = ${ARCH}/timer.rel - -# C source names, if any, go here -- minus the .c -C_PIECES = timer -C_FILES = $(C_PIECES:%=%.c) -C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) - -H_FILES = - -# Assembly source names, if any, go here -- minus the .S -S_PIECES = timerisr -S_FILES = $(S_PIECES:%=%.S) -S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o) - -SRCS = $(C_FILES) $(H_FILES) $(S_FILES) -OBJS = $(C_O_FILES) $(S_O_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/force386/timer/timer.c b/c/src/lib/libbsp/i386/force386/timer/timer.c deleted file mode 100644 index ac7991173d..0000000000 --- a/c/src/lib/libbsp/i386/force386/timer/timer.c +++ /dev/null @@ -1,96 +0,0 @@ -/* Timer_init() - * - * This routine initializes the timer on the FORCE CPU-386 board. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * NOTE: This routine will not work if the optimizer is enabled - * for some compilers. The multiple writes to the Z8036 - * may be optimized away. - * - * It is important that the timer start/stop overhead be - * determined when porting or modifying this code. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - - -#include <rtems.h> -#include <bsp.h> - -int Ttimer_val; -rtems_boolean Timer_driver_Find_average_overhead; - -rtems_isr timerisr(); - -void Timer_initialize() -{ - - (void) set_vector( timerisr, 0x38, 0 ); /* install ISR */ - - Ttimer_val = 0; /* clear timer ISR count */ - - outport_byte( IERA, 0x40 ); /* disable interrupt */ - outport_byte( TBCR, 0x40 ); /* stop the timer */ - outport_byte( TBDR, 250 ); /* 250 units */ - - outport_byte( TBCR, 0x11 ); /* reset it, delay mode, 4X */ -#if 0 - outport_byte( TBCR, 0x13 ); /* reset it, delay mode, 16X */ -#endif - - outport_byte( IERA, 0x41 ); /* enable interrupt */ - -} - -#define AVG_OVERHEAD 3 /* It typically takes 3.0 microseconds */ - /* (3 ticks) to start/stop the timer. */ -#define LEAST_VALID 4 /* Don't trust a value lower than this */ - -int Read_timer() -{ - register rtems_unsigned32 clicks; - register rtems_unsigned32 total; - - outport_byte( TBCR, 0x00 ); /* stop the timer */ - - inport_byte( TBDR, clicks ); - - total = Ttimer_val + 250 - clicks; - - outport_byte( TBCR, 0x00 ); /* initial value */ - outport_byte( IERA, 0x40 ); /* disable interrupt */ - - /* ??? Is "do not restore old vector" causing problems? */ - - if ( Timer_driver_Find_average_overhead == 1 ) - return total; /* in one microsecond units */ - - else { - if ( total < LEAST_VALID ) - return 0; /* below timer resolution */ - return (total - AVG_OVERHEAD); - } -} - -rtems_status_code Empty_function( void ) -{ - return RTEMS_SUCCESSFUL; -} - -void Set_find_average_overhead( - rtems_boolean find_flag -) -{ - Timer_driver_Find_average_overhead = find_flag; -} diff --git a/c/src/lib/libbsp/i386/force386/timer/timerisr.S b/c/src/lib/libbsp/i386/force386/timer/timerisr.S deleted file mode 100644 index 3264248b05..0000000000 --- a/c/src/lib/libbsp/i386/force386/timer/timerisr.S +++ /dev/null @@ -1,34 +0,0 @@ -/* timer_isr() - * - * This routine provides the ISR for the Z8036 timer on the MVME136 - * board. The timer is set up to generate an interrupt at maximum - * intervals. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include "asm.h" - - BEGIN_CODE - - EXTERN (Ttimer_val) - - PUBLIC (timerisr) -SYM (timerisr): - addl $250, SYM (Ttimer_val) # another 250 microseconds - iret - -END_CODE -END diff --git a/c/src/lib/libbsp/i386/force386/times b/c/src/lib/libbsp/i386/force386/times deleted file mode 100644 index 2c953246ac..0000000000 --- a/c/src/lib/libbsp/i386/force386/times +++ /dev/null @@ -1,191 +0,0 @@ -# -# Timing Test Suite Results for the Force CPU386 BSP -# -# $Id$ -# - -Board: Force CPU-386 -CPU: i386/DX + i387 -Clock Speed: 16 Mhz -Memory Configuration: DRAM, no cache -Wait States: 0 wait states - -Times Reported in: microseconds -Timer Source: count-down timer provided by a Motorola MC68901 - -Column A: 3.5.1 -Column B: 3.5.17 - pre-release - -# DESCRIPTION A B -== ================================================================= ==== ==== - 1 rtems_semaphore_create 73 64 - rtems_semaphore_delete 69 60 - rtems_semaphore_obtain: available 50 41 - rtems_semaphore_obtain: not available -- NO_WAIT 50 40 - rtems_semaphore_release: no waiting tasks 55 47 - - 2 rtems_semaphore_obtain: not available -- caller blocks 126 123 - - 3 rtems_semaphore_release: task readied -- preempts caller 104 95 - - 4 rtems_task_restart: blocked task -- preempts caller 164 162 - rtems_task_restart: ready task -- preempts caller 158 156 - rtems_semaphore_release: task readied -- returns to caller 79 70 - rtems_task_create 164 157 - rtems_task_start 93 86 - rtems_task_restart: suspended task -- returns to caller 109 103 - rtems_task_delete: suspended task 154 147 - rtems_task_restart: ready task -- returns to caller 111 105 - rtems_task_restart: blocked task -- returns to caller 144 138 - rtems_task_delete: blocked task 162 153 - - 5 rtems_task_suspend: calling task 87 81 - rtems_task_resume: task readied -- preempts caller 79 71 - - 6 rtems_task_restart: calling task 121 118 - rtems_task_suspend: returns to caller 54 45 - rtems_task_resume: task readied -- returns to caller 54 46 - rtems_task_delete: ready task 164 157 - - 7 rtems_task_restart: suspended task -- preempts caller 151 149 - - 8 rtems_task_set_priority: obtain current priority 40 30 - rtems_task_set_priority: returns to caller 75 67 - rtems_task_mode: obtain current mode 20 19 - rtems_task_mode: no reschedule 22 21 - rtems_task_mode: reschedule -- returns to caller 27 27 - rtems_task_mode: reschedule -- preempts caller 74 66 - rtems_task_set_note 41 32 - rtems_task_get_note 42 32 - rtems_clock_set 95 85 - rtems_clock_get 2 2 - - 9 rtems_message_queue_create 304 294 - rtems_message_queue_send: no waiting tasks 124 117 - rtems_message_queue_urgent: no waiting tasks 123 117 - rtems_message_queue_receive: available 101 93 - rtems_message_queue_flush: no messages flushed 38 29 - rtems_message_queue_flush: messages flushed 50 41 - rtems_message_queue_delete 88 81 - -10 rtems_message_queue_receive: not available -- NO_WAIT 54 45 - rtems_message_queue_receive: not available -- caller blocks 131 127 - -11 rtems_message_queue_send: task readied -- preempts caller 152 144 - -12 rtems_message_queue_send: task readied -- returns to caller 126 118 - -13 rtems_message_queue_urgent: task readied -- preempts caller 152 144 - -14 rtems_message_queue_urgent: task readied -- returns to caller 126 116 - -15 rtems_event_receive: obtain current events 0 <1 - rtems_event_receive: not available -- NO_WAIT 37 25 - rtems_event_receive: not available -- caller blocks 102 94 - rtems_event_send: no task readied 37 26 - rtems_event_receive: available 39 27 - rtems_event_send: task readied -- returns to caller 68 60 - -16 rtems_event_send: task readied -- preempts caller 96 89 - -17 rtems_task_set_priority: preempts caller 119 115 - -18 rtems_task_delete: calling task 192 187 - -19 rtems_signal_catch 23 13 - rtems_signal_send: returns to caller 43 34 - rtems_signal_send: signal to self 57 59 - exit ASR overhead: returns to calling task 39 39 - exit ASR overhead: returns to preempting task 70 60 - -20 rtems_partition_create 96 83 - rtems_region_create 78 68 - rtems_partition_get_buffer: available 42 34 - rtems_partition_get_buffer: not available 42 33 - rtems_partition_return_buffer 49 40 - rtems_partition_delete 50 49 - rtems_region_get_segment: available 57 45 - rtems_region_get_segment: not available -- NO_WAIT 54 52 - rtems_region_return_segment: no waiting tasks 62 52 - rtems_region_get_segment: not available -- caller blocks 131 127 - rtems_region_return_segment: task readied -- preempts caller 147 138 - rtems_region_return_segment: task readied -- returns to caller 123 113 - rtems_region_delete 48 39 - rtems_io_initialize 4 4 - rtems_io_open 1 1 - rtems_io_close 1 0 - rtems_io_read 1 1 - rtems_io_write 1 1 - rtems_io_control 1 1 - -21 rtems_task_ident 671 748 - rtems_message_queue_ident 656 730 - rtems_semaphore_ident 699 787 - rtems_partition_ident 655 730 - rtems_region_ident 670 739 - rtems_port_ident 657 728 - rtems_timer_ident 658 729 - rtems_rate_monotonic_ident 659 729 - -22 rtems_message_queue_broadcast: task readied -- returns to caller 129 122 - rtems_message_queue_broadcast: no waiting tasks 61 53 - rtems_message_queue_broadcast: task readied -- preempts caller 155 146 - -23 rtems_timer_create 45 34 - rtems_timer_fire_after: inactive 70 65 - rtems_timer_fire_after: active 75 69 - rtems_timer_cancel: active 45 37 - rtems_timer_cancel: inactive 41 32 - rtems_timer_reset: inactive 65 58 - rtems_timer_reset: active 69 63 - rtems_timer_fire_when: inactive 100 92 - rtems_timer_fire_when: active 100 92 - rtems_timer_delete: active 60 52 - rtems_timer_delete: inactive 56 48 - rtems_task_wake_when 132 128 - -24 rtems_task_wake_after: yield -- returns to caller 29 18 - rtems_task_wake_after: yields -- preempts caller 71 63 - -25 rtems_clock_tick 14 16 - -26 _ISR_Disable 2 1 - _ISR_Flash 2 1 - _ISR_Enable 1 1 - _Thread_Disable_dispatch 1 1 - _Thread_Enable_dispatch 22 10 - _Thread_Set_state 25 26 - _Thread_Disptach (NO FP) 55 48 - context switch: no floating point contexts 42 34 - context switch: self 8 9 - context switch: to another task 10 10 - context switch: restore 1st FP task 65 57 - fp context switch: save idle, restore idle 93 83 - fp context switch: save idle, restore initialized 60 59 - fp context switch: save initialized, restore initialized 60 59 - _Thread_Resume 19 19 - _Thread_Unblock 19 19 - _Thread_Ready 22 22 - _Thread_Get 14 15 - _Semaphore_Get 11 13 - _Thread_Get: invalid id 3 3 - -27 interrupt entry overhead: returns to interrupted task 13 13 - interrupt exit overhead: returns to interrupted task 11 11 - interrupt entry overhead: returns to nested interrupt 12 12 - interrupt exit overhead: returns to nested interrupt 10 10 - interrupt entry overhead: returns to preempting task 12 12 - interrupt exit overhead: returns to preempting task 65 58 - -28 rtems_port_create 48 39 - rtems_port_external_to_internal 36 26 - rtems_port_internal_to_external 36 26 - rtems_port_delete 48 39 - -29 rtems_rate_monotonic_create 47 36 - rtems_rate_monotonic_period: initiate period -- returns to caller 60 53 - rtems_rate_monotonic_period: obtain status 38 30 - rtems_rate_monotonic_cancel 48 39 - rtems_rate_monotonic_delete: inactive 57 49 - rtems_rate_monotonic_delete: active 61 53 - rtems_rate_monotonic_period: conclude periods -- caller blocks 88 82 diff --git a/c/src/lib/libbsp/i386/force386/wrapup/Makefile.in b/c/src/lib/libbsp/i386/force386/wrapup/Makefile.in deleted file mode 100644 index 3311430898..0000000000 --- a/c/src/lib/libbsp/i386/force386/wrapup/Makefile.in +++ /dev/null @@ -1,72 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/force386/wrapup - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/lib.cfg - -INSTALL = @INSTALL@ -INSTALL_CHANGE = @INSTALL_CHANGE@ - -BSP_PIECES = startup clock console timer -GENERIC_PIECES = - -GENERIC_MP_REL_PIECES_yes_V = shmdr -GENERIC_MP_REL_PIECES_no_V = -GENERIC_PIECES += $(GENERIC_MP_REL_PIECES_$(HAS_MP)_V) - -BSP_MP_O_PIECES_yes_V = shmsupp -BSP_MP_O_PIECES_no_V = -BSP_PIECES += $(BSP_MP_O_PIECES_$(HAS_MP)_V) - -# bummer; have to use $foreach since % pattern subst rules only replace 1x -OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \ - $(foreach piece, $(GENERIC_PIECES), \ - ../../../$(piece)/$(ARCH)/$(piece).rel) -LIB = $(ARCH)/libbsp.a - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -$(LIB): ${OBJS} - $(make-library) - -all: ${ARCH} $(SRCS) $(LIB) - $(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib - -$(PROJECT_ROOT)/@RTEMS_BSP@/lib/bsp_specs: ../bsp_specs - $(INSTALL_DATA) $< $@ - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/go32/Makefile.in b/c/src/lib/libbsp/i386/go32/Makefile.in deleted file mode 100644 index 28b5fccde2..0000000000 --- a/c/src/lib/libbsp/i386/go32/Makefile.in +++ /dev/null @@ -1,27 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../.. -subdir = i386/go32 - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/directory.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# wrapup is the one that actually builds and installs the library -# from the individual .rel files built in other directories -SUB_DIRS = include startup clock console timer wrapup - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/go32/README b/c/src/lib/libbsp/i386/go32/README deleted file mode 100644 index fa0d3efd29..0000000000 --- a/c/src/lib/libbsp/i386/go32/README +++ /dev/null @@ -1,38 +0,0 @@ -# -# $Id$ -# - -1. This is based on djgpp v1.x which has been superceded. That version - is still available but is no longer supported. It would be greatly - appreciated if someone would update this bsp to the current version. - -2. In general the regular instructions for building a cross GNU toolset - apply to the i386-go32-rtems toolset. However, you will need some items - from the djgpp distribution. Here is the list of djgpp files we use: - - djeoe112.zip - files required on target PC - djdev112.zip - libraries and include files required on host - -3. We attempt to minimize what we copy into our built and installed GNU - toolset from the binary distribution of the GNU tools. Here is what - we do by hand. You will need to localize this to meet your directory - structure. All paths are starting at the toolset install point. - - a. Copy go32.h, dpmi.h, dos.h. and pc.h in the i386-go32-rtems/include - directory. These files only include sys/types.h and newlib has that. - - b. copy crt0.o to i386-go32-rtems/gcc-lib/i386-go32-rtems/2.7.2 - c. copy libc.a to i386-go32-rtems/gcc-lib/i386-go32-rtems/2.7.2/libcgo32.a - d. copy libpc.a to i386-go32-rtems/gcc-lib/i386-go32-rtems/2.7.2/libpc.a - - It is almost a certainty that libcgo32.a and libpc.a have symbols and - routines which duplicate those in newlib. In post 3.6.0 RTEMS versions, - the --start-group and --end-group GNU ld options are used to group - the non-GO32 supplied libraries. This attempts to resolve every symbolic - reference from RTEMS specific libraries before getting them from - GO32 libraries. - -4. This configuration is built on a UNIX host by the RTEMS Team using - cross configurations of the tools. Building it under DOS requires - special effort. - diff --git a/c/src/lib/libbsp/i386/go32/bsp_specs b/c/src/lib/libbsp/i386/go32/bsp_specs deleted file mode 100644 index 59b0aceadd..0000000000 --- a/c/src/lib/libbsp/i386/go32/bsp_specs +++ /dev/null @@ -1,20 +0,0 @@ -%rename cpp old_cpp -%rename lib old_lib -%rename endfile old_endfile -%rename startfile old_startfile -%rename link old_link - -*cpp: -%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded) - -*lib: -%{!qrtems: %(old_lib)} %{qrtems: --start-group \ -%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \ --lc -lgcc --end-group -lcgo32 -lpc} - -*startfile: -%{!qrtems: %(old_startfile)} %{qrtems: crt0_go32.o%s} - -*link: -%{!qrtems: %(old_link)} %{qrtems: %(old_link)} - diff --git a/c/src/lib/libbsp/i386/go32/clock/Makefile.in b/c/src/lib/libbsp/i386/go32/clock/Makefile.in deleted file mode 100644 index 42973c8ee4..0000000000 --- a/c/src/lib/libbsp/i386/go32/clock/Makefile.in +++ /dev/null @@ -1,65 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/go32/clock - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGM = ${ARCH}/clock.rel - -# C source names, if any, go here -- minus the .c -C_PIECES = ckinit rtc -C_FILES = $(C_PIECES:%=%.c) -C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) - -H_FILES = - -SRCS = $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/go32/clock/ckinit.c b/c/src/lib/libbsp/i386/go32/clock/ckinit.c deleted file mode 100644 index 70c564fabc..0000000000 --- a/c/src/lib/libbsp/i386/go32/clock/ckinit.c +++ /dev/null @@ -1,199 +0,0 @@ -/* Clock_initialize - * - * This routine initializes the 8254 timer under GO32. - * The tick frequency is 1 millisecond. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * $Id$ - */ - -#include <bsp.h> -#include <rtems/libio.h> - -#include <stdlib.h> - -volatile rtems_unsigned32 Clock_driver_ticks; -rtems_unsigned32 Clock_isrs_per_tick; /* ISRs per tick */ -rtems_unsigned32 Clock_isrs; /* ISRs until next tick */ -rtems_isr_entry Old_ticker; - -#define CLOCK_VECTOR 0x8 - -void Clock_exit( void ); - -/* - * These are set by clock driver during its init - */ - -rtems_device_major_number rtems_clock_major = ~0; -rtems_device_minor_number rtems_clock_minor; - -rtems_isr Clock_isr( - rtems_vector_number vector -) -{ - /* touch interrupt controller for irq0 (0x20+0) */ - outport_byte( 0x20, 0x20 ); - - Clock_driver_ticks += 1; - -#if 0 && defined(pentium) - { - extern long long Last_RDTSC; - __asm __volatile( ".byte 0x0F, 0x31" : "=A" (Last_RDTSC) ); - } -#endif - - if ( Clock_isrs == 1 ) { - rtems_clock_tick(); - Clock_isrs = Clock_isrs_per_tick; - } else { - Clock_isrs -= 1; - } -} - -void Install_clock( - rtems_isr_entry clock_isr -) -{ - unsigned int microseconds_per_isr; - -#if 0 - /* Initialize clock from on-board real time clock. This breaks the */ - /* test code which assumes which assumes the application will do it. */ - { - rtems_time_of_day Now; - extern void init_rtc( void ); - extern long rtc_read( rtems_time_of_day * tod ); - init_rtc(); - if ( rtc_read( &Now ) >= 0 ) - clock_set( &Now ); - } -#endif - - /* Start by assuming hardware counter is large enough, then */ - /* scale it until it actually fits. */ - Clock_driver_ticks = 0; - Clock_isrs_per_tick = 1; - - if ( BSP_Configuration.microseconds_per_tick == 0 ) - microseconds_per_isr = 10000; /* default 10 ms */ - else - microseconds_per_isr = BSP_Configuration.microseconds_per_tick; - while ( US_TO_TICK(microseconds_per_isr) > 65535 ) { - Clock_isrs_per_tick *= 10; - microseconds_per_isr /= 10; - } - - /* Initialize count in ckisr.c */ - Clock_isrs = Clock_isrs_per_tick; - -#if 0 - /* This was dropped in the last revision. Its a nice thing to know. */ - TICKS_PER_SECOND = 1000000 / (Clock_isrs_per_tick * microseconds_per_isr); -#endif - - if ( BSP_Configuration.ticks_per_timeslice ) { - /* 105/88 approximates TIMER_TICK*1e-6 */ - unsigned int count = US_TO_TICK( microseconds_per_isr ); - - Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 ); - outport_byte( TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN ); - outport_byte( TIMER_CNTR0, count >> 0 & 0xff ); - outport_byte( TIMER_CNTR0, count >> 8 & 0xff ); - } - atexit( Clock_exit ); -} - -void Clock_exit( void ) -{ - if ( BSP_Configuration.ticks_per_timeslice ) { - extern void rtc_set_dos_date( void ); - - /* reset to DOS value: */ - outport_byte( TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN ); - outport_byte( TIMER_CNTR0, 0 ); - outport_byte( TIMER_CNTR0, 0 ); - - /* reset time-of-day */ - rtc_set_dos_date(); - - /* re-enable old handler: assume it was one of ours */ - set_vector( (rtems_isr_entry)Old_ticker, CLOCK_VECTOR, 1 ); - } -} - -rtems_device_driver Clock_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - Install_clock( Clock_isr ); - - /* - * make major/minor avail to others such as shared memory driver - */ - - rtems_clock_major = major; - rtems_clock_minor = minor; - - return RTEMS_SUCCESSFUL; -} - -rtems_device_driver Clock_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *pargp -) -{ - rtems_unsigned32 isrlevel; - rtems_libio_ioctl_args_t *args = pargp; - - if (args == 0) - goto done; - - /* - * This is hokey, but until we get a defined interface - * to do this, it will just be this simple... - */ - - if (args->command == rtems_build_name('I', 'S', 'R', ' ')) - { - Clock_isr(CLOCK_VECTOR); - } - else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) - { - rtems_interrupt_disable( isrlevel ); - (void) set_vector( args->buffer, CLOCK_VECTOR, 1 ); - rtems_interrupt_enable( isrlevel ); - } - -done: - return RTEMS_SUCCESSFUL; -} - -#if 0 && defined(pentium) -/* This can be used to get extremely accurate timing on a pentium. */ -/* It isn't supported. [bryce] */ -#define HZ 90.0 -volatile long long Last_RDTSC; -#define RDTSC()\ - ({ long long _now; __asm __volatile (".byte 0x0F,0x31":"=A"(_now)); _now; }) - -long long Kernel_Time_ns( void ) -{ - extern rtems_unsigned32 _TOD_Ticks_per_second; - unsigned isrs_per_second = Clock_isrs_per_tick * _TOD_Ticks_per_second; - long long now; - int flags; - disable_intr( flags ); - now = 1e9 * Clock_driver_ticks / isrs_per_second - + (RDTSC() - Last_RDTSC) * (1000.0/HZ); - enable_intr( flags ); - return now; -} -#endif diff --git a/c/src/lib/libbsp/i386/go32/clock/rtc.c b/c/src/lib/libbsp/i386/go32/clock/rtc.c deleted file mode 100644 index 38e9497000..0000000000 --- a/c/src/lib/libbsp/i386/go32/clock/rtc.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * $Id$ - */ - -#define IO_RTC 0x70 /* RTC */ - -#define RTC_SEC 0x00 /* seconds */ -#define RTC_SECALRM 0x01 /* seconds alarm */ -#define RTC_MIN 0x02 /* minutes */ -#define RTC_MINALRM 0x03 /* minutes alarm */ -#define RTC_HRS 0x04 /* hours */ -#define RTC_HRSALRM 0x05 /* hours alarm */ -#define RTC_WDAY 0x06 /* week day */ -#define RTC_DAY 0x07 /* day of month */ -#define RTC_MONTH 0x08 /* month of year */ -#define RTC_YEAR 0x09 /* month of year */ -#define RTC_STATUSA 0x0a /* status register A */ -#define RTCSA_TUP 0x80 /* time update, don't look now */ - -#define RTC_STATUSB 0x0b /* status register B */ - -#define RTC_INTR 0x0c /* status register C (R) interrupt source */ -#define RTCIR_UPDATE 0x10 /* update intr */ -#define RTCIR_ALARM 0x20 /* alarm intr */ -#define RTCIR_PERIOD 0x40 /* periodic intr */ -#define RTCIR_INT 0x80 /* interrupt output signal */ - -#define RTC_STATUSD 0x0d /* status register D (R) Lost Power */ -#define RTCSD_PWR 0x80 /* clock lost power */ - -#define RTC_DIAG 0x0e /* status register E - bios diagnostic */ -#define RTCDG_BITS "\020\010clock_battery\007ROM_cksum\006config_unit\005memory_size\004fixed_disk\003invalid_time" - -#define RTC_CENTURY 0x32 /* current century - increment in Dec99 */ - - - -#include <rtems.h> -#include <string.h> - -void init_rtc( void ) -{ - int s; - - /* initialize brain-dead battery powered clock */ - outport_byte( IO_RTC, RTC_STATUSA ); - outport_byte( IO_RTC+1, 0x26 ); - outport_byte( IO_RTC, RTC_STATUSB ); - outport_byte( IO_RTC+1, 2 ); - - outport_byte( IO_RTC, RTC_DIAG ); - inport_byte( IO_RTC+1, s ); -#if 0 - if (s) printf("RTC BIOS diagnostic error %b\n", s, RTCDG_BITS); -#endif -} - - -/* convert 2 digit BCD number */ -static int bcd( unsigned int i ) -{ - return ((i/16)*10 + (i%16)); -} - -/* convert years to seconds (from 1970) */ -static unsigned long ytos( int y ) -{ - int i; - unsigned long ret; - - ret = 0; - for(i = 1970; i < y; i++) { - if (i % 4) ret += 365*24*60*60; - else ret += 366*24*60*60; - } - return ret; -} - -/* convert months to seconds */ -static unsigned long mtos( int m, int leap ) -{ - int i; - unsigned long ret; - - ret = 0; - for(i=1;i<m;i++) { - switch(i){ - case 1: case 3: case 5: case 7: case 8: case 10: case 12: - ret += 31*24*60*60; - break; - case 4: case 6: case 9: case 11: - ret += 30*24*60*60; - break; - case 2: - if (leap) - ret += 29*24*60*60; - else - ret += 28*24*60*60; - } - } - return ret; -} - - -static inline unsigned int rtcin( unsigned int what ) -{ - unsigned int r; - outport_byte( IO_RTC, what ); - inport_byte( IO_RTC+1, r ); - return r; -} - - -/* - * Initialize the time of day register, based on the time base which is, e.g. - * from a filesystem. - */ -long rtc_read( rtems_time_of_day * tod ) -{ - int sa; - unsigned long sec = 0; - - memset( tod, 0, sizeof *tod ); - - /* do we have a realtime clock present? (otherwise we loop below) */ - sa = rtcin(RTC_STATUSA); - if (sa == 0xff || sa == 0) - return -1; - - /* ready for a read? */ - while ((sa&RTCSA_TUP) == RTCSA_TUP) - sa = rtcin(RTC_STATUSA); - - tod->year = bcd(rtcin(RTC_YEAR)) + 1900; /* year */ - if (tod->year < 1970) tod->year += 100; - tod->month = bcd(rtcin(RTC_MONTH)); /* month */ - tod->day = bcd(rtcin(RTC_DAY)); /* day */ - (void) bcd(rtcin(RTC_WDAY)); /* weekday */ - tod->hour = bcd(rtcin(RTC_HRS)); /* hour */ - tod->minute = bcd(rtcin(RTC_MIN)); /* minutes */ - tod->second = bcd(rtcin(RTC_SEC)); /* seconds */ - tod->ticks = 0; -#if 0 - sec = ytos( tod->year ); - sec += mtos( tod->month, tod->year % 4 == 0 ); - sec += tod->day * 24*60*60; - sec += tod->hour * 60*60; /* hour */ - sec += tod->minute * 60; /* minutes */ - sec += tod->second; /* seconds */ -#else - sec = 0; -#endif - return sec; -} - - - -/* from djgpp: include before rtems.h to avoid conflicts */ -#undef delay -#include <dos.h> - -void rtc_set_dos_date( void ) -{ - int s; - struct date date; - struct time time; - - /* initialize brain-dead battery powered clock */ - outport_byte( IO_RTC, RTC_STATUSA ); - outport_byte( IO_RTC+1, 0x26 ); - outport_byte( IO_RTC, RTC_STATUSB ); - outport_byte( IO_RTC+1, 2 ); - - outport_byte( IO_RTC, RTC_DIAG ); - inport_byte( IO_RTC+1, s ); - if (s) { -#if 0 - printf("RTC BIOS diagnostic error %b\n", s, RTCDG_BITS); -#else - return; -#endif - } - - /* check for presence of clock */ - s = rtcin(RTC_STATUSA); - if ( s == 0xff || s == 0 ) { -#if 0 - printf( "Real-time clock not found\n" ); -#endif - return; - } - - /* ready for a read? */ - while ((s & RTCSA_TUP) == RTCSA_TUP) - s = rtcin(RTC_STATUSA); - - date.da_year = bcd(rtcin(RTC_YEAR)) + 1900; /* year */ - if ( date.da_year < 1970) date.da_year += 100; - date.da_year -= 1980; - date.da_mon = bcd(rtcin(RTC_MONTH)); /* month */ - date.da_day = bcd(rtcin(RTC_DAY)); /* day */ - - (void)bcd(rtcin(RTC_WDAY)); /* weekday */ - - time.ti_hour = bcd(rtcin(RTC_HRS)); /* hour */ - time.ti_min = bcd(rtcin(RTC_MIN)); /* minutes */ - time.ti_sec = bcd(rtcin(RTC_SEC)); /* seconds */ - time.ti_hund = 0; - - setdate( & date ); - settime( & time ); -} diff --git a/c/src/lib/libbsp/i386/go32/console/Makefile.in b/c/src/lib/libbsp/i386/go32/console/Makefile.in deleted file mode 100644 index dccaad8dbb..0000000000 --- a/c/src/lib/libbsp/i386/go32/console/Makefile.in +++ /dev/null @@ -1,65 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/go32/console - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGM = ${ARCH}/console.rel - -# C source names, if any, go here -- minus the .c -C_PIECES = console inch outch -C_FILES = $(C_PIECES:%=%.c) -C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) - -H_FILES = - -SRCS = $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/go32/console/console.c b/c/src/lib/libbsp/i386/go32/console/console.c deleted file mode 100644 index 0449686da8..0000000000 --- a/c/src/lib/libbsp/i386/go32/console/console.c +++ /dev/null @@ -1,256 +0,0 @@ -/* - * This file contains the go32 console IO package. - * - * $Id$ - */ - -#define IBMPC_INIT - -#include <stdlib.h> - -#include <bsp.h> -#include <rtems/libio.h> - -#include <dpmi.h> -#include <go32.h> - -/* console_cleanup - * - * This routine is called at exit to clean up the console hardware. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - */ - -void console_cleanup( void ) -{ - /* nothing */ -} - -/* console_initialize - * - * This routine initializes the console IO driver. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - */ - -/* Set this if console I/O should use go32 (DOS) read/write calls. */ -/* Otherwise, direct hardware accesses will be used. */ - -int _IBMPC_Use_Go32_IO = 0; - -static rtems_isr_entry old_keyboard_isr = NULL; - -extern void _IBMPC_keyboard_isr( rtems_unsigned32 interrupt ); - -rtems_device_driver console_initialize( - rtems_device_major_number major, - rtems_device_minor_number minor, - void *arg -) -{ - rtems_status_code status; - - if ( _IBMPC_Use_Go32_IO ) { - /* Nothing. We let DOS and go32 do all the work. */ - } else { - /* Grap the keyboard interrupt so DOS doesn't steal our */ - /* keystrokes. */ - rtems_status_code status; - - status = - rtems_interrupt_catch( _IBMPC_keyboard_isr, 9, &old_keyboard_isr ); - - if ( status ) { - int write( int, void *, int ); - void exit( int ); - - char msg[] = "error initializing keyboard\n"; - write( 2, msg, sizeof msg - 1 ); - exit( 1 ); - } - } - - status = rtems_io_register_name( - "/dev/console", - major, - (rtems_device_minor_number) 0 - ); - - if (status != RTEMS_SUCCESSFUL) - rtems_fatal_error_occurred(status); - - atexit( console_cleanup ); - - return RTEMS_SUCCESSFUL; -} - - -/* is_character_ready - * - * This routine returns TRUE if a character is available. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - */ - -rtems_boolean is_character_ready( - char *ch -) -{ - return _IBMPC_chrdy( ch ) ? TRUE : FALSE; -} - -/* inbyte - * - * This routine reads a character from the UART. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * Return values: - * character read from UART - */ - -char inbyte( void ) -{ - char ch = _IBMPC_inch(); -#if 1 - /* Echo character to screen */ - void outbyte( char ch ); - outbyte( ch ); - if ( ch == '\r' ) - outbyte( '\n' ); -#endif - return ch; -} - -/* outbyte - * - * This routine transmits a character out the port. - * - * Input parameters: - * ch - character to be transmitted - * - * Output parameters: NONE - */ - -void outbyte( char ch ) -{ - _IBMPC_outch( ch ); -} - -/* - * Open entry point - */ - -rtems_device_driver console_open( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} - -/* - * Close entry point - */ - -rtems_device_driver console_close( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} - -/* - * read bytes from the serial port. We only have stdin. - */ - -rtems_device_driver console_read( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - rtems_libio_rw_args_t *rw_args; - char *buffer; - int maximum; - int count = 0; - - rw_args = (rtems_libio_rw_args_t *) arg; - - buffer = rw_args->buffer; - maximum = rw_args->count; - - for (count = 0; count < maximum; count++) { - buffer[ count ] = inbyte(); - if (buffer[ count ] == '\n' || buffer[ count ] == '\r') { - /* What if this goes past the end of the buffer? We're hosed. [bhc] */ - buffer[ count++ ] = '\n'; - break; - } - } - - rw_args->bytes_moved = count; - return (count >= 0) ? RTEMS_SUCCESSFUL : RTEMS_UNSATISFIED; -} - -/* - * write bytes to the serial port. Stdout and stderr are the same. - */ - -rtems_device_driver console_write( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - int count; - int maximum; - rtems_libio_rw_args_t *rw_args; - char *buffer; - - rw_args = (rtems_libio_rw_args_t *) arg; - - buffer = rw_args->buffer; - maximum = rw_args->count; - - for (count = 0; count < maximum; count++) { - if ( buffer[ count ] == '\n') { - outbyte('\r'); - } - outbyte( buffer[ count ] ); - } - - rw_args->bytes_moved = maximum; - return 0; -} - -/* - * IO Control entry point - */ - -rtems_device_driver console_control( - rtems_device_major_number major, - rtems_device_minor_number minor, - void * arg -) -{ - return RTEMS_SUCCESSFUL; -} - diff --git a/c/src/lib/libbsp/i386/go32/console/inch.c b/c/src/lib/libbsp/i386/go32/console/inch.c deleted file mode 100644 index e3bbbd7105..0000000000 --- a/c/src/lib/libbsp/i386/go32/console/inch.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - * $Id$ - */ - -#include <pc.h> -#include <go32.h> -#include <bsp.h> - -/* - * Ports for PC keyboard - */ -#define KBD_CTL 0x61 -#define KBD_DATA 0x60 -#define KBD_STATUS 0x64 - -static char key_map[] = { -0,033,'1','2','3','4','5','6','7','8','9','0','-','=','\b','\t', -'q','w','e','r','t','y','u','i','o','p','[',']',015,0x80, -'a','s','d','f','g','h','j','k','l',';',047,0140,0x80, -0134,'z','x','c','v','b','n','m',',','.','/',0x80, -'*',0x80,' ',0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -0x80,0x80,0x80,'0',0177 -}; - -static char shift_map[] = { -0,033,'!','@','#','$','%','^','&','*','(',')','_','+','\b','\t', -'Q','W','E','R','T','Y','U','I','O','P','{','}',015,0x80, -'A','S','D','F','G','H','J','K','L',':',042,'~',0x80, -'|','Z','X','C','V','B','N','M','<','>','?',0x80, -'*',0x80,' ',0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, -0x80,0x80,0x80,0x80,'7','8','9',0x80,'4','5','6',0x80, -'1','2','3','0',177 -}; - -extern int _IBMPC_Use_Go32_IO; - -#define KBD_BUF_SIZE 256 -static char kbd_buffer[ KBD_BUF_SIZE ]; -static unsigned int kbd_first = 0; -static unsigned int kbd_last = 0; - -/* This function can be called during a poll for input, or by an ISR. */ -/* Basically any time you want to process a keypress. */ -int _IBMPC_scankey( char * ch ) -{ - unsigned char c; - unsigned char outch; - static int shift_pressed = 0; - static int ctrl_pressed = 0; - static int caps_pressed = 0; - - /* Read keyboard controller, toggle enable */ - inport_byte( KBD_CTL, c ); - outport_byte( KBD_CTL, c & ~0x80 ); - outport_byte( KBD_CTL, c | 0x80 ); - outport_byte( KBD_CTL, c & ~0x80 ); - - /* See if it has data */ - inport_byte( KBD_STATUS, c ); - if ( ( c & 0x01 ) == 0 ) - return 0; - - /* Read the data. Handle nonsense with shift, control, etc. */ - inport_byte( KBD_DATA, c ); - switch ( c ) { - case 0x36: - case 0x2a: - shift_pressed = 1; - return 0; - case 0x3a: - caps_pressed = 1; - return 0; - case 0x1d: - ctrl_pressed = 1; - return 0; - case 0xb6: - case 0xaa: - shift_pressed = 0; - return 0; - case 0xba: - caps_pressed = 0; - return 0; - case 0x9d: - ctrl_pressed = 0; - return 0; - /* - * Ignore unrecognized keys--usually arrow and such - */ - default: - if ( c & 0x80 ) - /* High-bit on means key is being released, not pressed */ - return 0; - if ( c == 88 ) - /* F12 - abort */ - exit( 1 ); - if ( c > 0x39 ) { - return 0; - } - } - - /* Strip high bit, look up in our map */ - c &= 127; - if ( ctrl_pressed ) { - outch = key_map[c]; - outch &= 037; - } else { - outch = shift_pressed ? shift_map[c] : key_map[c]; - if ( caps_pressed ) { - if ( outch >= 'A' && outch <= 'Z' ) outch += 'a' - 'A'; - else if ( outch >= 'a' && outch <= 'z' ) outch -= 'a' - 'A'; - } - } - - *ch = outch; - return 1; -} - - -void _IBMPC_keyboard_isr( rtems_unsigned32 interrupt ) -{ - if ( _IBMPC_scankey( & kbd_buffer[ kbd_last ] ) ) { - /* Got one; save it if there is enough room in buffer. */ - unsigned int next = (kbd_last + 1) % KBD_BUF_SIZE; - if ( next != kbd_first ) - kbd_last = next; - } - - /* Mark interrupt as handled */ - outport_byte( 0x20, 0x20 ); -} - - -int _IBMPC_chrdy( char * ch ) -{ - if ( _IBMPC_Use_Go32_IO ) { - /* Read keyboard via BIOS: raw mode. */ - if ( kbhit() ) { - *ch = getkey(); - return 1; - } else { - return 0; - } - } else { - /* Check buffer our ISR builds */ - if ( kbd_first != kbd_last ) { - *ch = kbd_buffer[ kbd_first ]; - kbd_first = (kbd_first + 1) % KBD_BUF_SIZE; - return 1; - } else { - return 0; - } - } -} - -int _IBMPC_inch( void ) -{ - char Ch; - while ( ! _IBMPC_chrdy( & Ch ) ) - continue; - return Ch; -} diff --git a/c/src/lib/libbsp/i386/go32/console/outch.c b/c/src/lib/libbsp/i386/go32/console/outch.c deleted file mode 100644 index 9f7df342db..0000000000 --- a/c/src/lib/libbsp/i386/go32/console/outch.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * $Id$ - */ - -#include <go32.h> -#include <bsp.h> - -#include <string.h> -#include <unistd.h> - -#define MAX_COL 80 -#define MAX_ROW 50 - -static unsigned nrow = 25; -static unsigned ncol = 80; -static unsigned short * tvram = TVRAM; -static unsigned char current_col = 0; -static unsigned char current_row = 0; -static unsigned short screen_copy[ MAX_ROW*MAX_COL ]; - -static void init_cons( void ); - -/* - * set_cursor_pos() - * Set cursor position based on current absolute screen offset - */ -static void -set_cursor_pos(void) -{ - register unsigned short gdc_pos = current_row * ncol + current_col; - outport_byte( GDC_REG_PORT, 0xe ); - outport_byte( GDC_VAL_PORT, (gdc_pos >> 8) & 0xff ); - outport_byte( GDC_REG_PORT, 0xf ); - outport_byte( GDC_VAL_PORT, gdc_pos & 0xff ); -} - -/* - * scroll_up() - * Scroll screen up one line - */ -static void -scroll_up( unsigned short * tv, unsigned short * copy, unsigned int lines ) -{ - if ( lines > nrow ) - lines = nrow; - - /* move everything up */ - memmove( copy, copy+ncol*lines, (nrow-lines)*ncol*sizeof copy[0] ); - - /* fill bottom with blanks */ - { - int loop = ncol*lines; - unsigned short * ptr = copy + ncol*(nrow-lines); - while ( --loop >= 0 ) - *ptr++ = (WHITE<<8) | ' '; - } - - /* copy new screen to video buffer */ - dosmemput( copy, nrow*ncol*sizeof copy[0], (int)tv ); -} - - -/* - * PUT() - * Write character at current screen location - */ -inline static void PUT( char c ) -{ - unsigned short loc = current_row*ncol+current_col; - unsigned short val = (WHITE<<8) | c; - screen_copy[loc] = val; - dosmemput( &screen_copy[loc], sizeof screen_copy[0], (int)(tvram+loc) ); -} - -/* - * cons_putc() - * Place a character on next screen position - */ -static void -cons_putc( unsigned char c ) -{ - static int first = 1; - if ( first ) { - init_cons(); - first = 0; - } - - switch (c) { - case '\t': - while ( current_row % 8 ) - cons_putc(' '); - break; - case '\r': - current_col = 0; - break; - case '\n': - if ( ++current_row >= nrow ) { - scroll_up( tvram, screen_copy, 1 ); - current_row -= 1; - } - break; - case '\b': - if ( current_col > 0 ) { - --current_col; - PUT(' '); - } - break; - default: - PUT(c); - current_col += 1; - if ( current_col >= ncol ) { - current_col = 0; - current_row += 1; - if ( current_row >= nrow ) { - scroll_up( tvram, screen_copy, 1 ); - current_row -= 1; - } - } - }; - set_cursor_pos(); -} - - -/* - * init_cons() - * Hook for any early setup - */ -static void -init_cons( void ) -{ -#if 0 - /* Get a copy of original screen */ - dosmemget( (int)tvram, nrow*ncol*sizeof *tvram, screen_copy ); -#else - /* Clear entire screen */ - scroll_up( tvram, screen_copy, nrow ); -#endif -} - - - -void _IBMPC_outch( unsigned char ch ) -{ - extern int _IBMPC_Use_Go32_IO; - - if ( _IBMPC_Use_Go32_IO ) { - write( 1, &ch, 1 ); - } else { - cons_putc( ch ); - } -} diff --git a/c/src/lib/libbsp/i386/go32/include/Makefile.in b/c/src/lib/libbsp/i386/go32/include/Makefile.in deleted file mode 100644 index 2f1ba6331c..0000000000 --- a/c/src/lib/libbsp/i386/go32/include/Makefile.in +++ /dev/null @@ -1,50 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/go32/include - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.h - -# -# Equate files are for including from assembly preprocessed by -# gm4 or gasp. No examples are provided except for those for -# other CPUs. The best way to generate them would be to -# provide a program which generates the constants used based -# on the C equivalents. -# - -EQ_FILES = - -SRCS = $(H_FILES) $(EQ_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ -mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs - -INSTALLDIRS = $(PROJECT_INCLUDE) - -$(INSTALLDIRS): - @$(mkinstalldirs) $(INSTALLDIRS) - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -all: $(SRCS) - @$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE) - @$(INSTALL_CHANGE) -m 644 $(EQ_FILES) $(PROJECT_INCLUDE) - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/go32/include/bsp.h b/c/src/lib/libbsp/i386/go32/include/bsp.h deleted file mode 100644 index a2f79040ef..0000000000 --- a/c/src/lib/libbsp/i386/go32/include/bsp.h +++ /dev/null @@ -1,166 +0,0 @@ -/* bsp.h - * - * This include file definitions related to the ibm386 (go32) board. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __IBMPC_h -#define __IBMPC_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include <rtems.h> -#include <iosupp.h> -#include <console.h> -#include <clockdrv.h> - -/* - * Define the time limits for RTEMS Test Suite test durations. - * Long test and short test duration limits are provided. These - * values are in seconds and need to be converted to ticks for the - * application. - * - */ - -#define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */ -#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */ - - -/* - * Define the interrupt mechanism for Time Test 27 - * - * NOTE: Use a software interrupt for the i386 family. - */ -#define MUST_WAIT_FOR_INTERRUPT 0 -#define Install_tm27_vector( handler ) set_vector( (handler), 0x90, 1 ) -#define Cause_tm27_intr() asm volatile( "int $0x90" : : ); -#define Clear_tm27_intr() -#define Lower_tm27_intr() - -/* - * Simple spin delay in microsecond units for device drivers. - * This is very dependent on the clock speed of the target. - */ - -#define delay( _microseconds ) { \ - rtems_unsigned32 _cnt = (_microseconds); \ - asm volatile ("0: nop; mov %0,%0; loop 0b" : "=c"(_cnt) : "0"(_cnt) ); \ -} - - -/* Constants */ - -/* Assume color console */ -#define COLOR 1 -#if COLOR -# define GDC_REG_PORT 0x3d4 -# define GDC_VAL_PORT 0x3d5 -# define TVRAM ((unsigned short *)0xb8000L) -#else -# define GDC_REG_PORT 0x3b4 -# define GDC_VAL_PORT 0x3b5 -# define TVRAM ((unsigned short *)0xb0000L) -#endif - -/* White character attribute--works for MGA and CGA */ -#define WHITE 0x07 - -/* Ports for PC keyboard */ -#define KBD_CTL 0x61 -#define KBD_DATA 0x60 -#define KBD_STATUS 0x64 - -/* Constants relating to the 8254 (or 8253) programmable interval timers */ - /* Port address of the control port and timer channels */ -/* - * Macros for specifying values to be written into a mode register. - */ -#define IO_TIMER1 0x40 -#define TIMER_CNTR0 (IO_TIMER1 + 0) /* timer 0 counter port */ -#define TIMER_CNTR1 (IO_TIMER1 + 1) /* timer 1 counter port */ -#define TIMER_CNTR2 (IO_TIMER1 + 2) /* timer 2 counter port */ -#define TIMER_MODE (IO_TIMER1 + 3) /* timer mode port */ -#define TIMER_SEL0 0x00 /* select counter 0 */ -#define TIMER_SEL1 0x40 /* select counter 1 */ -#define TIMER_SEL2 0x80 /* select counter 2 */ -#define TIMER_INTTC 0x00 /* mode 0, intr on terminal cnt */ -#define TIMER_ONESHOT 0x02 /* mode 1, one shot */ -#define TIMER_RATEGEN 0x04 /* mode 2, rate generator */ -#define TIMER_SQWAVE 0x06 /* mode 3, square wave */ -#define TIMER_SWSTROBE 0x08 /* mode 4, s/w triggered strobe */ -#define TIMER_HWSTROBE 0x0a /* mode 5, h/w triggered strobe */ -#define TIMER_LATCH 0x00 /* latch counter for reading */ -#define TIMER_LSB 0x10 /* r/w counter LSB */ -#define TIMER_MSB 0x20 /* r/w counter MSB */ -#define TIMER_16BIT 0x30 /* r/w counter 16 bits, LSB first */ -#define TIMER_BCD 0x01 /* count in BCD */ - -#define CLOCK_DISABLE() \ - ({ char mask; inport_byte( 0x21, mask ); outport_byte( 0x21, mask | 1 ); }) -#define CLOCK_ENABLE() \ - ({ char mask; inport_byte( 0x21, mask ); outport_byte( 0x21, mask & ~1); }) - -/* The internal tick rate in ticks per second */ -#define TIMER_TICK 1193182 -#define US_TO_TICK(us) (((us)*105+44)/88) -#define TICK_TO_US(tk) (((tk)*88+52)/105) - -/* Structures */ - -#ifdef IBMPC_INIT -#undef BSP_EXTERN -#define BSP_EXTERN -#else -#undef BSP_EXTERN -#define BSP_EXTERN extern -#endif - -/* - * Device Driver Table Entries - */ - -/* - * NOTE: Use the standard Console driver entry - */ - -/* - * NOTE: Use the standard Clock driver entry - */ - -/* functions */ - -int _IBMPC_chrdy( char * ch ); -int _IBMPC_inch( void ); -void _IBMPC_outch( unsigned char ); - -/* miscellaneous stuff assumed to exist */ - -extern rtems_configuration_table BSP_Configuration; - -/* routines */ - -i386_isr_entry set_vector( - rtems_isr_entry handler, - rtems_vector_number vector, - int type -); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - - diff --git a/c/src/lib/libbsp/i386/go32/include/coverhd.h b/c/src/lib/libbsp/i386/go32/include/coverhd.h deleted file mode 100644 index ac186a6341..0000000000 --- a/c/src/lib/libbsp/i386/go32/include/coverhd.h +++ /dev/null @@ -1,104 +0,0 @@ -/* coverhd.h - * - * This include file has defines to represent the overhead associated - * with calling a particular directive from C on this target. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#ifndef __COVERHD_h -#define __COVERHD_h - -#ifdef __cplusplus -extern "C" { -#endif - -#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 0 -#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 0 -#define CALLING_OVERHEAD_TASK_CREATE 0 -#define CALLING_OVERHEAD_TASK_IDENT 0 -#define CALLING_OVERHEAD_TASK_START 0 -#define CALLING_OVERHEAD_TASK_RESTART 0 -#define CALLING_OVERHEAD_TASK_DELETE 0 -#define CALLING_OVERHEAD_TASK_SUSPEND 0 -#define CALLING_OVERHEAD_TASK_RESUME 0 -#define CALLING_OVERHEAD_TASK_SET_PRIORITY 0 -#define CALLING_OVERHEAD_TASK_MODE 0 -#define CALLING_OVERHEAD_TASK_GET_NOTE 0 -#define CALLING_OVERHEAD_TASK_SET_NOTE 0 -#define CALLING_OVERHEAD_TASK_WAKE_WHEN 0 -#define CALLING_OVERHEAD_TASK_WAKE_AFTER 0 -#define CALLING_OVERHEAD_INTERRUPT_CATCH 0 -#define CALLING_OVERHEAD_CLOCK_GET 0 -#define CALLING_OVERHEAD_CLOCK_SET 0 -#define CALLING_OVERHEAD_CLOCK_TICK 0 - -#define CALLING_OVERHEAD_TIMER_CREATE 0 -#define CALLING_OVERHEAD_TIMER_IDENT 0 -#define CALLING_OVERHEAD_TIMER_DELETE 0 -#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 0 -#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 0 -#define CALLING_OVERHEAD_TIMER_RESET 0 -#define CALLING_OVERHEAD_TIMER_CANCEL 0 -#define CALLING_OVERHEAD_SEMAPHORE_CREATE 0 -#define CALLING_OVERHEAD_SEMAPHORE_DELETE 0 -#define CALLING_OVERHEAD_SEMAPHORE_IDENT 0 -#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 0 -#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 0 -#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 0 - -#define CALLING_OVERHEAD_EVENT_SEND 0 -#define CALLING_OVERHEAD_EVENT_RECEIVE 0 -#define CALLING_OVERHEAD_SIGNAL_CATCH 0 -#define CALLING_OVERHEAD_SIGNAL_SEND 0 -#define CALLING_OVERHEAD_PARTITION_CREATE 0 -#define CALLING_OVERHEAD_PARTITION_IDENT 0 -#define CALLING_OVERHEAD_PARTITION_DELETE 0 -#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 0 -#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 0 -#define CALLING_OVERHEAD_REGION_CREATE 0 -#define CALLING_OVERHEAD_REGION_IDENT 0 -#define CALLING_OVERHEAD_REGION_DELETE 0 -#define CALLING_OVERHEAD_REGION_GET_SEGMENT 0 -#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 0 -#define CALLING_OVERHEAD_PORT_CREATE 0 -#define CALLING_OVERHEAD_PORT_IDENT 0 -#define CALLING_OVERHEAD_PORT_DELETE 0 -#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 0 -#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 0 - -#define CALLING_OVERHEAD_IO_INITIALIZE 0 -#define CALLING_OVERHEAD_IO_OPEN 0 -#define CALLING_OVERHEAD_IO_CLOSE 0 -#define CALLING_OVERHEAD_IO_READ 0 -#define CALLING_OVERHEAD_IO_WRITE 0 -#define CALLING_OVERHEAD_IO_CONTROL 0 -#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 0 -#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 0 -#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 0 - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/c/src/lib/libbsp/i386/go32/startup/Makefile.in b/c/src/lib/libbsp/i386/go32/startup/Makefile.in deleted file mode 100644 index 12a0ab0cd6..0000000000 --- a/c/src/lib/libbsp/i386/go32/startup/Makefile.in +++ /dev/null @@ -1,64 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/go32/startup - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@:@srcdir@/../../../shared - -PGM = ${ARCH}/startup.rel - -# C source names, if any, go here -- minus the .c -C_PIECES = bsplibc bsppost bspstart sbrk setvec gnatinstallhandler -C_FILES = $(C_PIECES:%=%.c) -C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) - -H_FILES = - -SRCS = $(C_FILES) $(H_FILES) -OBJS = $(C_O_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/go32/startup/bspstart.c b/c/src/lib/libbsp/i386/go32/startup/bspstart.c deleted file mode 100644 index 958591ec8c..0000000000 --- a/c/src/lib/libbsp/i386/go32/startup/bspstart.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <bsp.h> -#include <rtems/libio.h> - -#include <libcsupport.h> -#include <zilog/z8036.h> - -#include <string.h> - -/* - * The original table from the application and our copy of it with - * some changes. - */ - -extern rtems_configuration_table Configuration; -rtems_configuration_table BSP_Configuration; - -rtems_cpu_table Cpu_table; - -char *rtems_progname; - -/* - * Use the shared implementations of the following routines - */ - -void bsp_postdriver_hook(void); -void bsp_libc_init( void *, unsigned32, int ); - -/* - * Function: bsp_pretasking_hook - * Created: 95/03/10 - * - * Description: - * BSP pretasking hook. Called just before drivers are initialized. - * Used to setup libc and install any BSP extensions. - * - * NOTES: - * Must not use libc (to do io) from here, since drivers are - * not yet initialized. - * - */ - -void bsp_pretasking_hook(void) -{ - rtems_unsigned32 heap_start; - -#if 0 - extern int end; - heap_start = (rtems_unsigned32) &end; -#else - void * sbrk( int ); - heap_start = (rtems_unsigned32) sbrk( 64 * 1024 + CPU_ALIGNMENT ); -#endif - if (heap_start & (CPU_ALIGNMENT-1)) - heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); - - bsp_libc_init((void *) heap_start, 64 * 1024, 0); - - -#ifdef RTEMS_DEBUG - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); -#endif -} - -/* - * main/bsp_start - * - * This routine does the bulk of the system initialization. - */ - -/* This is the original command line passed from DOS */ -char ** Go32_Argv; - -int main( - int argc, - char **argv, - char **environp -) -{ - extern void * sbrk( int ); - extern volatile void _exit( int ); - - /* Set up arguments that we can access later */ - Go32_Argv = argv; - - if ((argc > 0) && argv && argv[0]) - rtems_progname = argv[0]; - else - rtems_progname = "RTEMS"; - - Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ - Cpu_table.postdriver_hook = bsp_postdriver_hook; - Cpu_table.interrupt_table_segment = 0;/* get_ds(); */ - Cpu_table.interrupt_table_offset = (void *)0; - Cpu_table.interrupt_stack_size = 4096; - - BSP_Configuration.work_space_start = sbrk( Configuration.work_space_size ); - if ( BSP_Configuration.work_space_start == 0 ) { - /* Big trouble */ - int write( int, void *, int ); - char msg[] = "bsp_start() couldn't sbrk() RTEMS work space\n"; - write( 2, msg, sizeof msg - 1 ); - _exit( 1 ); - } - - rtems_initialize_executive( &BSP_Configuration, &Cpu_table ); - /* does not return */ - - /* We only return here if the executive has finished. This happens */ - /* when the task has called exit(). */ - /* At this point we call _exit() which resides in djgcc. */ - - for (;;) - _exit( 0 ); - - /* no cleanup necessary for GO32 */ - - return 0; -} diff --git a/c/src/lib/libbsp/i386/go32/startup/exit.c b/c/src/lib/libbsp/i386/go32/startup/exit.c deleted file mode 100644 index 057ec24865..0000000000 --- a/c/src/lib/libbsp/i386/go32/startup/exit.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * exit - * - * This routine returns control to DOS. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> -#include <clockdrv.h> -#include <iodrv.h> - -#if 0 -/* Prefer to pick up _exit() in djgcc */ -void _exit( ) -{ - Io_cleanup(); - bsp_cleanup(); -} -#endif - diff --git a/c/src/lib/libbsp/i386/go32/startup/setvec.c b/c/src/lib/libbsp/i386/go32/startup/setvec.c deleted file mode 100644 index 36e0a34fe4..0000000000 --- a/c/src/lib/libbsp/i386/go32/startup/setvec.c +++ /dev/null @@ -1,46 +0,0 @@ -/* set_vector - * - * This routine installs an interrupt vector under go32. - * - * INPUT: - * handler - interrupt handler entry point - * vector - vector number - * type - 0 indicates raw hardware connect - * 1 indicates RTEMS interrupt connect - * - * RETURNS: - * address of previous interrupt handler - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> - -#include <dpmi.h> -#include <go32.h> - -i386_isr_entry set_vector( /* returns old vector */ - rtems_isr_entry handler, /* isr routine */ - rtems_vector_number vector, /* vector number */ - int type /* RTEMS or RAW intr */ -) -{ - i386_isr_entry previous_isr; - - if ( type ) { - rtems_interrupt_catch( handler, vector, (rtems_isr_entry *) &previous_isr); - } else { - _CPU_ISR_install_raw_handler( vector, handler, (proc_ptr *)&previous_isr); - } - return previous_isr; -} - diff --git a/c/src/lib/libbsp/i386/go32/timer/Makefile.in b/c/src/lib/libbsp/i386/go32/timer/Makefile.in deleted file mode 100644 index 595950dc2f..0000000000 --- a/c/src/lib/libbsp/i386/go32/timer/Makefile.in +++ /dev/null @@ -1,70 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/go32/timer - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -PGM = ${ARCH}/timer.rel - -# C source names, if any, go here -- minus the .c -C_PIECES = timer -C_FILES = $(C_PIECES:%=%.c) -C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) - -H_FILES = - -# Assembly source names, if any, go here -- minus the .S -S_PIECES = timerisr -S_FILES = $(S_PIECES:%=%.S) -S_O_FILES = $(S_FILES:%.S=${ARCH}/%.o) - -SRCS = $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) -OBJS = $(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/leaf.cfg - -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -${PGM}: ${SRCS} ${OBJS} - $(make-rel) - -all: ${ARCH} $(SRCS) $(PGM) - -# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile -install: all - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/c/src/lib/libbsp/i386/go32/timer/timer.c b/c/src/lib/libbsp/i386/go32/timer/timer.c deleted file mode 100644 index 061bbfcbf1..0000000000 --- a/c/src/lib/libbsp/i386/go32/timer/timer.c +++ /dev/null @@ -1,144 +0,0 @@ -/* Timer_init() - * - * This routine initializes the timer on the IBM 386. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * NOTE: It is important that the timer start/stop overhead be - * determined when porting or modifying this code. - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include <rtems.h> -#include <bsp.h> - -volatile rtems_unsigned32 Ttimer_val; -rtems_boolean Timer_driver_Find_average_overhead; - -#if defined(pentium) -static inline unsigned long long rdtsc( void ) -{ - /* Return the value of the on-chip cycle counter. */ - unsigned long long result; - __asm __volatile( ".byte 0x0F, 0x31" : "=A" (result) ); - return result; -} -#else -#define US_PER_ISR 250 -extern rtems_isr timerisr(); -static rtems_isr_entry Old_Ticker; -#endif - -static void Timer_exit( void ) -{ -#if defined(pentium) - CLOCK_ENABLE(); -#else /* pentium */ - extern void rtc_set_dos_date( void ); - - /* reset to DOS value: */ - outport_byte( TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN ); - outport_byte( TIMER_CNTR0, 0 ); - outport_byte( TIMER_CNTR0, 0 ); - - /* reset time-of-day */ - rtc_set_dos_date(); - - /* re-enable old handler: assume it was one of ours */ - set_vector( (rtems_isr_entry)Old_Ticker, 0x8, 0 ); -#endif /* pentium */ -} - -void Timer_initialize() -{ - extern int atexit( void (*)(void) ); - - static int First = 1; - - if ( First ) { - First = 0; - - /* Try not to hose the system on return to DOS. */ - atexit( Timer_exit ); - -#if defined(pentium) - /* Disable the programmable timer so ticks don't interfere. */ - CLOCK_DISABLE(); -#else /* pentium */ - /* install a timer ISR */ - Old_Ticker = (rtems_isr_entry) set_vector( timerisr, 0x8, 0 ); - - /* Wait for ISR to be called at least once */ - Ttimer_val = 0; - while ( Ttimer_val == 0 ) - continue; - - /* load timer for US_PER_ISR microsecond period */ - outport_byte( TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN ); - outport_byte( TIMER_CNTR0, US_TO_TICK(US_PER_ISR) >> 0 & 0xff ); - outport_byte( TIMER_CNTR0, US_TO_TICK(US_PER_ISR) >> 8 & 0xff ); -#endif /* PENTIUM */ - } -#if defined(pentium) - Ttimer_val = rdtsc(); /* read starting time */ -#else - /* Wait for ISR to be called at least once */ - asm( "sti" ); - Ttimer_val = 0; - while ( Ttimer_val == 0 ) - continue; - Ttimer_val = 0; -#endif -} - -#define AVG_OVERHEAD 0 /* 0.1 microseconds to start/stop timer. */ -#define LEAST_VALID 1 /* Don't trust a value lower than this */ - - -int Read_timer() -{ - register rtems_unsigned32 total; -#if defined(pentium) - total = rdtsc() - Ttimer_val; -#else /* pentium */ - register rtems_unsigned8 lsb, msb; - register rtems_unsigned32 clicks; - outport_byte( TIMER_MODE, TIMER_SEL0|TIMER_LATCH ); - inport_byte( TIMER_CNTR0, lsb ); - inport_byte( TIMER_CNTR0, msb ); - clicks = msb << 8 | lsb; - total = (Ttimer_val * US_PER_ISR) + (US_PER_ISR - TICK_TO_US( clicks )); -#endif /* pentium */ - - if ( Timer_driver_Find_average_overhead == 1 ) - return total; - else if ( total < LEAST_VALID ) - return 0; /* below timer resolution */ - else - return total - AVG_OVERHEAD; -} - -rtems_status_code Empty_function( void ) -{ - return RTEMS_SUCCESSFUL; -} - - -void Set_find_average_overhead( - rtems_boolean find_flag -) -{ - Timer_driver_Find_average_overhead = find_flag; -} - diff --git a/c/src/lib/libbsp/i386/go32/timer/timerisr.S b/c/src/lib/libbsp/i386/go32/timer/timerisr.S deleted file mode 100644 index 2e9ccf0dc7..0000000000 --- a/c/src/lib/libbsp/i386/go32/timer/timerisr.S +++ /dev/null @@ -1,41 +0,0 @@ -/* timer_isr() - * - * This routine provides the ISR for the timer. The timer is set up - * to generate an interrupt at maximum intervals. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1998. - * On-Line Applications Research Corporation (OAR). - * Copyright assigned to U.S. Government, 1994. - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include "asm.h" - - BEGIN_CODE - - EXTERN(_Ttimer_val) - - PUBLIC(timerisr) - -SYM (timerisr): - addl $1,_Ttimer_val # another tick - push edx - push eax - movw $0x20,dx - mov edx,eax - outb al,(dx) # touch interrupt controller - pop eax - pop edx - iret - -END_CODE -END diff --git a/c/src/lib/libbsp/i386/go32/times_i486dx b/c/src/lib/libbsp/i386/go32/times_i486dx deleted file mode 100644 index 49601b31d0..0000000000 --- a/c/src/lib/libbsp/i386/go32/times_i486dx +++ /dev/null @@ -1,191 +0,0 @@ -# -# Timing Test Suite Results for the go32 BSP using an i486DX -# -# $Id$ -# - -Board: PC/AT clone -CPU: Intel i486DX -Clock Speed: 33 Mhz -Memory Configuration: DRAM w/256K cache -Wait States: unknown - -Times Reported in: microseconds -Timer Source: i8254 - -Column A: 3.5.1 pre-release -Column B: 3.5.17 pre-release - -# DESCRIPTION A B -== ================================================================= ==== ==== - 1 rtems_semaphore_create 57 66 - rtems_semaphore_delete 59 61 - rtems_semaphore_obtain: available 9 7 - rtems_semaphore_obtain: not available -- NO_WAIT 8 7 - rtems_semaphore_release: no waiting tasks 9 8 - - 2 rtems_semaphore_obtain: not available -- caller blocks 39 37 - - 3 rtems_semaphore_release: task readied -- preempts caller 25 24 - - 4 rtems_task_restart: blocked task -- preempts caller 124 102 - rtems_task_restart: ready task -- preempts caller 55 111 - rtems_semaphore_release: task readied -- returns to caller 16 15 - rtems_task_create 31 30 - rtems_task_start 19 18 - rtems_task_restart: suspended task -- returns to caller 20 19 - rtems_task_delete: suspended task 28 26 - rtems_task_restart: ready task -- returns to caller 20 19 - rtems_task_restart: blocked task -- returns to caller 28 26 - rtems_task_delete: blocked task 34 28 - - 5 rtems_task_suspend: calling task 26 23 - rtems_task_resume: task readied -- preempts caller 17 15 - - 6 rtems_task_restart: calling task 22 19 - rtems_task_suspend: returns to caller 10 8 - rtems_task_resume: task readied -- returns to caller 10 8 - rtems_task_delete: ready task 34 33 - - 7 rtems_task_restart: suspended task -- preempts caller 37 34 - - 8 rtems_task_set_priority: obtain current priority 7 5 - rtems_task_set_priority: returns to caller 13 12 - rtems_task_mode: obtain current mode 3 3 - rtems_task_mode: no reschedule 4 4 - rtems_task_mode: reschedule -- returns to caller 20 17 - rtems_task_mode: reschedule -- preempts caller 39 37 - rtems_task_set_note 7 5 - rtems_task_get_note 7 5 - rtems_clock_set 17 16 - rtems_clock_get 2 1 - - 9 rtems_message_queue_create 117 113 - rtems_message_queue_send: no waiting tasks 22 19 - rtems_message_queue_urgent: no waiting tasks 22 19 - rtems_message_queue_receive: available 18 16 - rtems_message_queue_flush: no messages flushed 15 14 - rtems_message_queue_flush: messages flushed 17 17 - rtems_message_queue_delete 63 63 - -10 rtems_message_queue_receive: not available -- NO_WAIT 10 8 - rtems_message_queue_receive: not available -- caller blocks 42 40 - -11 rtems_message_queue_send: task readied -- preempts caller 38 37 - -12 rtems_message_queue_send: task readied -- returns to caller 27 24 - -13 rtems_message_queue_urgent: task readied -- preempts caller 38 36 - -14 rtems_message_queue_urgent: task readied -- returns to caller 26 24 - -15 rtems_event_receive: obtain current events 0 0 - rtems_event_receive: not available -- NO_WAIT 6 5 - rtems_event_receive: not available -- caller blocks 34 33 - rtems_event_send: no task readied 6 5 - rtems_event_receive: available 21 19 - rtems_event_send: task readied -- returns to caller 19 15 - -16 rtems_event_send: task readied -- preempts caller 26 24 - -17 rtems_task_set_priority: preempts caller 36 33 - -18 rtems_task_delete: calling task 51 52 - -19 rtems_signal_catch 17 18 - rtems_signal_send: returns to caller 38 39 - rtems_signal_send: signal to self 46 62 - exit ASR overhead: returns to calling task 20 25 - exit ASR overhead: returns to preempting task 29 29 - -20 rtems_partition_create 65 67 - rtems_region_create 59 54 - rtems_partition_get_buffer: available 39 35 - rtems_partition_get_buffer: not available 18 16 - rtems_partition_return_buffer 36 30 - rtems_partition_delete 32 30 - rtems_region_get_segment: available 22 21 - rtems_region_get_segment: not available -- NO_WAIT 29 25 - rtems_region_return_segment: no waiting tasks 24 22 - rtems_region_get_segment: not available -- caller blocks 83 81 - rtems_region_return_segment: task readied -- preempts caller 85 84 - rtems_region_return_segment: task readied -- returns to caller 39 41 - rtems_region_delete 30 30 - rtems_io_initialize 1 1 - rtems_io_open 0 0 - rtems_io_close 0 0 - rtems_io_read 0 0 - rtems_io_write 0 0 - rtems_io_control 0 1 - -21 rtems_task_ident 116 114 - rtems_message_queue_ident 113 111 - rtems_semaphore_ident 122 120 - rtems_partition_ident 113 110 - rtems_region_ident 115 111 - rtems_port_ident 113 109 - rtems_timer_ident 113 109 - rtems_rate_monotonic_ident 113 111 - -22 rtems_message_queue_broadcast: task readied -- returns to caller 82 85 - rtems_message_queue_broadcast: no waiting tasks 11 9 - rtems_message_queue_broadcast: task readied -- preempts caller 51 56 - -23 rtems_timer_create 8 7 - rtems_timer_fire_after: inactive 14 12 - rtems_timer_fire_after: active 13 12 - rtems_timer_cancel: active 8 7 - rtems_timer_cancel: inactive 7 6 - rtems_timer_reset: inactive 11 10 - rtems_timer_reset: active 11 11 - rtems_timer_fire_when: inactive 17 16 - rtems_timer_fire_when: active 17 17 - rtems_timer_delete: active 10 9 - rtems_timer_delete: inactive 9 8 - rtems_task_wake_when 36 34 - -24 rtems_task_wake_after: yield -- returns to caller 5 3 - rtems_task_wake_after: yields -- preempts caller 22 19 - -25 rtems_clock_tick 31 31 - -26 _ISR_Disable 11 12 - _ISR_Flash 9 9 - _ISR_Enable 31 67 - _Thread_Disable_dispatch 11 10 - _Thread_Enable_dispatch 18 18 - _Thread_Set_state 20 22 - _Thread_Disptach (NO FP) 37 41 - context switch: no floating point contexts 29 26 - context switch: self 14 10 - context switch: to another task 12 12 - context switch: restore 1st FP task 54 54 - fp context switch: save idle, restore idle 47 46 - fp context switch: save idle, restore initialized 25 25 - fp context switch: save initialized, restore initialized 24 25 - _Thread_Resume 23 24 - _Thread_Unblock 14 14 - _Thread_Ready 16 24 - _Thread_Get 2 2 - _Semaphore_Get 1 1 - _Thread_Get: invalid id 0 0 - -27 interrupt entry overhead: returns to interrupted task 25 23 - interrupt exit overhead: returns to interrupted task 14 15 - interrupt entry overhead: returns to nested interrupt 12 12 - interrupt exit overhead: returns to nested interrupt 14 14 - interrupt entry overhead: returns to preempting task 14 16 - interrupt exit overhead: returns to preempting task 42 38 - -28 rtems_port_create 43 42 - rtems_port_external_to_internal 6 4 - rtems_port_internal_to_external 6 4 - rtems_port_delete 39 33 - -29 rtems_rate_monotonic_create 48 42 - rtems_rate_monotonic_period: initiate period -- returns to caller 61 65 - rtems_rate_monotonic_period: obtain status 23 21 - rtems_rate_monotonic_cancel 38 35 - rtems_rate_monotonic_delete: inactive 32 32 - rtems_rate_monotonic_delete: active 22 22 - rtems_rate_monotonic_period: conclude periods -- caller blocks 24 19 diff --git a/c/src/lib/libbsp/i386/go32/times_p5 b/c/src/lib/libbsp/i386/go32/times_p5 deleted file mode 100644 index 977c4ec482..0000000000 --- a/c/src/lib/libbsp/i386/go32/times_p5 +++ /dev/null @@ -1,196 +0,0 @@ -# -# Timing Test Suite Results for the go32 BSP using a Pentium -# -# $Id$ -# - -NOTE: To obtain the execution time in microseconds, divide the number of - cycles by the clock speed. For example, if rtems_semaphore create - is reported to be 1164 cycles, then at 66 Mhz it takes 17.64 - microseconds or 8.75 microseconds at 133 Mhz. - -Board: PC/AT clone -CPU: Intel Pentium -Clock Speed: 66 Mhz -Memory Configuration: DRAM w/512 Kb cache -Wait States: unknown - -Times Reported in: cycles -Timer Source: on-CPU cycle counter - -Column A: 3.5.1 pre-release -Column Y: unused - -# DESCRIPTION A B -== ================================================================= ==== ==== - 1 rtems_semaphore_create 1164 - rtems_semaphore_delete 976 - rtems_semaphore_obtain: available 300 - rtems_semaphore_obtain: not available -- NO_WAIT 300 - rtems_semaphore_release: no waiting tasks 291 - - 2 rtems_semaphore_obtain: not available -- caller blocks 1182 - - 3 rtems_semaphore_release: task readied -- preempts caller 716 - - 4 rtems_task_restart: blocked task -- preempts caller 2130 - rtems_task_restart: ready task -- preempts caller 1861 - rtems_semaphore_release: task readied -- returns to caller 491 - rtems_task_create 1017 - rtems_task_start 965 - rtems_task_restart: suspended task -- returns to caller 816 - rtems_task_delete: suspended task 926 - rtems_task_restart: ready task -- returns to caller 850 - rtems_task_restart: blocked task -- returns to caller 1076 - rtems_task_delete: blocked task 927 - - 5 rtems_task_suspend: calling task 714 - rtems_task_resume: task readied -- preempts caller 575 - - 6 rtems_task_restart: calling task 646 - rtems_task_suspend: returns to caller 309 - rtems_task_resume: task readied -- returns to caller 320 - rtems_task_delete: ready task 994 - - 7 rtems_task_restart: suspended task -- preempts caller 1025 - - 8 rtems_task_set_priority: obtain current priority 223 - rtems_task_set_priority: returns to caller 468 - rtems_task_mode: obtain current mode 99 - rtems_task_mode: no reschedule 114 - rtems_task_mode: reschedule -- returns to caller 264 - rtems_task_mode: reschedule -- preempts caller 836 - rtems_task_set_note 236 - rtems_task_get_note 232 - rtems_clock_set 569 - rtems_clock_get 107 - - 9 rtems_message_queue_create 3287 - rtems_message_queue_send: no waiting tasks 613 - rtems_message_queue_urgent: no waiting tasks 615 - rtems_message_queue_receive: available 534 - rtems_message_queue_flush: no messages flushed 252 - rtems_message_queue_flush: messages flushed 335 - rtems_message_queue_delete 1195 - -10 rtems_message_queue_receive: not available -- NO_WAIT 333 - rtems_message_queue_receive: not available -- caller blocks 1194 - -11 rtems_message_queue_send: task readied -- preempts caller 957 - -12 rtems_message_queue_send: task readied -- returns to caller 700 - -13 rtems_message_queue_urgent: task readied -- preempts caller 1261 - -14 rtems_message_queue_urgent: task readied -- returns to caller 697 - -15 rtems_event_receive: obtain current events 27 - rtems_event_receive: not available -- NO_WAIT 226 - rtems_event_receive: not available -- caller blocks 888 - rtems_event_send: no task readied 221 - rtems_event_receive: available 393 - rtems_event_send: task readied -- returns to caller 496 - -16 rtems_event_send: task readied -- preempts caller 719 - -17 rtems_task_set_priority: preempts caller 959 - -18 rtems_task_delete: calling task 1295 - -19 rtems_signal_catch 223 - rtems_signal_send: returns to caller 628 - rtems_signal_send: signal to self 821 - exit ASR overhead: returns to calling task 401 - exit ASR overhead: returns to preempting task 482 - -20 rtems_partition_create 1337 - rtems_region_create 1031 - rtems_partition_get_buffer: available 680 - rtems_partition_get_buffer: not available 303 - rtems_partition_return_buffer 617 - rtems_partition_delete 523 - rtems_region_get_segment: available 458 - rtems_region_get_segment: not available -- NO_WAIT 565 - rtems_region_return_segment: no waiting tasks 388 - rtems_region_get_segment: not available -- caller blocks 1683 - rtems_region_return_segment: task readied -- preempts caller 1476 - rtems_region_return_segment: task readied -- returns to caller 818 - rtems_region_delete 477 - rtems_io_initialize 48 - rtems_io_open 22 - rtems_io_close 22 - rtems_io_read 22 - rtems_io_write 22 - rtems_io_control 23 - -21 rtems_task_ident 3381 - rtems_message_queue_ident 3328 - rtems_semaphore_ident 3593 - rtems_partition_ident 3286 - rtems_region_ident 3343 - rtems_port_ident 3278 - rtems_timer_ident 3282 - rtems_rate_monotonic_ident 3287 - -22 rtems_message_queue_broadcast: task readied -- returns to caller 1322 - rtems_message_queue_broadcast: no waiting tasks 347 - rtems_message_queue_broadcast: task readied -- preempts caller 1385 - -23 rtems_timer_create 306 - rtems_timer_fire_after: inactive 475 - rtems_timer_fire_after: active 475 - rtems_timer_cancel: active 277 - rtems_timer_cancel: inactive 251 - rtems_timer_reset: inactive 391 - rtems_timer_reset: active 465 - rtems_timer_fire_when: inactive 577 - rtems_timer_fire_when: active 578 - rtems_timer_delete: active 377 - rtems_timer_delete: inactive 350 - rtems_task_wake_when 1080 - -24 rtems_task_wake_after: yield -- returns to caller 159 - rtems_task_wake_after: yields -- preempts caller 574 - -25 rtems_clock_tick 505 - -26 _ISR_Disable 33 - _ISR_Flash 33 - _ISR_Enable 26 - _Thread_Disable_dispatch 36 - _Thread_Enable_dispatch 240 - _Thread_Set_state 315 - _Thread_Disptach (NO FP) 623 - context switch: no floating point contexts 594 - context switch: self 89 - context switch: to another task 122 - context switch: restore 1st FP task 1043 - fp context switch: save idle, restore idle 978 - fp context switch: save idle, restore initialized 390 - fp context switch: save initialized, restore initialized 392 - _Thread_Resume 238 - _Thread_Unblock 171 - _Thread_Ready 176 - _Thread_Get 71 - _Semaphore_Get 61 - _Thread_Get: invalid id 10 - -27 interrupt entry overhead: returns to interrupted task 391 - interrupt exit overhead: returns to interrupted task 110 - interrupt entry overhead: returns to nested interrupt 167 - interrupt exit overhead: returns to nested interrupt 120 - interrupt entry overhead: returns to preempting task 193 - interrupt exit overhead: returns to preempting task 961 - -28 rtems_port_create 668 - rtems_port_external_to_internal 215 - rtems_port_internal_to_external 211 - rtems_port_delete 491 - -29 rtems_rate_monotonic_create 823 - rtems_rate_monotonic_period: initiate period -- returns to caller 1094 - rtems_rate_monotonic_period: obtain status 345 - rtems_rate_monotonic_cancel 602 - rtems_rate_monotonic_delete: inactive 553 - rtems_rate_monotonic_delete: active 528 - rtems_rate_monotonic_period: conclude periods -- caller blocks 672 diff --git a/c/src/lib/libbsp/i386/go32/wrapup/Makefile.in b/c/src/lib/libbsp/i386/go32/wrapup/Makefile.in deleted file mode 100644 index c4d379742a..0000000000 --- a/c/src/lib/libbsp/i386/go32/wrapup/Makefile.in +++ /dev/null @@ -1,66 +0,0 @@ -# -# $Id$ -# - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = ../../.. -subdir = i386/go32/wrapup - -RTEMS_ROOT = @RTEMS_ROOT@ -PROJECT_ROOT = @PROJECT_ROOT@ - -VPATH = @srcdir@ - -BSP_PIECES = startup clock console timer -GENERIC_PIECES = - -# bummer; have to use $foreach since % pattern subst rules only replace 1x -OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \ - $(foreach piece, $(GENERIC_PIECES), \ - ../../../$(piece)/$(ARCH)/$(piece).rel) -LIB = $(ARCH)/libbsp.a - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/lib.cfg - -INSTALL = @INSTALL@ -INSTALL_CHANGE = @INSTALL_CHANGE@ - -# -# (OPTIONAL) Add local stuff here using += -# - -DEFINES += -CPPFLAGS += -CFLAGS += - -LD_PATHS += -LD_LIBS += -LDFLAGS += - -# -# Add your list of files to delete here. The config files -# already know how to delete some stuff, so you may want -# to just run 'make clean' first to see what gets missed. -# 'make clobber' already includes 'make clean' -# - -CLEAN_ADDITIONS += -CLOBBER_ADDITIONS += - -$(LIB): ${OBJS} - $(make-library) - -all: ${ARCH} $(SRCS) $(LIB) - $(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib - -install: all - -$(PROJECT_ROOT)/@RTEMS_BSP@/lib/bsp_specs: ../bsp_specs - $(INSTALL_DATA) $< $@ - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status |