Changeset dc104a4 in rtems


Ignore:
Timestamp:
May 30, 1998, 11:46:21 AM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
b317117a
Parents:
a38b9f8
Message:

Updated to current source and removed warnings.

Files:
23 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/dmv177/Makefile.in

    ra38b9f8 rdc104a4  
    55@SET_MAKE@
    66srcdir = @srcdir@
    7 top_srcdir = @top_srcdir@
    87VPATH = @srcdir@
    9 RTEMS_ROOT = @RTEMS_ROOT@
     8RTEMS_ROOT = @top_srcdir@
    109PROJECT_ROOT = @PROJECT_ROOT@
    11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    1210
    13 include $(RTEMS_CUSTOM)
    14 include $(PROJECT_ROOT)/make/directory.cfg
     11include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     12include $(RTEMS_ROOT)/make/directory.cfg
    1513
    1614SRCS=README
     15
     16# We only build the ka9q device driver if HAS_KA9Q was defined
     17KA9Q_DRIVER_yes_V = sonic
     18KA9Q_DRIVER = $(KA9Q_DRIVER_$(HAS_KA9Q)_V)
    1719
    1820all: $(SRCS)
     
    2123#  from the individual .rel files built in other directories
    2224SUB_DIRS=include clock console startup start timer \
    23    tod sonic wrapup
     25   tod $(KA9Q_DRIVER) wrapup
  • c/src/lib/libbsp/powerpc/dmv177/clock/Makefile.in

    ra38b9f8 rdc104a4  
    55@SET_MAKE@
    66srcdir = @srcdir@
    7 top_srcdir = @top_srcdir@
    87VPATH = @srcdir@
    9 RTEMS_ROOT = @RTEMS_ROOT@
     8RTEMS_ROOT = @top_srcdir@
    109PROJECT_ROOT = @PROJECT_ROOT@
    11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    1210
    1311PGM=${ARCH}/clock.rel
     
    2826OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
    2927
    30 include $(RTEMS_CUSTOM)
    31 include $(PROJECT_ROOT)/make/leaf.cfg
    32 
     28include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     29include $(RTEMS_ROOT)/make/leaf.cfg
    3330
    3431#
  • c/src/lib/libbsp/powerpc/dmv177/clock/clock.c

    ra38b9f8 rdc104a4  
    2222#include <bsp.h>
    2323#include <rtems/libio.h>
    24 #include <assert.h>
    2524
    2625/*
     
    5756rtems_device_minor_number rtems_clock_minor;
    5857
    59 #define PPC_Set_decrementer( _clicks ) \
    60   do { \
    61     asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
    62   } while (0)
    63 
    64 
    65 /*  PAGE
     58/*PAGE
    6659 *
    6760 *  Clock_isr
     
    10295}
    10396
    104 /*  PAGE
     97/*PAGE
    10598 *
    10699 *  Install_clock
     
    134127}
    135128
    136 /*  PAGE
     129/*PAGE
    137130 *
    138131 *  Clock_exit
     
    159152}
    160153 
    161 /*  PAGE
     154/*PAGE
    162155 *
    163156 *  Clock_initialize
  • c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in

    ra38b9f8 rdc104a4  
    55@SET_MAKE@
    66srcdir = @srcdir@
    7 top_srcdir = @top_srcdir@
    87VPATH = @srcdir@
    9 RTEMS_ROOT = @RTEMS_ROOT@
     8RTEMS_ROOT = @top_srcdir@
    109PROJECT_ROOT = @PROJECT_ROOT@
    11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    1210
    1311PGM=${ARCH}/console.rel
     
    2321OBJS=$(C_O_FILES)
    2422
    25 include $(RTEMS_CUSTOM)
    26 include $(PROJECT_ROOT)/make/leaf.cfg
     23include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     24include $(RTEMS_ROOT)/make/leaf.cfg
    2725
    2826#
  • c/src/lib/libbsp/powerpc/dmv177/console/console.c

    ra38b9f8 rdc104a4  
    3939/* Proto-types for Duart.C */
    4040void console_initialize_interrupts( void );
    41 char console_inbyte_polled( int port );
     41int console_inbyte_nonblocking( int port );
    4242void console_outbyte_polled(int  port, char ch);
    4343rtems_isr console_isr (rtems_vector_number vector);
     
    202202  rtems_status_code sc;
    203203  int               port = minor;
    204 #if defined(CONSOLE_USE_INTERRUPTS)
    205   rtems_libio_open_close_args_t *args = arg;
    206 #endif
     204  static const rtems_termios_callbacks pollCallbacks = {
     205    NULL,                        /* firstOpen */
     206    NULL,                        /* lastClose */
     207    console_inbyte_nonblocking,  /* pollRead */
     208    console_write_support,       /* write */
     209    NULL,                        /* setAttributes */
     210    NULL,                        /* stopRemoteTx */
     211    NULL,                        /* startRemoteTx */
     212    0                            /* outputUsesInterrupts */
     213  };
    207214
    208215  /*
     
    218225   *  open the port as a termios console driver.
    219226   */
    220 #if defined(CONSOLE_USE_INTERRUPTS)
    221    sc = rtems_termios_open (major, minor, arg,
    222                             NULL, NULL, NULL,
    223                             console_write_support, 0);
    224 #else
    225    sc = rtems_termios_open (major, minor, arg, NULL, NULL,
    226                             console_inbyte_nonblocking,
    227                             console_write_support,
    228                             0);
    229 #endif
     227  sc = rtems_termios_open (major, minor, arg, &pollCallbacks);
    230228
    231229  return sc;
     
    475473}
    476474#endif /* CONSOLE_USE_INTERRUPTS */
    477 
    478 
    479 
  • c/src/lib/libbsp/powerpc/dmv177/console/duart.c

    ra38b9f8 rdc104a4  
    3939Ring_buffer_t RX_Buffer[2];
    4040
    41 /*  PAGE
     41/*PAGE
    4242 *
    4343 *  init_mc88681
     
    6464}
    6565
    66 /*  PAGE
     66/*PAGE
    6767 *
    6868 *  console_isr
     
    8787
    8888
    89 /*  PAGE
     89/*PAGE
    9090 *
    9191 *  console_outbyte_polled
     
    131131
    132132
    133 /*  PAGE
    134  *
    135  *  console_inbyte_polled
     133/*PAGE
     134 *
     135 *  console_inbyte_nonblocking
    136136 *
    137137 *  This routine reads a character from the UART.
     
    149149      (MC68681_OVERRUN_ERROR | MC68681_PARITY_ERROR | MC68681_FRAMING_ERROR)
    150150
    151 char console_inbyte_polled( int port )
     151int console_inbyte_nonblocking( int port )
    152152{
    153153  char status;
  • c/src/lib/libbsp/powerpc/dmv177/include/Makefile.in

    ra38b9f8 rdc104a4  
    55@SET_MAKE@
    66srcdir = @srcdir@
    7 top_srcdir = @top_srcdir@
    87VPATH = @srcdir@
    9 RTEMS_ROOT = @RTEMS_ROOT@
     8RTEMS_ROOT = @top_srcdir@
    109PROJECT_ROOT = @PROJECT_ROOT@
    11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    1210
    1311H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.h \
     
    2927SRCS=$(H_FILES) $(EQ_FILES)
    3028
    31 include $(RTEMS_CUSTOM)
    32 include $(PROJECT_ROOT)/make/leaf.cfg
     29include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     30include $(RTEMS_ROOT)/make/leaf.cfg
    3331
    3432CLEAN_ADDITIONS +=
  • c/src/lib/libbsp/powerpc/dmv177/include/bsp.h

    ra38b9f8 rdc104a4  
    7373    asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
    7474  } while (0)
    75 
    7675
    7776#define Clear_tm27_intr() \
  • c/src/lib/libbsp/powerpc/dmv177/include/dmv170.h

    ra38b9f8 rdc104a4  
    4242#endif
    4343
    44 /* Note:  Move address defs to the linker files.                            */
    45 #define  DMV170_RTC_ADDRESS   0xf2c00000 /* Real Time clock Base Address*/
    46 #define  DUART_ADDR     0xf2800000  /* base address of the DUART(68681)     */
    47 #define  SCC_ADDR       0xfb000000  /* base address for the SCC (85C30)     */
     44/* Note:  Move address defs to the linker files. XXX */
     45
     46/* Real Time Clock Base Address */
     47#define  DMV170_RTC_ADDRESS   (unsigned char *)0xf2c00000
     48
     49/* base address of the DUART(68681) */
     50#define  DUART_ADDR     0xf2800000
     51
     52/* base address for the SCC (85C30) */
     53#define  SCC_ADDR       0xfb000000
    4854
    4955#define DMV170_LOCAL_CONTROL_STATUS_REG                   0xf2400000
     
    5460#define DMV170_CARD_RESORCE_REG                           0xf2400040
    5561
    56 
    57 #define DMV170_WRITE( reg,data) \
    58    *((volatile rtems_unsigned16 *)(reg)) = (data)
    59 
    60 #define DMV170_READ( reg, data ) \
    61    (data) = *((volatile rtems_unsigned16 *)(reg))
     62#define DMV170_WRITE( _reg, _data ) \
     63   *((volatile rtems_unsigned16 *)(_reg)) = (_data)
     64
     65#define DMV170_READ( _reg, _data ) \
     66   (_data) = *((volatile rtems_unsigned16 *)(_reg))
    6267
    6368/*
     
    8287#define DMV170_EEPROM_DATA_LOW                            0x0000
    8388
    84 /* Bits 8:10 68040 Transfer Modifer Codes represent the Transfer Modifier to be used on MAXPack Accesses. */
    85 /* Bit  11 68040 Transfer Type (TT) 0:TT are both low 1:TT are both high                                  */
     89/* Bits 8-10: 68040 Transfer Modifer Codes represent the Transfer
     90 *            Modifier to be used on MAXPack Accesses.
     91 *
     92 * Bit 11   : 68040 Transfer Type (TT) 0:TT are both low 1:TT are both high
     93 */
    8694
    8795#define DMV170_USER_LINK0_STATUS_MASK                     0x1000
     
    207215#endif /* !_INCLUDE_DMV170_h */
    208216/* end of include file */
    209 
    210 
    211 
    212 
    213 
    214 
    215 
  • c/src/lib/libbsp/powerpc/dmv177/sonic/Makefile.in

    ra38b9f8 rdc104a4  
    55@SET_MAKE@
    66srcdir = @srcdir@
    7 top_srcdir = @top_srcdir@
    87VPATH = @srcdir@
    9 RTEMS_ROOT = @RTEMS_ROOT@
     8RTEMS_ROOT = @top_srcdir@
    109PROJECT_ROOT = @PROJECT_ROOT@
    11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    1210
    1311PGM=${ARCH}/sonic.rel
     
    2826OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
    2927
    30 include $(RTEMS_CUSTOM)
    31 include $(PROJECT_ROOT)/make/leaf.cfg
    32 
     28include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     29include $(RTEMS_ROOT)/make/leaf.cfg
    3330
    3431#
  • c/src/lib/libbsp/powerpc/dmv177/start/Makefile.in

    ra38b9f8 rdc104a4  
    55@SET_MAKE@
    66srcdir = @srcdir@
    7 top_srcdir = @top_srcdir@
    87VPATH = @srcdir@
    9 RTEMS_ROOT = @RTEMS_ROOT@
     8RTEMS_ROOT = @top_srcdir@
    109PROJECT_ROOT = @PROJECT_ROOT@
    11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    1210
    1311PGMS=${ARCH}/start.o
     
    2826OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
    2927
    30 include $(RTEMS_CUSTOM)
    31 include $(PROJECT_ROOT)/make/leaf.cfg
     28include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     29include $(RTEMS_ROOT)/make/leaf.cfg
    3230
    3331#
  • c/src/lib/libbsp/powerpc/dmv177/start/start.s

    ra38b9f8 rdc104a4  
    109109
    110110        /* Let her rip */
    111         bl      FUNC_NAME(main)
     111        bl      FUNC_NAME(boot_card)
    112112
    113         /* return value from main is argument to exit */
     113        /* return value from boot_card is argument to exit */
    114114        bl      FUNC_NAME(exit)
    115115        trap
  • c/src/lib/libbsp/powerpc/dmv177/startup/Makefile.in

    ra38b9f8 rdc104a4  
    55@SET_MAKE@
    66srcdir = @srcdir@
    7 top_srcdir = @top_srcdir@
    8 VPATH = @srcdir@
    9 RTEMS_ROOT = @RTEMS_ROOT@
     7VPATH = @srcdir@:@srcdir@/../../../shared
     8RTEMS_ROOT = @top_srcdir@
    109PROJECT_ROOT = @PROJECT_ROOT@
    11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    1210
    1311PGM=${ARCH}/startup.rel
    1412
    1513# C source names, if any, go here -- minus the .c
    16 C_PIECES=bspstart sbrk setvec genpvec vmeintr
     14C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec genpvec vmeintr
    1715C_FILES=$(C_PIECES:%=%.c)
    1816C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
    19 
    20 CC_PIECES=rtems-ctor
    21 CC_FILES=$(CC_PIECES:%=%.cc)
    22 CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o)
    2317
    2418H_FILES=
    2519
    2620# Assembly source names, if any, go here -- minus the .s
    27 S_PIECES=bspclean
     21S_PIECES=
    2822S_FILES=$(S_PIECES:%=%.s)
    2923S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
     
    3226OBJS=$(C_O_FILES) $(S_O_FILES)
    3327
    34 # We install the RTEMS constructor as a separate .o
    35 # so it can be easily place correctly by the compiler config file.
    36 INSTALLED_O_FILES=$(ARCH)/rtems-ctor.o
    37 
    38 include $(RTEMS_CUSTOM)
    39 include $(PROJECT_ROOT)/make/leaf.cfg
     28include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     29include $(RTEMS_ROOT)/make/leaf.cfg
    4030
    4131#
     
    6656all:    ${ARCH} $(SRCS) $(INSTALLED_O_FILES) $(PGM)
    6757        $(INSTALL) $(srcdir)/linkcmds ${PROJECT_RELEASE}/lib
    68         $(INSTALL_VARIANT) $(INSTALLED_O_FILES) ${PROJECT_RELEASE}/lib
  • c/src/lib/libbsp/powerpc/dmv177/startup/bspstart.c

    ra38b9f8 rdc104a4  
    2121
    2222#include <string.h>
    23 #include <fcntl.h>
    24 
    25 #ifdef STACK_CHECKER_ON
    26 #include <stackchk.h>
    27 #endif
    2823
    2924/*
     
    3732rtems_unsigned32                  bsp_isr_level;
    3833
    39 /*  PAGE
    40  *
    41  *  bsp_libc_init
    42  *
    43  *  Initialize whatever libc we are using called from bsp_postdriver_hook.
    44  *
    45  *  Input parameters: NONE
    46  *
    47  *  Output parameters:  NONE
    48  *
    49  *  Return values: NONE
    50  * 
     34/*
     35 *  Use the shared implementations of the following routines
    5136 */
    5237
    53 void bsp_libc_init(void)
     38void bsp_postdriver_hook(void);
     39void bsp_libc_init( void *, unsigned32, int );
     40
     41/*PAGE
     42 *
     43 *  bsp_pretasking_hook
     44 *
     45 *  BSP pretasking hook.  Called just before drivers are initialized.
     46 *  Used to setup libc and install any BSP extensions.
     47 */
     48
     49void bsp_pretasking_hook(void)
    5450{
    5551  extern int end;
     
    6460  heap_size &= 0xfffffff0;  /* keep it as a multiple of 16 bytes */
    6561
    66   RTEMS_Malloc_Initialize((void *) heap_start, heap_size, 0);
    67 
    68   /*
    69    *  Init the RTEMS libio facility to provide UNIX-like system
    70    *  calls for use by newlib (ie: provide __rtems_open, __rtems_close, etc)
    71    *  Uses malloc() to get area for the iops, so must be after malloc init
    72    */
    73  
    74   rtems_libio_init();
    75  
    76   /*
    77    * Set up for the libc handling.
    78    */
    79  
    80   if (BSP_Configuration.ticks_per_timeslice > 0)
    81     libc_init(1);                /* reentrant if possible */
    82   else
    83     libc_init(0);                /* non-reentrant */
    84 
    85 }
    86 
    87 
    88 /*  PAGE
    89  *
    90  *  bsp_pretasking_hook
    91  *
    92  *  BSP pretasking hook.  Called just before drivers are initialized.
    93  *  Used to setup libc and install any BSP extensions.
    94  *
    95  *  Input parameters: NONE
    96  *
    97  *  Output parameters:  NONE
    98  *
    99  *  Return values: NONE
    100  * 
    101  */
    102 
    103 void bsp_pretasking_hook(void)
    104 {
    105   bsp_libc_init();
    106 
    107 #ifdef STACK_CHECKER_ON
    108   /*
    109    *  Initialize the stack bounds checker
    110    *  We can either turn it on here or from the app.
    111    */
    112 
    113   Stack_check_Initialize();
    114 #endif
     62  bsp_libc_init((void *) heap_start, heap_size, 0);
    11563
    11664#ifdef RTEMS_DEBUG
     
    13785}
    13886
    139 /*  PAGE
    140  *
    141  *  bsp_postdriver_hook
    142  *
    143  *  After drivers are setup, register some "filenames"
    144  *  and open stdin, stdout, stderr files
    145  *
    146  *  Newlib will automatically associate the files with these
    147  *  (it hardcodes the numbers)
    148  *
    149  *  Input parameters: NONE
    150  *
    151  *  Output parameters:  NONE
    152  *
    153  *  Return values: NONE
    154  * 
    155  */
    156  
    157 void bsp_postdriver_hook(void)
    158 {
    159   int stdin_fd, stdout_fd, stderr_fd;
    160   int error_code;
    161  
    162   error_code = 'S' << 24 | 'T' << 16;
    163  
    164   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    165     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    166  
    167   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    168     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    169  
    170   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    171     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    172  
    173   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    174     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    175 }
    176 
    177 /*  PAGE
     87/*PAGE
    17888 *
    17989 *  bsp_start
    18090 *
    18191 *  This routine does the bulk of the system initialization.
    182  *
    183  *  Input parameters: NONE
    184  *
    185  *  Output parameters:  NONE
    186  *
    187  *  Return values: NONE
    188  * 
    18992 */
    19093
     
    199102   * getting the source to work with the debugger.
    200103   */
     104
    201105  _CPU_MSR_SET( msr_value );
    202106   
    203107  /*
    204    * Set up our hooks
    205    * Make sure libc_init is done before drivers initialized so that
    206    * they can use atexit()
     108   *  Need to "allocate" the memory for the RTEMS Workspace and
     109   *  tell the RTEMS configuration where it is.  This memory is
     110   *  not malloc'ed.  It is just "pulled from the air".
    207111   */
    208 
    209   Cpu_table.exceptions_in_RAM = TRUE;
    210 
    211   Cpu_table.pretasking_hook = bsp_pretasking_hook;    /* init libc, etc. */
    212 
    213   Cpu_table.predriver_hook = bsp_predriver_hook;
    214 
    215   Cpu_table.postdriver_hook = bsp_postdriver_hook;
    216 
    217   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    218 
    219   Cpu_table.clicks_per_usec = 66 / 4; /* XXX get from linkcmds */
    220 
    221 
    222   /*
    223    *  SIS does zero out memory BUT only when IT begins execution.  Thus
    224    *  if we want to have a clean slate in the workspace each time we
    225    *  begin execution of OUR application, then we must zero the workspace.
    226    */
    227 
    228   Cpu_table.do_zero_of_workspace = TRUE;
    229 
    230   /*
    231    *  This should be enough interrupt stack.
    232    */
    233 
    234   Cpu_table.interrupt_stack_size = (12 * 1024);
    235 
    236   /*
    237    *  DMV170 does not support MP configurations so there is really no way
    238    *  to check this out.
    239    */
    240 
    241   Cpu_table.extra_mpci_receive_server_stack = 0;
    242 
    243   /*
    244    *  Copy the table and allocate memory for the RTEMS Workspace
    245    */
    246 
    247   BSP_Configuration = Configuration;
    248 
    249 #if defined(RTEMS_POSIX_API)
    250   BSP_Configuration.work_space_size *= 3;
    251 #endif
    252112
    253113  work_space_start =
     
    262122
    263123  /*
    264    * Add 1 region for RTEMS Malloc
    265    */
    266 
    267   BSP_Configuration.RTEMS_api_configuration->maximum_regions++;
    268 
    269   /*
    270124   *  Account for the console's resources
    271125   */
     
    273127  console_reserve_resources( &BSP_Configuration );
    274128
    275 #ifdef RTEMS_NEWLIB
    276129  /*
    277    * Add 1 extension for newlib libc
     130   *  initialize the CPU table for this BSP
    278131   */
    279132
    280   BSP_Configuration.maximum_extensions++;
    281 #endif
     133  Cpu_table.exceptions_in_RAM = TRUE;
     134  Cpu_table.pretasking_hook   = bsp_pretasking_hook;    /* init libc, etc. */
     135  Cpu_table.predriver_hook    = bsp_predriver_hook;
     136  Cpu_table.postdriver_hook   = bsp_postdriver_hook;
     137  Cpu_table.clicks_per_usec   = 66 / 4;  /* XXX get from linkcmds */
    282138
    283 #ifdef STACK_CHECKER_ON
    284   /*
    285    * Add 1 extension for stack checker
    286    */
    287 
    288   BSP_Configuration.maximum_extensions++;
    289 #endif
    290 
    291   /*
    292    * Add 1 extension for MPCI_fatal
    293    */
    294 
    295   if (BSP_Configuration.User_multiprocessing_table)
    296     BSP_Configuration.maximum_extensions++;
    297 
    298   /*
    299    *  Initialize RTEMS. main() will finish it up and start multitasking.
    300    */
    301 
    302   rtems_libio_config( &BSP_Configuration, BSP_LIBIO_MAX_FDS );
    303  
    304   bsp_isr_level = rtems_initialize_executive_early(
    305      &BSP_Configuration,
    306      &Cpu_table
    307   );
     139  Cpu_table.do_zero_of_workspace = TRUE;
     140  Cpu_table.interrupt_stack_size = (12 * 1024);
    308141}
    309 
    310 
    311 
    312 
  • c/src/lib/libbsp/powerpc/dmv177/startup/genpvec.c

    ra38b9f8 rdc104a4  
    4747Chain_Control     ISR_Array  [NUM_LIRQ];
    4848
     49/*PAGE
     50 *
     51 * external_exception_ISR
     52 *
     53 * This interrupt service routine is called for an External Exception.
     54 *
     55 *  Input parameters:
     56 *    vector - vector number representing the external exception vector.
     57 *
     58 *  Output parameters:  NONE
     59 *
     60 *  Return values:
     61 */
    4962
    50 /*  PAGE
     63rtems_isr external_exception_ISR (
     64  rtems_vector_number   vector             /* IN  */
     65)
     66{
     67 rtems_unsigned16    index;
     68 Chain_Node          *node;
     69 EE_ISR_Type         *ee_isr;
     70 
     71 /*
     72  * Read vector.
     73  */
     74 index = 0;
     75
     76 node = ISR_Array[ index ].first;
     77 while ( !_Chain_Is_tail( &ISR_Array[ index ], node ) ) {
     78   ee_isr = (EE_ISR_Type *) node;
     79   (*ee_isr->handler)( ee_isr->vector );
     80   node = node->next;
     81 }
     82
     83 /*
     84  * Clear the interrupt.
     85  */
     86}
     87
     88
     89/*PAGE
    5190 *
    5291 *  initialize_external_exception_vector
     
    81120}
    82121
    83 /*  PAGE
     122/*PAGE
    84123 *
    85124 *  set_EE_vector
     
    96135 *  Return values:
    97136 */
     137
    98138rtems_isr_entry  set_EE_vector(
    99139  rtems_isr_entry     handler,      /* isr routine        */
     
    146186}
    147187
    148 /*  PAGE
    149  *
    150  * external_exception_ISR
    151  *
    152  * This interrupt service routine is called for an External Exception.
    153  *
    154  *  Input parameters:
    155  *    vector - vector number representing the external exception vector.
    156  *
    157  *  Output parameters:  NONE
    158  *
    159  *  Return values:
    160  */
    161 
    162 rtems_isr external_exception_ISR (
    163   rtems_vector_number   vector             /* IN  */
    164 )
    165 {
    166  rtems_unsigned16    index;
    167  EE_ISR_Type         *node;
    168  
    169  /*
    170   * Read vector.
    171   */
    172  index = 0;
    173 
    174  node = ISR_Array[ index ].first;
    175  while ( !_Chain_Is_tail( &ISR_Array[ index ], node ) ) {
    176    (*node->handler)( node->vector );
    177    node = node->Node.next;
    178  }
    179 
    180  /*
    181   * Clear the interrupt.
    182   */
    183 }
    184 
  • c/src/lib/libbsp/powerpc/dmv177/startup/linkcmds

    ra38b9f8 rdc104a4  
    5151    /* .gnu.warning sections are handled specially by elf32.em.  */
    5252    *(.gnu.warning)
    53   } =0
    54   .init           : { *(.init)          } =0
    55   .fini           : { *(.fini)          } =0
    56   .rodata         : { *(.rodata)  }
    57   .rodata1        : { *(.rodata1) }
     53  } >RAM
     54  .init           : { *(.init)          } >RAM
     55  .fini           : { *(.fini)          } >RAM
     56  .rodata         : { *(.rodata)        } >RAM
     57  .rodata1        : { *(.rodata1)       } >RAM
    5858  _etext = .;
    5959  PROVIDE (etext = .);
    6060  PROVIDE (__SDATA2_START__ = .);
    61   .sdata2   : { *(.sdata2) }
    62   .sbss2   : { *(.sbss2) }
     61  .sdata2         : { *(.sdata2)        } >RAM
     62  .sbss2          : { *(.sbss2)         } >RAM
    6363  PROVIDE (__SBSS2_END__ = .);
    6464  /* Adjust the address for the data segment.  We want to adjust up to
     
    8282    *(.data)
    8383    CONSTRUCTORS
    84   }
     84  } >RAM
    8585  PROVIDE (__EXCEPT_START__ = .);
    86   .gcc_except_table   : { *(.gcc_except_table) }
     86  .gcc_except_table   : { *(.gcc_except_table) } >RAM
    8787  PROVIDE (__EXCEPT_END__ = .);
    8888
    89   .data1   : { *(.data1) }
    90   .got1           : { *(.got1) }
    91   .dynamic        : { *(.dynamic) }
     89  .data1          : { *(.data1)         } >RAM
     90  .got1           : { *(.got1)          } >RAM
     91  .dynamic        : { *(.dynamic)       } >RAM
    9292  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
    9393     get relocated with -mrelocatable. Also put in the .fixup pointers.
    9494     The current compiler no longer needs this, but keep it around for 2.7.2  */
    95                 PROVIDE (_GOT2_START_ = .);
    96   .got2           :  { *(.got2) }
    97                 PROVIDE (__GOT2_END__ = .);
    98                 PROVIDE (__CTOR_LIST__ = .);
    99   .ctors          : { *(.ctors) }
    100                 PROVIDE (__CTOR_END__ = .);
    101                 PROVIDE (__DTOR_LIST__ = .);
    102   .dtors          : { *(.dtors) }
    103                 PROVIDE (__DTOR_END__ = .);
    104                 PROVIDE (_FIXUP_START_ = .);
    105   .fixup          : { *(.fixup) }
    106                 PROVIDE (_FIXUP_END_ = .);
    107                 PROVIDE (__FIXUP_END__ = .);
    108                 PROVIDE (_GOT2_END_ = .);
    109                 PROVIDE (_GOT_START_ = .);
     95  PROVIDE (_GOT2_START_ = .);
     96  PROVIDE (__GOT2_START__ = .);
     97  .got2           :  { *(.got2)         } >RAM
     98  PROVIDE (_GOT2_END_ = .);
     99  PROVIDE (__GOT2_END__ = .);
     100
     101  PROVIDE (__CTOR_LIST__ = .);
     102  .ctors          : { *(.ctors)         } >RAM
     103  PROVIDE (__CTOR_END__ = .);
     104
     105  PROVIDE (__DTOR_LIST__ = .);
     106  .dtors          : { *(.dtors)         } >RAM
     107  PROVIDE (__DTOR_END__ = .);
     108
     109  PROVIDE (_FIXUP_START_ = .);
     110  PROVIDE (__FIXUP_START__ = .);
     111  .fixup          : { *(.fixup)         } >RAM
     112  PROVIDE (_FIXUP_END_ = .);
     113  PROVIDE (__FIXUP_END__ = .);
     114
     115  PROVIDE (_GOT2_END_ = .);
     116  PROVIDE (_GOT_START_ = .);
    110117  s.got = .;
    111   .got            : { *(.got) }
    112   .got.plt        : { *(.got.plt) }
    113                 PROVIDE (_GOT_END_ = .);
    114                 PROVIDE (__GOT_END__ = .);
     118  .got            : { *(.got)           } >RAM
     119  .got.plt        : { *(.got.plt)       } >RAM
     120  PROVIDE (_GOT_END_ = .);
     121  PROVIDE (__GOT_END__ = .);
     122
    115123  /* We want the small data sections together, so single-instruction offsets
    116124     can access them all, and initialized data all before uninitialized, so
    117125     we can shorten the on-disk segment size.  */
    118126  PROVIDE (__SDATA_START__ = .);
    119   .sdata          : { *(.sdata) }
     127  .sdata          : { *(.sdata)         } >RAM
    120128  _edata  =  .;
    121129  PROVIDE (edata = .);
     130
    122131  PROVIDE (RAM_END = 4M);
    123132  .sbss      :
     
    127136    *(.scommon)
    128137    PROVIDE (__sbss_end = .);
    129   }
     138  } >RAM
    130139  PROVIDE (__SBSS_END__ = .);
    131140  .bss       :
     
    135144   *(.bss)
    136145   *(COMMON)
    137   }
     146  } >RAM
    138147  . =  ALIGN(8) + 0x8000;
    139148  PROVIDE (__stack = .);
  • c/src/lib/libbsp/powerpc/dmv177/startup/setvec.c

    ra38b9f8 rdc104a4  
    1212 *  RETURNS:
    1313 *    address of previous interrupt handler
    14  *
    15  *  Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/setvec.c:
    1614 *
    1715 *  COPYRIGHT (c) 1989-1997.
     
    2927#include <bsp.h>
    3028
    31 
    32 /*  PAGE
    33  *
    34  *  set_vector
    35  *
    36  *  This routine installs vector number vector.
    37  * 
    38  *  Input parameters:
    39  *    handler - routine to call when the interupt occurs
    40  *    vector  - vector id
    41  *    type    - RAW or RTEMS vector
    42  *
    43  *  Output parameters:  NONE
    44  *
    45  *  Return values:      Removed interupt routine or 0 if none.
    46  */
    47 
    4829rtems_isr_entry set_vector(                    /* returns old vector */
    4930  rtems_isr_entry     handler,                  /* isr routine        */
     
    5536  rtems_status_code status;
    5637
    57 
    5838  /*
    5939   * vectors greater than PPC603e_IRQ_LAST are handled by the General purpose
     
    6444  }
    6545  else  {
    66     status = rtems_interrupt_catch
    67            ( handler, vector, (rtems_isr_entry *) &previous_isr );
     46    status = rtems_interrupt_catch(
     47       handler, vector, (rtems_isr_entry *) &previous_isr );
    6848  }
    6949  return previous_isr;
  • c/src/lib/libbsp/powerpc/dmv177/timer/Makefile.in

    ra38b9f8 rdc104a4  
    55@SET_MAKE@
    66srcdir = @srcdir@
    7 top_srcdir = @top_srcdir@
    87VPATH = @srcdir@
    9 RTEMS_ROOT = @RTEMS_ROOT@
     8RTEMS_ROOT = @top_srcdir@
    109PROJECT_ROOT = @PROJECT_ROOT@
    11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    1210
    1311PGM=${ARCH}/timer.rel
     
    2826OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
    2927
    30 include $(RTEMS_CUSTOM)
    31 include $(PROJECT_ROOT)/make/leaf.cfg
     28include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     29include $(RTEMS_ROOT)/make/leaf.cfg
    3230
    3331#
  • c/src/lib/libbsp/powerpc/dmv177/timer/timer.c

    ra38b9f8 rdc104a4  
    1919rtems_boolean Timer_driver_Find_average_overhead;
    2020
    21 static inline rtems_unsigned64 PPC_Get_timebase_register( void )
    22 {
    23   rtems_unsigned32 tbr_low;
    24   rtems_unsigned32 tbr_high;
    25   rtems_unsigned32 tbr_high_old;
    26   rtems_unsigned64 tbr;
    27 
    28   do {
    29     asm volatile( "mftbu %0" : "=r" (tbr_high_old));
    30     asm volatile( "mftb  %0" : "=r" (tbr_low));
    31     asm volatile( "mftbu %0" : "=r" (tbr_high));
    32   } while ( tbr_high_old != tbr_high );
    33 
    34   tbr = tbr_high;
    35   tbr <<= 32;
    36   tbr |= tbr_low;
    37   return tbr;
    38 }
    39 
    40 /*  PAGE
     21/*PAGE
    4122 *
    4223 *  Timer_initialize
  • c/src/lib/libbsp/powerpc/dmv177/tod/Makefile.in

    ra38b9f8 rdc104a4  
    55@SET_MAKE@
    66srcdir = @srcdir@
    7 top_srcdir = @top_srcdir@
    87VPATH = @srcdir@
    9 RTEMS_ROOT = @RTEMS_ROOT@
     8RTEMS_ROOT = @top_srcdir@
    109PROJECT_ROOT = @PROJECT_ROOT@
    11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    1210
    1311PGM=${ARCH}/tod.rel
     
    2321OBJS=$(C_O_FILES)
    2422
    25 include $(RTEMS_CUSTOM)
    26 include $(PROJECT_ROOT)/make/leaf.cfg
     23include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     24include $(RTEMS_ROOT)/make/leaf.cfg
    2725
    2826# First and second generation use different RTC chips :(
  • c/src/lib/libbsp/powerpc/dmv177/tod/tod.c

    ra38b9f8 rdc104a4  
    2626void ICM7170_GetTOD(
    2727  volatile unsigned char *imc1770_regs,
    28   rtems_unsigned8        icm1770_freq,
     28  rtems_unsigned8         icm1770_freq,
    2929  rtems_time_of_day      *rtc_tod
    3030);
    3131void ICM7170_SetTOD(
    3232  volatile unsigned char *imc1770_regs,
    33   rtems_unsigned8        icm1770_freq,
     33  rtems_unsigned8         icm1770_freq,
    3434  rtems_time_of_day      *rtc_tod
    3535);
     
    244244)
    245245{
    246   int ticks;
    247246  int year;
    248247
     
    274273}
    275274
    276 
    277 
    278 
    279 
    280 
    281 
    282 
  • c/src/lib/libbsp/powerpc/dmv177/wrapup/Makefile.in

    ra38b9f8 rdc104a4  
    55@SET_MAKE@
    66srcdir = @srcdir@
    7 top_srcdir = @top_srcdir@
    87VPATH = @srcdir@
    9 RTEMS_ROOT = @RTEMS_ROOT@
     8RTEMS_ROOT = @top_srcdir@
    109PROJECT_ROOT = @PROJECT_ROOT@
    11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
    1210
    13 #BSP_PIECES=startup clock console timer tod vectors
    14 BSP_PIECES=startup clock console sonic timer tod #vectors
     11# We only build the ka9q device driver if HAS_KA9Q was defined
     12KA9Q_DRIVER_yes_V = network
     13KA9Q_DRIVER = $(KA9Q_DRIVER_$(HAS_KA9Q)_V)
     14
     15# pieces specific to this BSP
     16BSP_PIECES=startup clock console timer tod $(KA9Q_DRIVER)
     17
    1518# pieces to pick up out of libcpu/$(RTEMS_CPU)
    1619CPU_PIECES=
     20
     21# shared pieces
    1722GENERIC_PIECES=
    1823
     
    2530LIB=$(ARCH)/libbsp.a
    2631
    27 include $(RTEMS_CUSTOM)
    28 include $(PROJECT_ROOT)/make/lib.cfg
     32include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
     33include $(RTEMS_ROOT)/make/lib.cfg
    2934
    3035#
  • make/custom/dmv177.cfg

    ra38b9f8 rdc104a4  
    99#
    1010
    11 include $(PROJECT_ROOT)/make/custom/default.cfg
     11include $(RTEMS_ROOT)/make/custom/default.cfg
    1212
    13 RTEMS_CPU=ppc
     13RTEMS_CPU=powerpc
    1414RTEMS_CPU_MODEL=ppc603e
    1515
    1616# This is the actual bsp directory used during the build process.
    17 
    18 RTEMS_BSP_FAMILY=dmv170
    19 
    20 RTEMS_BSP=dmv170
     17RTEMS_BSP_FAMILY=dmv177
    2118
    2219#  This section makes the target dependent options file.
     
    2825#  RTEMS_TEST_NO_PAUSE (RTEMS tests)
    2926#     do not pause between screens of output in the rtems tests
    30 #
    31 #  STACK_CHECKER_ON (RTEMS support code)
    32 #     If defined, stack bounds checking is enabled.
    33 #
    34 #  STACK_CHECKER_REPORT_USAGE (RTEMS support code)
    35 #     If this and STACK_CHECKER_ON are defined, then a report on stack usage
    36 #     per task is printed when the program exits.
    3727#
    3828#  RTEMS_DEBUG (RTEMS)
     
    5747#     ELF is the only one supported.
    5848#
    59 
     49#  PPC_USE_SPRG (RTEMS PowerPC port)
     50#     If defined, then the PowerPC specific code in RTEMS will use some
     51#     of the special purpose registers to slightly optimize interrupt
     52#     response time.  The use of these registers can conflict with
     53#     other tools like debuggers.
    6054
    6155
     
    6357        @echo "/* #define NDEBUG 1 */ "                            >>$@
    6458        @echo "#define RTEMS_TEST_NO_PAUSE 1"                      >>$@
    65         @echo "/* #define STACK_CHECKER_ON  1 */"                  >>$@
    66         @echo "/* #define STACK_CHECKER_REPORT_USAGE  1 */"        >>$@
    6759        @echo "/* #define RTEMS_DEBUG  1 */"                       >>$@
    6860        @echo "#define CONSOLE_USE_INTERRUPTS 0"                   >>$@
     
    7163        @echo "#define PPC_ABI PPC_ABI_EABI"                       >>$@
    7264        @echo "#define PPC_ASM PPC_ASM_ELF"                        >>$@
     65        @echo "#define PPC_USE_SPRG 1"                             >>$@
    7366endef
    7467
     
    8275# NOTE: some level of -O may be actually required by inline assembler
    8376CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
     77
     78# Define this to yes if this target supports multiprocessor environments.
     79HAS_MP=no
     80
     81# XXX temporary
     82# This target does not support the ka9q tcp/ip stack so ignore requests
     83# to enable it.
     84HAS_KA9Q=no
    8485
    8586# The following is a linkcmds file which will work without using the
     
    109110START_BASE=
    110111
    111 
     112# Let the HWAPI know which set of drivers to build
    112113DRIVER_ARCHITECTURE=vmebus
Note: See TracChangeset for help on using the changeset viewer.