Chinaunix首页 | 论坛 | 博客
  • 博客访问: 490160
  • 博文数量: 93
  • 博客积分: 1431
  • 博客等级: 上尉
  • 技术积分: 1006
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-18 10:30
文章分类

全部博文(93)

文章存档

2011年(20)

2010年(2)

2009年(71)

我的朋友

分类: LINUX

2009-09-29 13:34:01

November 10
blob, how to start
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
 
 
阅读(1194) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~