From 37030e38c61c0d0a8b0742af75f115bda779c46d Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 9 Dec 2015 08:05:57 +0100 Subject: bsps: Call bsp_work_area_initialize() early Call bsp_work_area_initialize() before bsp_start(). This allows bsp_start() to use malloc() etc. which is beneficial for systems with a plug-and-play hardware enumeration. Update #2408. --- c/src/lib/libbsp/shared/bootcard.c | 8 ++++---- c/src/lib/libbsp/shared/include/bootcard.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'c/src/lib/libbsp/shared') diff --git a/c/src/lib/libbsp/shared/bootcard.c b/c/src/lib/libbsp/shared/bootcard.c index eeb5746fca..cbeb7b2686 100644 --- a/c/src/lib/libbsp/shared/bootcard.c +++ b/c/src/lib/libbsp/shared/bootcard.c @@ -75,14 +75,14 @@ void boot_card( bsp_boot_cmdline = cmdline; /* - * Invoke Board Support Package initialization routine written in C. + * Initialize the RTEMS Workspace and the C Program Heap. */ - bsp_start(); + bsp_work_area_initialize(); /* - * Initialize the RTEMS Workspace and the C Program Heap. + * Invoke Board Support Package initialization routine written in C. */ - bsp_work_area_initialize(); + bsp_start(); /* * Initialize RTEMS data structures diff --git a/c/src/lib/libbsp/shared/include/bootcard.h b/c/src/lib/libbsp/shared/include/bootcard.h index 93d5041cb4..7c0d3f154e 100644 --- a/c/src/lib/libbsp/shared/include/bootcard.h +++ b/c/src/lib/libbsp/shared/include/bootcard.h @@ -78,9 +78,9 @@ void bsp_reset(void); * * - disable interrupts, interrupts will be enabled during the first context * switch - * - bsp_start() - more advanced initialization * - bsp_work_area_initialize() - initialize the RTEMS Workspace and the C * Program Heap + * - bsp_start() - more advanced initialization * - rtems_initialize_data_structures() * - initialize C Library * - bsp_pretasking_hook() -- cgit v1.2.3