Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Execution after reset starts at 0xfffffffc
    • A branch instruction (either b or ba; 26 bit range) to some boot code is loaded here
      • The Xilinx example branches to in block RAM (bram) at 0xffffff00
      • The RTEMS example branches to download_entry (but I'm not sure how)
    • Potentially a sc (system call) instruction could be loaded here? Any advantage to this?
      • Probably not as the corresponding ivor register (PPC 440) is not loaded yet
      • The PPC 405 doesn't have ivor registers, so it would continue executing at the system call vector

dlEntry.s

This file is considered part of an RTEMS BSP and can be found in $RTEMS_ROOT/src/c/src/lib/libbsp/powerpc/virtex5/dlentry}}. What's written here is written for the PPC 440 found in Xilinx Virtex 5 parts. The Virtex 4 version is similar.

...

  • Command line is in the first and only argument
    • In our system this is always a null pointer
  • Disable interrupts
  • Store command line
  • Call bsp_start()
  • Determine RTEMS work area and heap location and size
  • Initialize RTEMS data structures
  • Initialize the C library
    • This also installs the heap
  • Call bsp_pretasking_hook()
  • Wiki Markup
    \[Enable RTEMS debugging capabilities\]
  • RTEMS initialization before loading device drivers
  • Call bsp_predriver_hook()
  • Initialize device drivers
  • Call bsp_postdriver_hook()
  • Start multitasking
    • Thread with entry point Init runs
    • Not clear how this returns. Perhaps when the last task is deleted?
  • Call bsp_cleanup()
  • Return to start code
    • Not clear what's in the lr at this point, i.e., where do we return to?

RTEMS BSP

This constitutes our contributions to RTEMS. The code here sets up the processor and board for generic use. Files related to it can be found in $RTEMS_ROOT/src/c/src/lib/libbsp/powerpc/virtex5/...}}.

The functions prefixed with app_ are supplied by the RTEMS application, i.e., the RCE project, in our case.

  • bsp_start()
    • Set up default character output function
    • Get CPU type and revision cached
    • Initialize device driver parameters
      • Rate of timer source for clock.c
      • bsp_timer_internal_clock (question)
      • bsp_timer_average_overhead (question)
      • bsp_timer_least_valid (question)
    • Initialize default raw exception handlers
    • Call app_bsp_start()
  • bsp_pretasking_hook()
  • bsp_predriver_hook()
  • bsp_postdriver_hook()
  • bsp_cleanup()

RCE BSP

This is the portion of the BSP that is specific to the RCE project. It can be found in release/rce/init/src/Init.cc.

  • app_bsp_start()
    • This routine should set up the processor and board as needed for the task at hand, i.e., it is not generic.
    • Replace the character output function with one that writes to the syslog
  • app_bsp_pretasking_hook()
  • app_bsp_predriver_hook()
  • app_bsp_postdriver_hook()
  • app_bsp_cleanup()

...