forked from Imagelibrary/rtems
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, include/bsp.h, startup/bspstart.c: Use PowerPC level shared bsp_get_work_area() implementation. * startup/bspgetworkarea.c: Removed.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, include/bsp.h, startup/bspstart.c: Use PowerPC level
|
||||
shared bsp_get_work_area() implementation.
|
||||
* startup/bspgetworkarea.c: Removed.
|
||||
|
||||
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* startup/bspstart.c: Remove unnecessary includes of
|
||||
|
||||
@@ -25,7 +25,7 @@ dist_project_lib_DATA += startup/linkcmds
|
||||
|
||||
startup_SOURCES = startup/bspstart.c ../../shared/bootcard.c \
|
||||
../../shared/bsppost.c ../../shared/bsppredriverhook.c \
|
||||
startup/bspgetworkarea.c ../../shared/bsplibc.c \
|
||||
../../powerpc/shared/startup/bspgetworkarea.c ../../shared/bsplibc.c \
|
||||
../../powerpc/shared/startup/sbrk.c \
|
||||
../../shared/bspclean.c ../../shared/gnatinstallhandler.c \
|
||||
../../powerpc/shared/startup/pgtbl_setup.c \
|
||||
|
||||
@@ -202,11 +202,6 @@ void BSP_FLASH_set_page( uint8_t page );
|
||||
#define BSP_FLASH_DISABLE_WRITES(_area) BSP_FLASH_Disable_writes( _area )
|
||||
#define BSP_FLASH_SET_PAGE(_page) BSP_FLASH_set_page( _page )
|
||||
|
||||
/*
|
||||
* system init stack
|
||||
*/
|
||||
#define BSP_INIT_STACK_SIZE 0x1000
|
||||
|
||||
/* clear hostbridge errors
|
||||
*
|
||||
* enableMCP: whether to enable MCP checkstop / machine check interrupts
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/bootcard.h>
|
||||
#include <stdint.h>
|
||||
|
||||
extern void *RAM_END;
|
||||
extern void *__rtems_end;
|
||||
extern uint32_t _bsp_sbrk_init(uint32_t, uint32_t*);
|
||||
|
||||
unsigned int BSP_mem_size = (unsigned int)&RAM_END;
|
||||
|
||||
/*
|
||||
* This method returns the base address and size of the area which
|
||||
* is to be allocated between the RTEMS Workspace and the C Program
|
||||
* Heap.
|
||||
*/
|
||||
void bsp_get_work_area(
|
||||
void **work_area_start,
|
||||
size_t *work_area_size,
|
||||
void **heap_start,
|
||||
size_t *heap_size
|
||||
)
|
||||
{
|
||||
uintptr_t size;
|
||||
uintptr_t reserve;
|
||||
|
||||
reserve = (uintptr_t)BSP_INIT_STACK_SIZE;
|
||||
reserve += rtems_configuration_get_interrupt_stack_size();
|
||||
size = (uintptr_t)&RAM_END - (uintptr_t)&__rtems_end + reserve;
|
||||
|
||||
*work_area_start = (void *)(&__rtems_end + reserve);
|
||||
*work_area_size = size;
|
||||
_bsp_sbrk_init( *work_area_start, work_area_size );
|
||||
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
||||
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,9 @@ SPR_RW(SPRG1)
|
||||
|
||||
uint8_t LightIdx = 0;
|
||||
|
||||
extern int RAM_END;
|
||||
unsigned int BSP_mem_size = (unsigned int)&RAM_END;
|
||||
|
||||
void BSP_Increment_Light(void){
|
||||
uint8_t data;
|
||||
data = *GENERAL_REGISTER1;
|
||||
@@ -272,7 +275,6 @@ void Read_ep1a_config_registers( ppc_cpu_id_t myCpu ) {
|
||||
|
||||
void bsp_start( void )
|
||||
{
|
||||
unsigned char *stack;
|
||||
uint32_t intrStackStart;
|
||||
uint32_t intrStackSize;
|
||||
ppc_cpu_id_t myCpu;
|
||||
@@ -308,21 +310,10 @@ ShowBATS();
|
||||
L1_caches_enables();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* the initial stack has aready been set to this value in start.S
|
||||
* so there is no need to set it in r1 again... It is just for info
|
||||
* so that It can be printed without accessing R1.
|
||||
*/
|
||||
stack = ((unsigned char*) __rtems_end) + BSP_INIT_STACK_SIZE
|
||||
- PPC_MINIMUM_STACK_FRAME_SIZE;
|
||||
|
||||
/* tag the bottom (T. Straumann 6/36/2001 <strauman@slac.stanford.edu>) */
|
||||
*((uint32_t *)stack) = 0;
|
||||
|
||||
/*
|
||||
* Initialize the interrupt related settings.
|
||||
*/
|
||||
intrStackStart = (uint32_t) __rtems_end + BSP_INIT_STACK_SIZE;
|
||||
intrStackStart = (uint32_t) __rtems_end;
|
||||
intrStackSize = rtems_configuration_get_interrupt_stack_size();
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user