This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Sequence of bring-up code on MBX860
- From: Barton Meeks <bartonm2002 at yahoo dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Thu, 18 Jul 2002 14:41:26 -0700 (PDT)
- Subject: [ECOS] Sequence of bring-up code on MBX860
To keep my head screwed on straight, I jotted down the
sequence of functions and files used to bring up the
MBX860, which is a PowerPC MPC860 board.
Hopefully this will be useful to someone else as well.
-----------------------------
Key Files:
packages/hal/powerpc/arch/current/src/vectors.S
packages/hal/powerpc/arch/current/include/varient.inc
packages/hal/powerpc/mbx/current/src/mbx.S
Boot sequence:
0xfe000100: Reset vector, jumps to _start
0xfe002000: _start is in vectors.S, which immediately
calls hal_cpu_init
0xfe002000: hal_cpu_init is defined in varient.inc
Disables caches and MMU
0xfe002064: continues in vectors.S.
Sets up global offset table
Sets time base register to 0.
bl hal_hardware_init
0xfe008610 hal_hardware_init, mbx.S
IMMB in IMMR set
data/instruction caches cleared, disabled
SIU init, bus monitor, REFA, REFB, RTC, SERC, ALR,
periodic timer
UPMS set up (optional, but done in my configuration)
Refresh prescale
Chip selects
CPU clock
mask SIU interrupts
decrementer set to max
enable timebase and decrementer
move return address to where ROM is
branches back to 0xfe002080, hal_hardware_init_done
0xfe002080: hal_hardware_init_done, vectors.S
(copying of the rom vectors is not done)
set up (interrupt?) stack
call hal_mon_init
0xfe00208c: hal_mon_init, varient.inc (first of 3
version for ROM startup)
copy rom vectors to ram
initialize VSR table
returns to vectors.S
0xfe002108: continuing in vectors.S, line 314
copy data (data section from linker?) from ROM to
RAM
clear out BSS, SBSS section
set up stack frame, ready to call C code
hal_varient_init (disables serialization)
hal_platform_init
hal_if_init (in cyg/hal/hal_if.h, is this part
of the compiler?)
hal_MMU_init
enable MMU
hal_enable_caches
hal_IRQ_init
cyg_hal_invoke_constructors
(optional) initialize_stub
(optional) hal_ctrlc_isr_init
cyg_start
__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss