Changeset 6335022e in rtems for c/src/lib/libbsp/m68k/efi332


Ignore:
Timestamp:
Mar 11, 1997, 3:42:59 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
d0e126a6
Parents:
c43b34c
Message:

updates from John Gwynne

Location:
c/src/lib/libbsp/m68k/efi332
Files:
5 added
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/efi332/README

    rc43b34c r6335022e  
    1313"diy_efi" mailing list). Although efi332 was initially designed for
    1414automotive research, it is a fairly generalized embedded controller
    15 when used without the companion EFI board. It is patterned much after
     15when used without the companion EFI I/O board. It is patterned much after
    1616the the Motorola BCC but cost on the order of $250US. A 4x3 inch
    17 (approx.) printed circuit board is available. For complete
     17(approx.) printed circuit board is available (about $14US). For complete
    1818information see
    1919
    20         http://www.cim.swin.edu.au/wwwhome/aden/efi332/332_index.html
    21 
     20        http://efi332.eng.ohio-state.edu
    2221TODO:
    2322=====
    24 - add separate interrupt stack (low priority).
    25 
     23- integrate the interrupt driven stdin/stdout into RTEMS to (a) reduce
     24  the interrupt priority and (2) to prevent it from blocking. (high
     25  priority)
    2626- add a timer driver for the tmtest set.
    27 
    28 - generate include/coverhd.c to preform the tmtest.
    29 
    30 - the interrupt drive I/O should be integrated into the RTEMS.
    31 
    32 - finish the ROM memory model.
    33 
     27- generate include/coverhd.c to perform the tmtest.
     28- add separate interrupt stack (low priority... may never happen :).
    3429
    3530                                       John S Gwynne
     
    4035                Telephone: (614) 292-7981 * Fax: (614) 292-7297
    4136-------------------------------------------------------------------------------
    42 
  • c/src/lib/libbsp/m68k/efi332/bsp_specs

    rc43b34c r6335022e  
    55startfile: replace
    66mrtems:
    7 pg: start.o%s
     7pg: start332.o%s
    88{!pg:
    9 g: start.o%s
     9g: start332.o%s
    1010{!g:
    11 p: start.o%s
    12 !p: start.o%s
     11p: start332.o%s
     12!p: start332.o%s
    1313}}
    1414{!mrtems:
  • c/src/lib/libbsp/m68k/efi332/console/console.c

    rc43b34c r6335022e  
    3737static volatile char _debug_flag = 0;
    3838
    39 #define SET_RTS(a) {*PORTF0 = (*PORTF0 & 0x4) | ( (a)? 0 : 0x4); }
     39#define SET_RTS(a) {*PORTF0 = (*PORTF0 & ~0x4) | ( (a)? 0 : 0x4); }
    4040#define GET_CTS (!(*PORTF0 & 0x2))
    4141
     
    235235 */
    236236 
     237void console_init()
     238{
     239  *QSMCR = ( SAM(QSM_IARB,0,IARB) );
     240  *QILR = ( SAM(ISRL_QSPI,4,ILQSPI) | SAM(ISRL_SCI,0,ILSCI) );
     241  *QIVR = ( SAM(EFI_QIVR,0,INTV) );
     242
     243  *SCCR0 = ( (int)( SYS_CLOCK/SCI_BAUD/32.0+0.5 ) & 0x1fff );
     244  *SCCR1 = ( RIE | TE | RE );
     245
     246  set_vector(_catchSPURIOUSint, EFI_SPINT, 0);
     247  set_vector(_catchSCIint, EFI_QIVR, 0);
     248  set_vector(_catchCTSint, EFI_INT1, 0);
     249}
     250
    237251rtems_device_driver console_initialize(
    238252  rtems_device_major_number  major,
     
    242256{
    243257  rtems_status_code status;
    244  
    245   *QSMCR = ( SAM(QSM_IARB,0,IARB) );
    246   *QILR = ( SAM(ISRL_QSPI,4,ILQSPI) | SAM(ISRL_SCI,0,ILSCI) );
    247   *QIVR = ( SAM(EFI_QIVR,0,INTV) );
    248 
    249   *SCCR0 = ( (int)( SYS_CLOCK/SCI_BAUD/32.0+0.5 ) & 0x1fff );
    250   *SCCR1 = ( RIE | TE | RE );
    251 
    252   set_vector(_catchSPURIOUSint, EFI_SPINT, 0);
    253   set_vector(_catchSCIint, EFI_QIVR, 0);
    254   set_vector(_catchCTSint, EFI_INT1, 0);
     258
    255259  status = rtems_io_register_name(
    256260    "/dev/console",
  • c/src/lib/libbsp/m68k/efi332/include/bsp.h

    rc43b34c r6335022e  
    7272  }
    7373
     74/* externals */
     75
     76extern char _endtext[];
     77extern char _sdata[];
     78extern char _edata[];
     79extern char __bss_start[];
     80extern char _end[];
     81extern char _copy_data_from_rom[];
     82extern char __end_of_ram[];
     83
     84/* constants */
     85
     86#define RAM_END ((int)__end_of_ram)
     87
     88#ifdef __START_C__
     89#define STACK_SIZE "#0x800"
     90#else
     91#define STACK_SIZE 0x800
     92#endif
     93
    7494/* macros */
    75 
    76 #define RAM_START 0x80000
    77 #define RAM_END   0xc0000
    7895
    7996#define RAW_PUTS(str) \
  • c/src/lib/libbsp/m68k/efi332/include/efi332.h

    rc43b34c r6335022e  
    3737#define EFI_Y 0x38
    3838#define SYS_CLOCK (XTAL*4.0*(EFI_Y+1)*(1 << (2*EFI_W+EFI_X)))
    39 #define SCI_BAUD 19200          /* RS232 Baud Rate */
     39#define SCI_BAUD 115200         /* RS232 Baud Rate */
    4040
    4141
    4242/* macros/functions */
    43 #if 0
    44 static void reboot(void) __attribute__ ((noreturn));
    45 __inline__ static void reboot() {asm("trap #15");}
    46 #else
    47 #define reboot() do {asm("trap #15");} while(0)
    48 #endif
     43void reboot(void) __attribute__ ((noreturn));
    4944
    5045#endif /* _EFI332_H_ */
  • c/src/lib/libbsp/m68k/efi332/spurious/spinit.c

    rc43b34c r6335022e  
    7474  bsp_cleanup();
    7575
     76  /* BDM SIGEMT */
     77  asm("  .word  0x4afa");
     78
    7679  for(;;);
    7780}
  • c/src/lib/libbsp/m68k/efi332/startup/bspstart.c

    rc43b34c r6335022e  
    5050void bsp_libc_init()
    5151{
    52   extern int end;
     52/*   extern int end; */
    5353  rtems_unsigned32        heap_start;
    5454 
    55   heap_start = (rtems_unsigned32) &end;
     55  heap_start = (rtems_unsigned32) BSP_Configuration.work_space_start +
     56               (rtems_unsigned32) BSP_Configuration.work_space_size;
    5657  if (heap_start & (CPU_ALIGNMENT-1))
    5758    heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    5859 
    59   RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
     60  if (heap_start > RAM_END) {
     61    /* rtems_fatal_error_occurred can not be used before initalization */
     62    RAW_PUTS("\n\rRTEMS: Out of memory.\n\r");
     63    RAW_PUTS("RTEMS:    Check RAM_END and the size of the work space.\n\r");
     64  }
     65
     66  RTEMS_Malloc_Initialize((void *) heap_start,
     67                          (RAM_END - heap_start), 0);
    6068   
    6169  /*
     
    165173  Cpu_table.interrupt_vector_table = vbr;
    166174
    167   Cpu_table.interrupt_stack_size = 4096;
     175  Cpu_table.interrupt_stack_size = 0;
    168176
    169177  Cpu_table.extra_mpci_receive_server_stack = 0;
     
    176184
    177185  BSP_Configuration.work_space_start = (void *)
    178      (RAM_END - BSP_Configuration.work_space_size);
    179 
    180   if ((unsigned int)BSP_Configuration.work_space_start <
    181       (unsigned int)((stack_start + stack_size) & 0xffffffc0) ) {
    182     /* rtems_fatal_error_occurred can not be used before initalization */
    183     RAW_PUTS("\n\rRTEMS: Out of memory.\n\r");
    184     RAW_PUTS("RTEMS:    Check RAM_END and the size of the work space.\n\r");
    185     goto exit;
    186   }
     186    (((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
    187187
    188188  /*
     
    208208#endif
    209209
     210  /*
     211   * Tell libio how many fd's we want and allow it to tweak config
     212   */
     213
     214  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
     215
    210216  rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    211217  /* does not return */
     
    213219  /* Clock_exit is done as an atexit() function */
    214220
    215 exit:
    216221  /* configure peripherals for safe exit */
    217222  bsp_cleanup();
  • c/src/lib/libbsp/m68k/efi332/startup/linkcmds

    rc43b34c r6335022e  
    3636}
    3737
     38__end_of_ram = 0xc0000;
    3839_copy_data_from_rom = 0;
    3940
Note: See TracChangeset for help on using the changeset viewer.