Ignore:
Timestamp:
Sep 14, 2008, 9:52:48 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
6f4aa47
Parents:
e95cf8c9
Message:

2008-09-14 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, configure.ac, startup/bspstart.c: Create bsp_get_work_area() into its own file and use BSP Framework to perform more initialization.
  • startup/bspgetworkarea.c: New file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/mips/rbtx4938/startup/bspstart.c

    re95cf8c9 ra444be6  
    1919#include <bsp.h>
    2020#include <rtems/libio.h>
    21 #include <rtems/libcsupport.h>
    2221
    23 #define LIBC_HEAP_SIZE (64 * 1024)
    24 
    25 extern int end; /* defined by linker */
    26 
    27 /*
    28  *  Use the shared implementations of the following routines
    29  */
    30  
    31 void bsp_libc_init( void *, uint32_t, int );
    32 
    33 void init_exc_vecs(void);
    34 
    35 /*
    36  *  Function:   bsp_pretasking_hook
    37  *  Created:    95/03/10
    38  *
    39  *  Description:
    40  *      BSP pretasking hook.  Called just before drivers are initialized.
    41  *      Used to setup libc and install any BSP extensions.
    42  *
    43  *  NOTES:
    44  *      Must not use libc (to do io) from here, since drivers are
    45  *      not yet initialized.
    46  *
    47  */
    48  
    49 void bsp_pretasking_hook(void)
    50 {
    51     uint32_t heap_start;
    52 
    53     heap_start = (uint32_t) &end;
    54     if (heap_start & (CPU_ALIGNMENT-1))
    55         heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
    56 
    57     bsp_libc_init((void *) heap_start, LIBC_HEAP_SIZE, 0);
    58 }
    59  
    6022/*
    6123 *  bsp_start
     
    6628void bsp_start( void )
    6729{
    68   extern int WorkspaceBase;
    6930  extern void mips_install_isr_entries(void);
    70 
    71   Configuration.work_space_start =
    72        (void *)((uint64_t)((&end) + LIBC_HEAP_SIZE + 0x100) & ~0x7);
    7331
    7432  mips_install_isr_entries();  /* Install generic MIPS exception handler */
    7533}
    76 
Note: See TracChangeset for help on using the changeset viewer.