Home

Awesome

RustSBI implementation for Allwinner D1

CI issue

全志 D1 引导程序及其调试工具。

模块

SPL

运行在 SRAM,单独调试时产生如下输出:

DRAM only have internal ZQ!!
get_pmu_exist() = 4294967295
ddr_efuse_type: 0x0
[AUTO DEBUG] two rank and full DQ!
ddr_efuse_type: 0x0
[AUTO DEBUG] rank 0 row = 16
[AUTO DEBUG] rank 0 bank = 8
[AUTO DEBUG] rank 0 page size = 2 KB
[AUTO DEBUG] rank 1 row = 16
[AUTO DEBUG] rank 1 bank = 8
[AUTO DEBUG] rank 1 page size = 2 KB
rank1 config same as rank0
DRAM BOOT DRIVE INFO: %s
DRAM CLK = 792 MHz
DRAM Type = 3 (2:DDR2,3:DDR3)
DRAMC ZQ value: 0x7b7bfb
DRAM ODT value: 0x42.
ddr_efuse_type: 0x0
DRAM SIZE =2048 M
DRAM simple test OK.

   _  __        __          ___            __    __  ____  _ __
  / |/ /__ ___ / /  ___ _  / _ )___  ___  / /_  / / / / /_(_) /
 /    / -_)_ // _ \/ _ `/ / _  / _ \/ _ \/ __/ / /_/ / __/ / /
/_/|_/\__//__/_//_/\_,_/ /____/\___/\___/\__/  \____/\__/_/_/🦀
no payload |                     <<                           |

SEE

运行在 DRAM,单独调试时产生如下输出:

[rustsbi] no dtb file detected
[rustsbi] RustSBI version 0.3.0-alpha.1, adapting to RISC-V SBI v1.0.0
.______       __    __      _______.___________.  _______..______   __
|   _  \     |  |  |  |    /       |           | /       ||   _  \ |  |
|  |_)  |    |  |  |  |   |   (----`---|  |----`|   (----`|  |_)  ||  |
|      /     |  |  |  |    \   \       |  |      \   \    |   _  < |  |
|  |\  \----.|  `--'  |.----)   |      |  |  .----)   |   |  |_)  ||  |
| _| `._____| \______/ |_______/       |__|  |_______/    |______/ |__|
[rustsbi] Implementation     : RustSBI-D1 Version 0.1.0
[rustsbi] Extensions         : [legacy console, timer, reset, ipi]
[rustsbi] Platform Name      : unknown
[rustsbi] Platform SMP       : 1
[rustsbi] Platform Memory    : 0x0..0x0
[rustsbi] Boot HART          : 0
[rustsbi] Device Tree Region : 0x0..0x0
[rustsbi] Firmware Address   : 0x40000000
[rustsbi] Supervisor Address : 0x0
[rustsbi] no kernel |                                      <<         |

TEST-KERNEL

用于测试 SEE 的 Supervisor,若 SEE 工作正常,产生如下输出:

 _____         _     _  __                    _
|_   _|__  ___| |_  | |/ /___ _ __ _ __   ___| |
  | |/ _ \/ __| __| | ' // _ \ '__| '_ \ / _ \ |
  | |  __/\__ \ |_  | . \  __/ |  | | | |  __/ |
  |_|\___||___/\__| |_|\_\___|_|  |_| |_|\___|_|
================================================
| boot hart id          |                    0 |
| smp                   |                    1 |
| timebase frequency    |          24000000 Hz |
| dtb physical address  |           0x7fe00000 |
------------------------------------------------
[ INFO] Testing Base
[ INFO] sbi spec version = 1.0
[ INFO] sbi impl = RustSBI
[ INFO] sbi impl version = 0x300
[ INFO] sbi extensions = [Base, TIME, sPI, SRST]
[ INFO] mvendor id = 0x5b7
[ INFO] march id = 0x0
[ INFO] mimp id = 0x0
[ INFO] Sbi Base Test Pass
[ INFO] Testing TIME
[ INFO] read time register successfuly, set timer +1s
[ INFO] timer interrupt delegate successfuly
[ INFO] Sbi TIME Test Pass
[ INFO] Testing sPI
[ INFO] send ipi successfuly
[ INFO] Sbi sPI Test Pass
[ERROR] Sbi HSM Not Exist
[ INFO] marchid duration = 13468308
[ INFO] ipi duration = 28632525
[rustsbi] system reset |                   >>  |

加载过程

支持以下模式:

  1. xfel -> spl -> see -> kernel

    这个模式目前不能工作,因为一旦使用 xfel ddr d1,就没法从 sram 运行了,原因不明

  2. xfel --------> see -> kernel

  3. brom -> spl -> see -> kernel

每种模式都支持在没有后续环节时停住。

命令

环境参数:

命令:

换行问题

如果你使用 minicom 连接开发板,出现显示时光标不回行首的情况(类似这样),需要改 minicom 配置,参考此问答

错误提示 ERROR xtask::xfel] xfel not found

xfel: https://github.com/xboot/xfel

Windows配置: 下载xfel-windows-v1.3.2.7z后解压,并将解压目录路径添加至系统环境变量 Path 中,于重新打开的终端中运行xfel命令验证成功。