mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-16 04:18:59 +00:00
2008-09-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* bspgetworkarea.c: Augment to optionally know U-Boot.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2008-09-20 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* bspgetworkarea.c: Augment to optionally know U-Boot.
|
||||||
|
|
||||||
2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* bootcard.c: Perform bsp_start() before bsp_get_work_area().
|
* bootcard.c: Perform bsp_start() before bsp_get_work_area().
|
||||||
|
|||||||
@@ -19,10 +19,18 @@
|
|||||||
/*
|
/*
|
||||||
* These are provided by the linkcmds for ALL of the BSPs which use this file.
|
* These are provided by the linkcmds for ALL of the BSPs which use this file.
|
||||||
*/
|
*/
|
||||||
extern char RamBase[];
|
|
||||||
extern char WorkAreaBase[];
|
extern char WorkAreaBase[];
|
||||||
extern char HeapSize[];
|
extern char HeapSize[];
|
||||||
extern char RamSize[];
|
|
||||||
|
/*
|
||||||
|
* We may get the size information from U-Boot or the linker scripts.
|
||||||
|
*/
|
||||||
|
#ifdef HAS_UBOOT
|
||||||
|
extern bd_t bsp_uboot_board_info;
|
||||||
|
#else
|
||||||
|
extern char RamBase[];
|
||||||
|
extern char RamSize[];
|
||||||
|
#endif /* HAS_UBOOT */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This method returns the base address and size of the area which
|
* This method returns the base address and size of the area which
|
||||||
@@ -36,9 +44,17 @@ void bsp_get_work_area(
|
|||||||
size_t *heap_size
|
size_t *heap_size
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
uintptr_t ram_end;
|
||||||
|
|
||||||
|
#ifdef HAS_UBOOT
|
||||||
|
ram_end = (uintptr_t) bsp_uboot_board_info.bi_memstart +
|
||||||
|
bsp_uboot_board_info.bi_memsize;
|
||||||
|
#else
|
||||||
|
ram_end = RamBase + (uintptr_t)RamSize;
|
||||||
|
#endif
|
||||||
|
|
||||||
*work_area_start = WorkAreaBase;
|
*work_area_start = WorkAreaBase;
|
||||||
*work_area_size = (uintptr_t) RamBase + (uintptr_t) RamSize -
|
*work_area_size = ram_end = (uintptr_t) WorkAreaBase;
|
||||||
(uintptr_t) WorkAreaBase;
|
|
||||||
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
|
||||||
*heap_size = (size_t) HeapSize;
|
*heap_size = (size_t) HeapSize;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user