Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    请问bootrom是如何加载nand flash的spl呢?

    MR Series
    d1
    2
    5
    2326
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      woolen LV 3 last edited by

      各位大佬,请问bootrom加载nand flash的spl,会解析头部的字段吗,比如magic check_sum和length?然后拷贝length长度的代码到sram再执行?

      1 Reply Last reply Reply Quote Share 0
      • tigger
        tigger LV 7 last edited by

        brom会把spl全部复制到sram,然后pc指过去,指令会自动跳过那些magic,crc,也会去判断是否有magic,crc是否正确。

        W 1 Reply Last reply Reply Quote Share 0
        • W
          woolen LV 3 @tigger last edited by

          @tigger 谢谢,也就是说bootrom只管拷贝和pc指到0x20000(jump_insturction),对头部的校验和处理都是spl自己做的?
          bootrom会拷贝多长的内容到sram呢,固定64KB吗?

          tigger 1 Reply Last reply Reply Quote Share 0
          • tigger
            tigger LV 7 @woolen last edited by

            @woolen
            brom 会检查 magic 和 crc 吧,如果这些都不对,会进入继续查找下一个合法的启动介质。

            spl 加载到 sram 运行后,那些指令会自动跳过magic 和 crc,因为都是计算好的,反编译一下就知道了。

            全志D1芯片之终极探索
            https://whycan.com/t_6546.html#p67457

            至于你说的 spl 长度,可以参考这个wiki:
            https://linux-sunxi.org/BROM (每个soc的spl长度可能不同)

            W 1 Reply Last reply Reply Quote Share 0
            • W
              woolen LV 3 @tigger last edited by

              @tigger 明白了,我刚才理解错了,谢谢

              1 Reply Last reply Reply Quote Share 0
              • 1 / 1
              • First post
                Last post

              Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

              行为准则 | 用户协议 | 隐私权政策