21 #ifndef LIBBSP_SHARED_BOOTCARD_H 22 #define LIBBSP_SHARED_BOOTCARD_H 26 #include <rtems/config.h> 74 #ifdef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK 86 ptrdiff_t bsp_sbrk_init(
Heap_Area *area, uintptr_t min_size);
89 static inline void bsp_work_area_initialize_default(
99 #if BSP_DIRTY_MEMORY == 1 100 memset(area.begin, 0xCF, area.size);
103 #ifdef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK 106 uintptr_t work_space_size = rtems_configuration_get_work_space_size();
107 ptrdiff_t sbrk_amount = bsp_sbrk_init(
111 + (rtems_configuration_get_unified_work_area() ? 0 : overhead)
114 rtems_heap_set_sbrk_amount(sbrk_amount);
122 #ifdef BSP_GET_WORK_AREA_DEBUG 124 void *
sp = __builtin_frame_address(0);
125 void *end = (
char *) area.begin + area.size;
127 "work_area_start = 0x%p\n" 128 "work_area_size = %lu 0x%08lx\n" 130 "current stack pointer = 0x%p%s\n",
132 (
unsigned long) area.size,
133 (
unsigned long) area.size,
136 (uintptr_t) sp >= (uintptr_t) area.begin
137 && (uintptr_t) sp <= (uintptr_t) end ?
145 #ifdef BSP_GET_WORK_AREA_DEBUG 147 "heap_start = 0x%p\n" 150 (
unsigned long) area.size
154 RTEMS_Malloc_Initialize(&area, 1,
NULL);
157 static inline void bsp_work_area_initialize_with_table(
163 RTEMS_Malloc_Initialize(areas, area_count,
_Heap_Extend);
166 void bsp_work_area_initialize(
void);
const char * bsp_boot_cmdline
Global pointer to the command line of boot_card().
Definition: bootcard.c:25
#define sp
stack-pointer */
Definition: regs.h:64
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Area_overhead(uintptr_t page_size)
Returns the worst case overhead to manage a memory area.
Definition: heap.h:359
Heap area structure for table based heap initialization and extension.
Definition: heap.h:275
void _Workspace_Handler_initialization(Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend)
Initilize workspace handler.
Definition: wkspace.c:155
Per CPU Core Structure.
Definition: percpu.h:290
Information Related to the RAM Workspace.
void bsp_start_on_secondary_processor(struct Per_CPU_Control *cpu_self)
Standard start routine for secondary processors.
Definition: bspsmp.c:85
#define RTEMS_NO_RETURN
Definition: basedefs.h:101
Interface to Kernel Print Methods.
void boot_card(const char *cmdline) RTEMS_NO_RETURN
Standard system initialization procedure.
Definition: bootcard.c:45
uintptr_t _Heap_Extend(Heap_Control *heap, void *area_begin, uintptr_t area_size, uintptr_t unused)
Extends the memory available for the heap heap using the memory area starting at area_begin of size a...
Definition: heapextend.c:119
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77
int printk(const char *fmt,...) RTEMS_PRINTFLIKE(1
Kernel Print.