...
Note |
---|
Bear in mind as well that this description applies to the Gen 1 design. |
Note | |
---|---|
|
Initial instruction
- Execution after reset starts at
0xfffffffc
- A branch instruction (either
b
orba
; 26 bit range) to some boot code is loaded here- The Xilinx example branches to in block RAM (
bram
) at0xffffff00
- The RTEMS example branches to
download_entry
(but I'm not sure how)
- The Xilinx example branches to in block RAM (
- 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
- Probably not as the corresponding
- A branch instruction (either
...
- 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()
\[Enable RTEMS debugging capabilities\]Wiki Markup - RTEMS initialization before loading device drivers
- Call
bsp_predriver_hook()
- Initialize device drivers
- Call
bsp_postdriver_hook()
- Start multitasking
- Before starting the first task call any C++ static constructors.
- Thread with entry point
Init
runs - Not clear how this returns. Perhaps when the last task is deleted?
- Call
bsp_cleanup()
- Return to the start code
- Not clear what's in the
lr
at this point, i.e., where do we return to?
- Not clear what's in the
...
- Announce what's running
- Configure the network from DHCP
- Set up the dynamic linkerunmigrated-wiki-markup
- \[Start the shell\]unmigrated-wiki-markup
- \[Start the debugger daemon ({{
gdb
}} stub)\] - Create a
Task
- Determine what the
Task
should run- Read metadata from flash
- Read the front panel rotary switch
- Dynamically link the code
- Run the
Task