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/efi68k/startup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c

    rc43b34c r6335022e  
    2121 */
    2222
    23 #include <stdlib.h>
    2423#include <bsp.h>
    2524#include <rtems/libio.h>
     
    4746rtems_unsigned32 Timer_interrupts;
    4847
    49 /* extern void set_debug_traps(void); */
    50 /* extern void breakpoint(void); */
     48extern void set_debug_traps(void);
     49extern void breakpoint(void);
    5150
    5251/*      Initialize whatever libc we are using
     
    5655void bsp_libc_init()
    5756{
    58   extern int end;
     57/*   extern int end; */
    5958  rtems_unsigned32        heap_start;
    6059 
    61   heap_start = (rtems_unsigned32) &end;
     60  heap_start = (rtems_unsigned32) BSP_Configuration.work_space_start +
     61               (rtems_unsigned32) BSP_Configuration.work_space_size;
    6262  if (heap_start & (CPU_ALIGNMENT-1))
    6363    heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    6464 
    65   RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
     65  if (heap_start > RAM_END) {
     66    /* rtems_fatal_error_occurred can not be used before initalization */
     67    RAW_PUTS("\n\rRTEMS: Out of memory.\n\r");
     68    RAW_PUTS("RTEMS:    Check RAM_END and the size of the work space.\n\r");
     69  }
     70
     71  RTEMS_Malloc_Initialize((void *) heap_start,
     72                          (RAM_END - heap_start), 0);
    6673   
    6774  /*
     
    8188  else
    8289    libc_init(0);                /* non-reentrant */
    83  
    8490}
    8591 
     
    162168   */
    163169
    164   Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     170  Cpu_table.pretasking_hook = bsp_pretasking_hook;
    165171 
    166172  Cpu_table.predriver_hook = NULL;
     
    175181  Cpu_table.interrupt_vector_table = vbr;
    176182
    177   Cpu_table.interrupt_stack_size = 4096;
     183  Cpu_table.interrupt_stack_size = 0;
    178184
    179185  Cpu_table.extra_mpci_receive_server_stack = 0;
     
    186192
    187193  BSP_Configuration.work_space_start = (void *)
    188      (RAM_END - BSP_Configuration.work_space_size);
    189 
    190   if ((unsigned int)BSP_Configuration.work_space_start <
    191       (unsigned int)((stack_start + stack_size) & 0xffffffc0) ) {
    192     /* rtems_fatal_error_occurred can not be used before initalization */
    193     RAW_PUTS("\n\rRTEMS: Out of memory.\n\r");
    194     RAW_PUTS("RTEMS:    Check RAM_END and the size of the work space.\n\r");
    195     goto exit;
    196   }
     194    (((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
    197195
    198196  /*
     
    218216#endif
    219217
     218  /*
     219   * Tell libio how many fd's we want and allow it to tweak config
     220   */
     221
     222  rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
     223
    220224  rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    221225  /* does not return */
     
    223227  /* Clock_exit is done as an atexit() function */
    224228
    225 exit:
     229/* exit: */
    226230  /* configure peripherals for safe exit */
    227231  bsp_cleanup();
  • c/src/lib/libbsp/m68k/efi68k/startup/linkcmds

    rc43b34c r6335022e  
    4444
    4545_VBR = 0x200000;                /* location of the VBR table (in RAM) */
     46__end_of_ram = 0x240000;
    4647_copy_data_from_rom = 0;
    4748
Note: See TracChangeset for help on using the changeset viewer.