Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1052429
  • 博文数量: 166
  • 博客积分: 10217
  • 博客等级: 上将
  • 技术积分: 2133
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-09 19:45
文章分类

全部博文(166)

文章存档

2012年(3)

2011年(7)

2010年(18)

2009年(59)

2008年(79)

我的朋友

分类: LINUX

2009-12-18 14:49:35

blob how to start the xscale pxa27x
step 1
.../src/blob/start.S  _start: b reset -->
.../src/blob/xlli/mainstone/start.s  
 (1) reset: check why reset
 (2) if (reset = GPIO or power_on or watchdog reset) do following (3) 
     if (reset = sleep reset) jump to (4)
 (3) Reads the SCR and LCDR virtural registers and places in SRAM
 (4) init GPIO
 (5) init clocks (basic clock, just for boot)
 (6) init power manager and internal memory
 (7) init Memory Controller
 (8) init Interrupt
 (9) init clocks (only when sleep reset)
 (10) change the CPU and RAM clocks, proform in high frequence
 (11) init OS timer
 (12) if power or battary error (only when sleep reset)
 finish basic init, b normal_boot -->
step 2
.../src/blob/start.S normal_boot: 
 (1) check the first 1MB of SDRAM, it will store the BLOB_START
 (2) copy form "piggy_start" to SDRAM
     __piggy_start = blob-rest-piggy.o
 (3) jump to "BLOB_START" (address: 0xa0300400)
note : previous program run in FLASH (CPU read cmd and data direct form FLASH)
 following program will run in SDRAM
  
  -- >
step 3
.../src/blob/trampoline.S 
 (1) clear SDRAM (just some section, not all)
 (2) setup the stack
 (3) jump to main
note : previous program are assembly
 following program are C
 -->
step 4
.../src/blob/main.c
 (1) init_subsystems() 
 <1> init flash driever (init_mainstone_flash_driver()) 
 <2> init hardware (set IP address, mainstone_init_hardware())
 <3> init serial (serial_default_init())
 <4> init icache
 <5> init led
 <6> init net (ether_init()) !!!!
 <8> init command
 <9> init flash blocks table (in flash.c)
 <10> find partiton table (in partition.c: ptable_init())
 (2) reload blob, kernel, filesystem.
 (3) print some welcome info, wait user input, or timeout, start kernel
阅读(1406) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~