Changeset b8c9883 in rtems for c/src/lib/libbsp/m68k/efi332


Ignore:
Timestamp:
Jan 13, 2000, 8:45:07 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
4c3ab846
Parents:
11944b9b
Message:

All m68k BSPs now build with new ELF style linkcmds.

Location:
c/src/lib/libbsp/m68k/efi332/startup
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/efi332/startup/Makefile.in

    r11944b9b rb8c9883  
    1717
    1818# C source names, if any, go here -- minus the .c
    19 C_PIECES = bsplibc bsppost bspstart bspclean bootcard main sbrk setvec \
    20     gnatinstallhandler
     19C_PIECES = bsplibc bsppost bspstart bspclean bootcard m68kpretaskinghook \
     20    main sbrk setvec gnatinstallhandler
    2121C_FILES = $(C_PIECES:%=%.c)
    2222C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/efi332/startup/bspstart.c

    r11944b9b rb8c9883  
    3939void bsp_postdriver_hook(void);
    4040void bsp_libc_init( void *, unsigned32, int );
    41 
    42 /*
    43  *  Function:   bsp_pretasking_hook
    44  *  Created:    95/03/10
    45  *
    46  *  Description:
    47  *      BSP pretasking hook.  Called just before drivers are initialized.
    48  *      Used to setup libc and install any BSP extensions.
    49  *
    50  *  NOTES:
    51  *      Must not use libc (to do io) from here, since drivers are
    52  *      not yet initialized.
    53  *
    54  */
    55  
    56 void bsp_pretasking_hook(void)
    57 {
    58 /*   extern int end; */
    59   rtems_unsigned32        heap_start;
    60  
    61   heap_start = (rtems_unsigned32) BSP_Configuration.work_space_start +
    62                (rtems_unsigned32) BSP_Configuration.work_space_size;
    63   if (heap_start & (CPU_ALIGNMENT-1))
    64     heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    65  
    66   if (heap_start > (rtems_unsigned32) RAM_END) {
    67     /* rtems_fatal_error_occurred can not be used before initalization */
    68     RAW_PUTS("\n\rRTEMS: Out of memory.\n\r");
    69     RAW_PUTS("RTEMS:    Check RAM_END and the size of the work space.\n\r");
    70   }
    71 
    72   bsp_libc_init((void *) heap_start, (RAM_END - heap_start), 0);
    73  
    74 #ifdef RTEMS_DEBUG
    75     rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
    76 #endif
    77 }
     41void bsp_pretasking_hook(void);               /* m68k version */
    7842 
    7943/*
     
    8650{
    8751  void           *vbr;
    88   extern        unsigned int _WorkspaceBase;
     52  extern void    *_WorkspaceBase;
    8953
    9054  /*
     
    9862  Cpu_table.interrupt_vector_table = vbr;
    9963
    100   BSP_Configuration.work_space_start = (void *)
    101     (((unsigned int)_WorkspaceBase + STACK_SIZE + 0x100) & 0xffffff00);
    102 
    103 #if 0
    104     (((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
    105 #endif
     64  BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
    10665
    10766  /* Clock_exit is done as an atexit() function */
  • c/src/lib/libbsp/m68k/efi332/startup/linkcmds

    r11944b9b rb8c9883  
    3434 * Declare some sizes.
    3535 */
    36 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
    37 StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
     36_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
     37_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
    3838
    3939MEMORY
     
    4141  ram     : ORIGIN = 0x80000, LENGTH = 512K
    4242}
     43
     44_RamBase = 0x80000;
     45_RamSize = 0x80000;
    4346
    4447__end_of_ram = 0x100000;
     
    136139        } >ram
    137140        .bss : {
    138                 PROVIDE (_clear_start = .);
     141                _clear_start = .;
    139142                *(.bss)
    140143                *(COMMON)
     
    142145                PROVIDE (end = .);
    143146
    144                 . += StackSize;
    145                 PROVIDE (_stack_init = .);
     147                . += _StackSize;
     148                . = ALIGN (16);
     149                _stack_init = .;
     150                _clear_end = .;
    146151
    147                 . = ALIGN (16);
    148                 PROVIDE (_HeapStart = .);
    149                 . += HeapSize;
    150                 PROVIDE (_HeapEnd = .);
    151 
    152                 PROVIDE (_clear_end = .);
    153 
    154                 PROVIDE (_WorkspaceBase = .);
     152                _WorkspaceBase = .;
    155153        } >ram
    156154}
Note: See TracChangeset for help on using the changeset viewer.