u-boot引导VxWorks分析
_numcores() -> hweight32(_mask())
其中cpu_mask() -> compute_ppc_cpumask()返回cpu的cpu->mask
hweight32()会返回32bit的cpu->mask当中有多少个bit被置位
则cpu_numcores()返回当前cpu上有多少个core
将cpu core的信息填充到FDT里device_type为cpu这一项
4. 执行flush_cache,将data cache里的dirty数据(修改的FDT数据)刷新到DDR
flush_cache((unsigned long)images->ft_addr, images->ft_len);
boot_jump_vxworks(images)做以下操作:
/* PowerPC VxWorks boot interface conforms to the ePAPR standard
* general purpuse registers:
*
* r3: Effective address of the device tree image
* r4: 0
* r5: 0
* r6: ePAPR magic value
* r7: shall be the size of the boot IMA in bytes
* r8: 0
* r9: 0
* TCR: WRC = 0, no watchdog timer reset will occur
*/
((void (*)(void *, ulong, ulong, ulong,
ulong, ulong, ulong))images->ep)(images->ft_addr,
0, 0, EPAPR_MAGIC, getenv_bootm_mapsize(), 0, 0);
激活VxWorks的步骤
=> tftpboot 0x20100000 vxWorks.st.bin cpu 1 release 0x201002e8 2 1 1
步骤1:
tftpboot -> do_tftpb() -> netboot_common() -> bootm_maybe_autostart() -> do_bootm()
步骤2:
cpu -> cpu_cmd() -> cpu_release()
cpu release [args]
- Release cpu at with [args]
[args] :
pir - processor id (if writeable)
r3 - value for gpr 3
r6 - value for gpr 6
Use '-' for any arg if you want the default value.
Default for r3 is and r6 is 0
When cpu is released r4 and r5 = 0.
r7 will contain the size of the initial mapped area
cpu_release()做以下操作:
table[BOOT_ENTRY_ADDR_UPPER] = (u32)(boot_addr >> 32);
/* ensure all table updates complete before final address write */
eieio();
table[BOOT_ENTRY_ADDR_LOWER] = (u32)(boot_addr 0xffffffff);
- U-Boot的编译与移植到QT-S3C44B0X开发板上(03-08)
- 基于S3C2410A的嵌入式系统的U-Boot移植(01-24)
- 从NAND闪存中启动U-BOOT的设计(05-16)
- 嵌入式Linux开发环境的搭建之:U-Boot移植(08-13)
- u-boot-在2440上的移植详解(一)(12-01)
- U-BOOT移植的经验之谈(11-29)
