uboot代码1:uboot启动大体流程, stage1 + stage2

start.S

 

stage 1:

  reset:

      set the cpu to svc32 mode

      disable the watchdog

      mask all IRQs(INTMSK, INTSUBMSK)

      

      cpu_init_crit(mmu, bus width status controller)

      set up the stack

      clock_init

      

      relocate u-boot ro RAM:

        copy code to RAM

        clear bbs

        setLoadFlag

 

stage 2:

      start_armboot()

      {

        gd = (gd_t*)(_armboot_start - CFG_MALLOC_LEN - sizeof(gd_t));

        memset gd;

        init_sequence();

        

        for(;;)

        {

          main_loop();

        }

      }

posted @ 2015-12-17 09:12  oucaijun  阅读(535)  评论(0编辑  收藏  举报
下载TeamViewer完整版 下载TeamViewer