BSP Framework Status and Next Step

Joel Sherrill joel.sherrill at OARcorp.com
Mon Sep 22 14:32:40 UTC 2008


Hi,

Those who have been watching CVS since the
4.9 branch was cut will have noticed that
every BSP has been modified to rely more
on the BSP Framework (focal point is bootcard.c)
for initialization.

In teaching the class, I have to explain the BSP
initialization sequence and the more uniform and
straightforward it is, the easier it is to explain
and understand.

Specifically, this refactoring and cleanup effort
has involved (so far):

+ Provide a bsp_get_work_area() implementation or
  requirements for a shared one and let boot_card()
  split memory between RTEMS Workspace and C
  Program Heap.

+ More standard symbols in linkcmds so code
  does not vary unnecessarily across BSPs.
  Standardized behavior of RamSize, RamBase,
  HeapSize, and WorkAreaBase.

+ Single place for C Library and Heap initialization.

+ Increased use of "shared" implementations
  of bsp_startup() and BSP initialization hooks.

BSP Framework now allows the application to
configure the system to have a "Unified Work
Area".  This means that you have the option for
a single VxWorks style work area for OS and
application objects or the split style RTEMS always
provided.  Both approaches are appropriate but
the selection can now be made based upon your
application requirements.

The next step is to focus on the path through
bsp_cleanup() and factor out common behavior.
Many BSPs (optionally) follow this sequence:

+ if enabled, print "shutdown message" and
  wait for user to press key to reset.
+ if enabled, just reset

The gen5200 and gen83xx BSPs already have the
logic in them to do what should be in the
common path and shared across all BSPs.

Another common sequence is for bsp_cleanup()
to enter a while(1) loop.

I would like to standardize two new-ish methods
and add the above as optional behavior to the
BSP Framework code to make it available on all
BSPs.  This code is already duplicated across
at least nearly all ARM BSPs, some PowerPC and
the pc386 so this would make things more standard.

+ bsp_reset() - Many BSPs already have this although
  the name varies.  Standardize name so boot_card()
  can optionally invoke it.

+ getchark() - getchar() alternative to printk() so
  boot_card can handle optional "press key to reset"

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list