void bsp_work_area_initialize(void) { void *area_start = (void *)&_end; uintptr_t area_size = (uintptr_t)&__heap_limit - (uintptr_t)&_end; bsp_work_area_initialize_default( area_start, area_size ); }
void bsp_work_area_initialize(void) { uintptr_t work_base = (uintptr_t) WorkAreaBase; uintptr_t ram_end; bcm2835_get_vc_memory_entries vc_entry; /* * bcm2835_get_arm_memory_entries arm_entry; * is another alternative how to obtain usable memory size */ #ifdef USE_UBOOT ram_end = (uintptr_t) bsp_uboot_board_info.bi_memstart + bsp_uboot_board_info.bi_memsize; #else ram_end = (uintptr_t)RamBase + (uintptr_t)RamSize; #endif #ifdef BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN work_base += rtems_configuration_get_interrupt_stack_size(); #endif memset( &vc_entry, 0, sizeof(vc_entry) ); bcm2835_mailbox_get_vc_memory( &vc_entry ); if (vc_entry.base != 0) ram_end = ram_end > vc_entry.base? vc_entry.base: ram_end; bsp_work_area_initialize_default( (void *) work_base, ram_end - work_base ); }
void bsp_work_area_initialize(void) { char *ram_end = (char *) (TQM_BD_INFO.sdram_size - (uint32_t)TopRamReserved); void *area_start = bsp_work_area_start; uintptr_t area_size = (uintptr_t) ram_end - (uintptr_t) bsp_work_area_start; bsp_work_area_initialize_default( area_start, area_size ); }
void bsp_work_area_initialize(void) { uintptr_t work_size; uintptr_t work_area; work_area = (uintptr_t)&__rtems_end + rtems_configuration_get_interrupt_stack_size(); work_size = (uintptr_t)BSP_mem_size - work_area; bsp_work_area_initialize_default((void *) work_area, work_size); }
void bsp_work_area_initialize(void) { uintptr_t work_base = (uintptr_t) WorkAreaBase; uintptr_t ram_end; #ifdef USE_UBOOT ram_end = (uintptr_t) bsp_uboot_board_info.bi_memstart + bsp_uboot_board_info.bi_memsize; #else ram_end = (uintptr_t)RamBase + (uintptr_t)RamSize; #endif #ifdef BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN work_base += rtems_configuration_get_interrupt_stack_size(); #endif bsp_work_area_initialize_default( (void *) work_base, ram_end - work_base ); }
/* * 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_work_area_initialize(void) { /* must be identical to STACK_SIZE in start.S */ #define STACK_SIZE (16 * 1024) /* Early dynamic memory allocator is placed just above _end */ void *work_area_start = (void *)&end; uintptr_t work_area_size = (uintptr_t)rdb_start - (uintptr_t)&end - STACK_SIZE; /* * The following may be helpful in debugging what goes wrong when * you are allocating the Work Area in a new BSP. */ #ifdef BSP_GET_WORK_AREA_DEBUG { void *sp = __builtin_frame_address(0); void *end = *work_area_start + *work_area_size; printk( "work_area_start = 0x%p\n" "work_area_size = %d 0x%08x\n" "end = 0x%p\n" "current stack pointer = 0x%p%s\n", work_area_start, work_area_size, /* decimal */ work_area_size, /* hexadecimal */ end, sp, ((sp >= *work_area_start && sp <= end) ? " OVERLAPS!" : "") ); printk( "rdb_start = 0x%08x\n", rdb_start ); } #endif bsp_work_area_initialize_default(work_area_start, work_area_size); }