Changeset dc104a4 in rtems
- Timestamp:
- 05/30/98 11:46:21 (25 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- b317117a
- Parents:
- a38b9f8
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/powerpc/dmv177/Makefile.in
ra38b9f8 rdc104a4 5 5 @SET_MAKE@ 6 6 srcdir = @srcdir@ 7 top_srcdir = @top_srcdir@8 7 VPATH = @srcdir@ 9 RTEMS_ROOT = @ RTEMS_ROOT@8 RTEMS_ROOT = @top_srcdir@ 10 9 PROJECT_ROOT = @PROJECT_ROOT@ 11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg12 10 13 include $(RTEMS_ CUSTOM)14 include $( PROJECT_ROOT)/make/directory.cfg11 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg 12 include $(RTEMS_ROOT)/make/directory.cfg 15 13 16 14 SRCS=README 15 16 # We only build the ka9q device driver if HAS_KA9Q was defined 17 KA9Q_DRIVER_yes_V = sonic 18 KA9Q_DRIVER = $(KA9Q_DRIVER_$(HAS_KA9Q)_V) 17 19 18 20 all: $(SRCS) … … 21 23 # from the individual .rel files built in other directories 22 24 SUB_DIRS=include clock console startup start timer \ 23 tod sonicwrapup25 tod $(KA9Q_DRIVER) wrapup -
c/src/lib/libbsp/powerpc/dmv177/clock/Makefile.in
ra38b9f8 rdc104a4 5 5 @SET_MAKE@ 6 6 srcdir = @srcdir@ 7 top_srcdir = @top_srcdir@8 7 VPATH = @srcdir@ 9 RTEMS_ROOT = @ RTEMS_ROOT@8 RTEMS_ROOT = @top_srcdir@ 10 9 PROJECT_ROOT = @PROJECT_ROOT@ 11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg12 10 13 11 PGM=${ARCH}/clock.rel … … 28 26 OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) 29 27 30 include $(RTEMS_CUSTOM) 31 include $(PROJECT_ROOT)/make/leaf.cfg 32 28 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg 29 include $(RTEMS_ROOT)/make/leaf.cfg 33 30 34 31 # -
c/src/lib/libbsp/powerpc/dmv177/clock/clock.c
ra38b9f8 rdc104a4 22 22 #include <bsp.h> 23 23 #include <rtems/libio.h> 24 #include <assert.h>25 24 26 25 /* … … 57 56 rtems_device_minor_number rtems_clock_minor; 58 57 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 66 59 * 67 60 * Clock_isr … … 102 95 } 103 96 104 /* 97 /*PAGE 105 98 * 106 99 * Install_clock … … 134 127 } 135 128 136 /* 129 /*PAGE 137 130 * 138 131 * Clock_exit … … 159 152 } 160 153 161 /* 154 /*PAGE 162 155 * 163 156 * Clock_initialize -
c/src/lib/libbsp/powerpc/dmv177/console/Makefile.in
ra38b9f8 rdc104a4 5 5 @SET_MAKE@ 6 6 srcdir = @srcdir@ 7 top_srcdir = @top_srcdir@8 7 VPATH = @srcdir@ 9 RTEMS_ROOT = @ RTEMS_ROOT@8 RTEMS_ROOT = @top_srcdir@ 10 9 PROJECT_ROOT = @PROJECT_ROOT@ 11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg12 10 13 11 PGM=${ARCH}/console.rel … … 23 21 OBJS=$(C_O_FILES) 24 22 25 include $(RTEMS_ CUSTOM)26 include $( PROJECT_ROOT)/make/leaf.cfg23 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg 24 include $(RTEMS_ROOT)/make/leaf.cfg 27 25 28 26 # -
c/src/lib/libbsp/powerpc/dmv177/console/console.c
ra38b9f8 rdc104a4 39 39 /* Proto-types for Duart.C */ 40 40 void console_initialize_interrupts( void ); 41 char console_inbyte_polled( int port );41 int console_inbyte_nonblocking( int port ); 42 42 void console_outbyte_polled(int port, char ch); 43 43 rtems_isr console_isr (rtems_vector_number vector); … … 202 202 rtems_status_code sc; 203 203 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 }; 207 214 208 215 /* … … 218 225 * open the port as a termios console driver. 219 226 */ 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); 230 228 231 229 return sc; … … 475 473 } 476 474 #endif /* CONSOLE_USE_INTERRUPTS */ 477 478 479 -
c/src/lib/libbsp/powerpc/dmv177/console/duart.c
ra38b9f8 rdc104a4 39 39 Ring_buffer_t RX_Buffer[2]; 40 40 41 /* 41 /*PAGE 42 42 * 43 43 * init_mc88681 … … 64 64 } 65 65 66 /* 66 /*PAGE 67 67 * 68 68 * console_isr … … 87 87 88 88 89 /* 89 /*PAGE 90 90 * 91 91 * console_outbyte_polled … … 131 131 132 132 133 /* 134 * 135 * console_inbyte_ polled133 /*PAGE 134 * 135 * console_inbyte_nonblocking 136 136 * 137 137 * This routine reads a character from the UART. … … 149 149 (MC68681_OVERRUN_ERROR | MC68681_PARITY_ERROR | MC68681_FRAMING_ERROR) 150 150 151 char console_inbyte_polled( int port )151 int console_inbyte_nonblocking( int port ) 152 152 { 153 153 char status; -
c/src/lib/libbsp/powerpc/dmv177/include/Makefile.in
ra38b9f8 rdc104a4 5 5 @SET_MAKE@ 6 6 srcdir = @srcdir@ 7 top_srcdir = @top_srcdir@8 7 VPATH = @srcdir@ 9 RTEMS_ROOT = @ RTEMS_ROOT@8 RTEMS_ROOT = @top_srcdir@ 10 9 PROJECT_ROOT = @PROJECT_ROOT@ 11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg12 10 13 11 H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.h \ … … 29 27 SRCS=$(H_FILES) $(EQ_FILES) 30 28 31 include $(RTEMS_ CUSTOM)32 include $( PROJECT_ROOT)/make/leaf.cfg29 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg 30 include $(RTEMS_ROOT)/make/leaf.cfg 33 31 34 32 CLEAN_ADDITIONS += -
c/src/lib/libbsp/powerpc/dmv177/include/bsp.h
ra38b9f8 rdc104a4 73 73 asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \ 74 74 } while (0) 75 76 75 77 76 #define Clear_tm27_intr() \ -
c/src/lib/libbsp/powerpc/dmv177/include/dmv170.h
ra38b9f8 rdc104a4 42 42 #endif 43 43 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 48 54 49 55 #define DMV170_LOCAL_CONTROL_STATUS_REG 0xf2400000 … … 54 60 #define DMV170_CARD_RESORCE_REG 0xf2400040 55 61 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)) 62 67 63 68 /* … … 82 87 #define DMV170_EEPROM_DATA_LOW 0x0000 83 88 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 */ 86 94 87 95 #define DMV170_USER_LINK0_STATUS_MASK 0x1000 … … 207 215 #endif /* !_INCLUDE_DMV170_h */ 208 216 /* end of include file */ 209 210 211 212 213 214 215 -
c/src/lib/libbsp/powerpc/dmv177/sonic/Makefile.in
ra38b9f8 rdc104a4 5 5 @SET_MAKE@ 6 6 srcdir = @srcdir@ 7 top_srcdir = @top_srcdir@8 7 VPATH = @srcdir@ 9 RTEMS_ROOT = @ RTEMS_ROOT@8 RTEMS_ROOT = @top_srcdir@ 10 9 PROJECT_ROOT = @PROJECT_ROOT@ 11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg12 10 13 11 PGM=${ARCH}/sonic.rel … … 28 26 OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) 29 27 30 include $(RTEMS_CUSTOM) 31 include $(PROJECT_ROOT)/make/leaf.cfg 32 28 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg 29 include $(RTEMS_ROOT)/make/leaf.cfg 33 30 34 31 # -
c/src/lib/libbsp/powerpc/dmv177/start/Makefile.in
ra38b9f8 rdc104a4 5 5 @SET_MAKE@ 6 6 srcdir = @srcdir@ 7 top_srcdir = @top_srcdir@8 7 VPATH = @srcdir@ 9 RTEMS_ROOT = @ RTEMS_ROOT@8 RTEMS_ROOT = @top_srcdir@ 10 9 PROJECT_ROOT = @PROJECT_ROOT@ 11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg12 10 13 11 PGMS=${ARCH}/start.o … … 28 26 OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) 29 27 30 include $(RTEMS_ CUSTOM)31 include $( PROJECT_ROOT)/make/leaf.cfg28 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg 29 include $(RTEMS_ROOT)/make/leaf.cfg 32 30 33 31 # -
c/src/lib/libbsp/powerpc/dmv177/start/start.s
ra38b9f8 rdc104a4 109 109 110 110 /* Let her rip */ 111 bl FUNC_NAME( main)111 bl FUNC_NAME(boot_card) 112 112 113 /* return value from mainis argument to exit */113 /* return value from boot_card is argument to exit */ 114 114 bl FUNC_NAME(exit) 115 115 trap -
c/src/lib/libbsp/powerpc/dmv177/startup/Makefile.in
ra38b9f8 rdc104a4 5 5 @SET_MAKE@ 6 6 srcdir = @srcdir@ 7 top_srcdir = @top_srcdir@ 8 VPATH = @srcdir@ 9 RTEMS_ROOT = @RTEMS_ROOT@ 7 VPATH = @srcdir@:@srcdir@/../../../shared 8 RTEMS_ROOT = @top_srcdir@ 10 9 PROJECT_ROOT = @PROJECT_ROOT@ 11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg12 10 13 11 PGM=${ARCH}/startup.rel 14 12 15 13 # C source names, if any, go here -- minus the .c 16 C_PIECES=bsp startsbrk setvec genpvec vmeintr14 C_PIECES=bspclean bsplibc bsppost bspstart main sbrk setvec genpvec vmeintr 17 15 C_FILES=$(C_PIECES:%=%.c) 18 16 C_O_FILES=$(C_PIECES:%=${ARCH}/%.o) 19 20 CC_PIECES=rtems-ctor21 CC_FILES=$(CC_PIECES:%=%.cc)22 CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o)23 17 24 18 H_FILES= 25 19 26 20 # Assembly source names, if any, go here -- minus the .s 27 S_PIECES= bspclean21 S_PIECES= 28 22 S_FILES=$(S_PIECES:%=%.s) 29 23 S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o) … … 32 26 OBJS=$(C_O_FILES) $(S_O_FILES) 33 27 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 28 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg 29 include $(RTEMS_ROOT)/make/leaf.cfg 40 30 41 31 # … … 66 56 all: ${ARCH} $(SRCS) $(INSTALLED_O_FILES) $(PGM) 67 57 $(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 21 21 22 22 #include <string.h> 23 #include <fcntl.h>24 25 #ifdef STACK_CHECKER_ON26 #include <stackchk.h>27 #endif28 23 29 24 /* … … 37 32 rtems_unsigned32 bsp_isr_level; 38 33 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 51 36 */ 52 37 53 void bsp_libc_init(void) 38 void bsp_postdriver_hook(void); 39 void 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 49 void bsp_pretasking_hook(void) 54 50 { 55 51 extern int end; … … 64 60 heap_size &= 0xfffffff0; /* keep it as a multiple of 16 bytes */ 65 61 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); 115 63 116 64 #ifdef RTEMS_DEBUG … … 137 85 } 138 86 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 178 88 * 179 89 * bsp_start 180 90 * 181 91 * This routine does the bulk of the system initialization. 182 *183 * Input parameters: NONE184 *185 * Output parameters: NONE186 *187 * Return values: NONE188 *189 92 */ 190 93 … … 199 102 * getting the source to work with the debugger. 200 103 */ 104 201 105 _CPU_MSR_SET( msr_value ); 202 106 203 107 /* 204 * Set up our hooks205 * Make sure libc_init is done before drivers initialized so that206 * 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". 207 111 */ 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. Thus224 * if we want to have a clean slate in the workspace each time we225 * 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 way238 * 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 Workspace245 */246 247 BSP_Configuration = Configuration;248 249 #if defined(RTEMS_POSIX_API)250 BSP_Configuration.work_space_size *= 3;251 #endif252 112 253 113 work_space_start = … … 262 122 263 123 /* 264 * Add 1 region for RTEMS Malloc265 */266 267 BSP_Configuration.RTEMS_api_configuration->maximum_regions++;268 269 /*270 124 * Account for the console's resources 271 125 */ … … 273 127 console_reserve_resources( &BSP_Configuration ); 274 128 275 #ifdef RTEMS_NEWLIB276 129 /* 277 * Add 1 extension for newlib libc130 * initialize the CPU table for this BSP 278 131 */ 279 132 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 */ 282 138 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); 308 141 } 309 310 311 312 -
c/src/lib/libbsp/powerpc/dmv177/startup/genpvec.c
ra38b9f8 rdc104a4 47 47 Chain_Control ISR_Array [NUM_LIRQ]; 48 48 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 */ 49 62 50 /* PAGE 63 rtems_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 51 90 * 52 91 * initialize_external_exception_vector … … 81 120 } 82 121 83 /* 122 /*PAGE 84 123 * 85 124 * set_EE_vector … … 96 135 * Return values: 97 136 */ 137 98 138 rtems_isr_entry set_EE_vector( 99 139 rtems_isr_entry handler, /* isr routine */ … … 146 186 } 147 187 148 /* PAGE149 *150 * external_exception_ISR151 *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: NONE158 *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 51 51 /* .gnu.warning sections are handled specially by elf32.em. */ 52 52 *(.gnu.warning) 53 } =054 .init : { *(.init) } =055 .fini : { *(.fini) } =056 .rodata : { *(.rodata) }57 .rodata1 : { *(.rodata1) }53 } >RAM 54 .init : { *(.init) } >RAM 55 .fini : { *(.fini) } >RAM 56 .rodata : { *(.rodata) } >RAM 57 .rodata1 : { *(.rodata1) } >RAM 58 58 _etext = .; 59 59 PROVIDE (etext = .); 60 60 PROVIDE (__SDATA2_START__ = .); 61 .sdata2 : { *(.sdata2) }62 .sbss2 : { *(.sbss2) }61 .sdata2 : { *(.sdata2) } >RAM 62 .sbss2 : { *(.sbss2) } >RAM 63 63 PROVIDE (__SBSS2_END__ = .); 64 64 /* Adjust the address for the data segment. We want to adjust up to … … 82 82 *(.data) 83 83 CONSTRUCTORS 84 } 84 } >RAM 85 85 PROVIDE (__EXCEPT_START__ = .); 86 .gcc_except_table : { *(.gcc_except_table) } 86 .gcc_except_table : { *(.gcc_except_table) } >RAM 87 87 PROVIDE (__EXCEPT_END__ = .); 88 88 89 .data1 : { *(.data1) }90 .got1 : { *(.got1) }91 .dynamic : { *(.dynamic) }89 .data1 : { *(.data1) } >RAM 90 .got1 : { *(.got1) } >RAM 91 .dynamic : { *(.dynamic) } >RAM 92 92 /* Put .ctors and .dtors next to the .got2 section, so that the pointers 93 93 get relocated with -mrelocatable. Also put in the .fixup pointers. 94 94 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_ = .); 110 117 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 115 123 /* We want the small data sections together, so single-instruction offsets 116 124 can access them all, and initialized data all before uninitialized, so 117 125 we can shorten the on-disk segment size. */ 118 126 PROVIDE (__SDATA_START__ = .); 119 .sdata : { *(.sdata) }127 .sdata : { *(.sdata) } >RAM 120 128 _edata = .; 121 129 PROVIDE (edata = .); 130 122 131 PROVIDE (RAM_END = 4M); 123 132 .sbss : … … 127 136 *(.scommon) 128 137 PROVIDE (__sbss_end = .); 129 } 138 } >RAM 130 139 PROVIDE (__SBSS_END__ = .); 131 140 .bss : … … 135 144 *(.bss) 136 145 *(COMMON) 137 } 146 } >RAM 138 147 . = ALIGN(8) + 0x8000; 139 148 PROVIDE (__stack = .); -
c/src/lib/libbsp/powerpc/dmv177/startup/setvec.c
ra38b9f8 rdc104a4 12 12 * RETURNS: 13 13 * address of previous interrupt handler 14 *15 * Derived from c/src/lib/libbsp/no_cpu/no_bsp/startup/setvec.c:16 14 * 17 15 * COPYRIGHT (c) 1989-1997. … … 29 27 #include <bsp.h> 30 28 31 32 /* PAGE33 *34 * set_vector35 *36 * This routine installs vector number vector.37 *38 * Input parameters:39 * handler - routine to call when the interupt occurs40 * vector - vector id41 * type - RAW or RTEMS vector42 *43 * Output parameters: NONE44 *45 * Return values: Removed interupt routine or 0 if none.46 */47 48 29 rtems_isr_entry set_vector( /* returns old vector */ 49 30 rtems_isr_entry handler, /* isr routine */ … … 55 36 rtems_status_code status; 56 37 57 58 38 /* 59 39 * vectors greater than PPC603e_IRQ_LAST are handled by the General purpose … … 64 44 } 65 45 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 ); 68 48 } 69 49 return previous_isr; -
c/src/lib/libbsp/powerpc/dmv177/timer/Makefile.in
ra38b9f8 rdc104a4 5 5 @SET_MAKE@ 6 6 srcdir = @srcdir@ 7 top_srcdir = @top_srcdir@8 7 VPATH = @srcdir@ 9 RTEMS_ROOT = @ RTEMS_ROOT@8 RTEMS_ROOT = @top_srcdir@ 10 9 PROJECT_ROOT = @PROJECT_ROOT@ 11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg12 10 13 11 PGM=${ARCH}/timer.rel … … 28 26 OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES) 29 27 30 include $(RTEMS_ CUSTOM)31 include $( PROJECT_ROOT)/make/leaf.cfg28 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg 29 include $(RTEMS_ROOT)/make/leaf.cfg 32 30 33 31 # -
c/src/lib/libbsp/powerpc/dmv177/timer/timer.c
ra38b9f8 rdc104a4 19 19 rtems_boolean Timer_driver_Find_average_overhead; 20 20 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 41 22 * 42 23 * Timer_initialize -
c/src/lib/libbsp/powerpc/dmv177/tod/Makefile.in
ra38b9f8 rdc104a4 5 5 @SET_MAKE@ 6 6 srcdir = @srcdir@ 7 top_srcdir = @top_srcdir@8 7 VPATH = @srcdir@ 9 RTEMS_ROOT = @ RTEMS_ROOT@8 RTEMS_ROOT = @top_srcdir@ 10 9 PROJECT_ROOT = @PROJECT_ROOT@ 11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg12 10 13 11 PGM=${ARCH}/tod.rel … … 23 21 OBJS=$(C_O_FILES) 24 22 25 include $(RTEMS_ CUSTOM)26 include $( PROJECT_ROOT)/make/leaf.cfg23 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg 24 include $(RTEMS_ROOT)/make/leaf.cfg 27 25 28 26 # First and second generation use different RTC chips :( -
c/src/lib/libbsp/powerpc/dmv177/tod/tod.c
ra38b9f8 rdc104a4 26 26 void ICM7170_GetTOD( 27 27 volatile unsigned char *imc1770_regs, 28 rtems_unsigned8 icm1770_freq,28 rtems_unsigned8 icm1770_freq, 29 29 rtems_time_of_day *rtc_tod 30 30 ); 31 31 void ICM7170_SetTOD( 32 32 volatile unsigned char *imc1770_regs, 33 rtems_unsigned8 icm1770_freq,33 rtems_unsigned8 icm1770_freq, 34 34 rtems_time_of_day *rtc_tod 35 35 ); … … 244 244 ) 245 245 { 246 int ticks;247 246 int year; 248 247 … … 274 273 } 275 274 276 277 278 279 280 281 282 -
c/src/lib/libbsp/powerpc/dmv177/wrapup/Makefile.in
ra38b9f8 rdc104a4 5 5 @SET_MAKE@ 6 6 srcdir = @srcdir@ 7 top_srcdir = @top_srcdir@8 7 VPATH = @srcdir@ 9 RTEMS_ROOT = @ RTEMS_ROOT@8 RTEMS_ROOT = @top_srcdir@ 10 9 PROJECT_ROOT = @PROJECT_ROOT@ 11 RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg12 10 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 12 KA9Q_DRIVER_yes_V = network 13 KA9Q_DRIVER = $(KA9Q_DRIVER_$(HAS_KA9Q)_V) 14 15 # pieces specific to this BSP 16 BSP_PIECES=startup clock console timer tod $(KA9Q_DRIVER) 17 15 18 # pieces to pick up out of libcpu/$(RTEMS_CPU) 16 19 CPU_PIECES= 20 21 # shared pieces 17 22 GENERIC_PIECES= 18 23 … … 25 30 LIB=$(ARCH)/libbsp.a 26 31 27 include $(RTEMS_ CUSTOM)28 include $( PROJECT_ROOT)/make/lib.cfg32 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg 33 include $(RTEMS_ROOT)/make/lib.cfg 29 34 30 35 # -
make/custom/dmv177.cfg
ra38b9f8 rdc104a4 9 9 # 10 10 11 include $( PROJECT_ROOT)/make/custom/default.cfg11 include $(RTEMS_ROOT)/make/custom/default.cfg 12 12 13 RTEMS_CPU=p pc13 RTEMS_CPU=powerpc 14 14 RTEMS_CPU_MODEL=ppc603e 15 15 16 16 # This is the actual bsp directory used during the build process. 17 18 RTEMS_BSP_FAMILY=dmv170 19 20 RTEMS_BSP=dmv170 17 RTEMS_BSP_FAMILY=dmv177 21 18 22 19 # This section makes the target dependent options file. … … 28 25 # RTEMS_TEST_NO_PAUSE (RTEMS tests) 29 26 # 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 usage36 # per task is printed when the program exits.37 27 # 38 28 # RTEMS_DEBUG (RTEMS) … … 57 47 # ELF is the only one supported. 58 48 # 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. 60 54 61 55 … … 63 57 @echo "/* #define NDEBUG 1 */ " >>$@ 64 58 @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ 65 @echo "/* #define STACK_CHECKER_ON 1 */" >>$@66 @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@67 59 @echo "/* #define RTEMS_DEBUG 1 */" >>$@ 68 60 @echo "#define CONSOLE_USE_INTERRUPTS 0" >>$@ … … 71 63 @echo "#define PPC_ABI PPC_ABI_EABI" >>$@ 72 64 @echo "#define PPC_ASM PPC_ASM_ELF" >>$@ 65 @echo "#define PPC_USE_SPRG 1" >>$@ 73 66 endef 74 67 … … 82 75 # NOTE: some level of -O may be actually required by inline assembler 83 76 CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions 77 78 # Define this to yes if this target supports multiprocessor environments. 79 HAS_MP=no 80 81 # XXX temporary 82 # This target does not support the ka9q tcp/ip stack so ignore requests 83 # to enable it. 84 HAS_KA9Q=no 84 85 85 86 # The following is a linkcmds file which will work without using the … … 109 110 START_BASE= 110 111 111 112 # Let the HWAPI know which set of drivers to build 112 113 DRIVER_ARCHITECTURE=vmebus
Note: See TracChangeset
for help on using the changeset viewer.