微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > u-boot引导VxWorks分析

u-boot引导VxWorks分析

时间:09-12 来源:互联网 点击:

_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);

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top