forked from Imagelibrary/rtems
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* startup/bspgetworkarea.c, startup/linkcmds.base: Do some prep work in anticipation of gen5200 and gen83xx being able to shared bsp_get_work_area() implementation.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* startup/bspgetworkarea.c, startup/linkcmds.base: Do some prep work in
|
||||
anticipation of gen5200 and gen83xx being able to shared
|
||||
bsp_get_work_area() implementation.
|
||||
|
||||
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* clock/clock.c, startup/bspstart.c: Remove unnecessary includes of
|
||||
|
||||
@@ -10,6 +10,14 @@
|
||||
#include <bsp/bootcard.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/*
|
||||
* These are provided by the linkcmds for ALL of the BSPs which use this file.
|
||||
*/
|
||||
extern char RamBase[];
|
||||
extern char WorkAreaBase[];
|
||||
extern char HeapSize[];
|
||||
extern char RamSize[];
|
||||
|
||||
#if defined(HAS_UBOOT)
|
||||
extern bd_t *uboot_bdinfo_ptr;
|
||||
#endif
|
||||
@@ -31,12 +39,12 @@ void bsp_get_work_area(
|
||||
char *ram_end = (char *) uboot_bdinfo_ptr->bi_memstart +
|
||||
uboot_bdinfo_ptr->bi_memsize;
|
||||
#else /* HAS_UBOOT */
|
||||
char *ram_end = bsp_ram_end;
|
||||
char *ram_end = (uintptr_t)RamBase + (uintptr_t)RamSize;
|
||||
#endif /* HAS_UBOOT */
|
||||
|
||||
*work_area_start = bsp_work_area_start;
|
||||
*work_area_size = ram_end - bsp_work_area_start;
|
||||
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
||||
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
|
||||
*heap_size = HeapSize;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@ bsp_dpram_size = LENGTH (DPRAM);
|
||||
|
||||
bsp_section_align = 32;
|
||||
|
||||
RamBase = bsp_ram_start;
|
||||
RamSize = bsp_ram_size;
|
||||
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
|
||||
|
||||
SECTIONS {
|
||||
/*
|
||||
* BSP: MPC5200 registers
|
||||
@@ -268,6 +272,7 @@ SECTIONS {
|
||||
* BSP: Work area start
|
||||
*/
|
||||
bsp_work_area_start = .;
|
||||
WorkAreaBase = .;
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* startup/bspgetworkarea.c, startup/linkcmds.base: Do some prep work in
|
||||
anticipation of gen5200 and gen83xx being able to shared
|
||||
bsp_get_work_area() implementation.
|
||||
|
||||
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, startup/bspstart.c: Add use of bsp_get_work_area() in
|
||||
|
||||
@@ -23,6 +23,14 @@
|
||||
#include <bsp.h>
|
||||
#include <bsp/bootcard.h>
|
||||
|
||||
/*
|
||||
* These are provided by the linkcmds for ALL of the BSPs which use this file.
|
||||
*/
|
||||
extern char RamBase[];
|
||||
extern char WorkAreaBase[];
|
||||
extern char HeapSize[];
|
||||
extern char RamSize[];
|
||||
|
||||
#ifdef HAS_UBOOT
|
||||
extern bd_t mpc83xx_uboot_board_info;
|
||||
#endif /* HAS_UBOOT */
|
||||
@@ -37,11 +45,11 @@ void bsp_get_work_area(
|
||||
char *ram_end = (char *) mpc83xx_uboot_board_info.bi_memstart +
|
||||
mpc83xx_uboot_board_info.bi_memsize;
|
||||
#else /* HAS_UBOOT */
|
||||
char *ram_end = bsp_ram_end;
|
||||
char *ram_end = RamBase + (uintptr_t)RamSize;
|
||||
#endif /* HAS_UBOOT */
|
||||
|
||||
*work_area_start = bsp_work_area_start;
|
||||
*work_area_size = ram_end - bsp_work_area_start;
|
||||
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
||||
*heap_size = BSP_BOOTCARD_HEAP_SIZE_DEFAULT;
|
||||
*heap_size = HeapSize;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,10 @@ bsp_rom_size = LENGTH (ROM);
|
||||
|
||||
bsp_section_align = 32;
|
||||
|
||||
RamBase = bsp_ram_start;
|
||||
RamSize = bsp_ram_size;
|
||||
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
|
||||
|
||||
SECTIONS {
|
||||
/*
|
||||
* BSP: MPC83XX registers
|
||||
@@ -274,6 +278,7 @@ SECTIONS {
|
||||
* BSP: Work area start
|
||||
*/
|
||||
bsp_work_area_start = .;
|
||||
WorkAreaBase = .;
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
|
||||
Reference in New Issue
Block a user