F: arch/riscv/dts/k210.dtsi
F: arch/riscv/dts/k210-maix-bit.dts
F: board/sipeed/maix/
-F: configs/sipeed_maix_bitm_defconfig
+F: configs/sipeed_maix*_defconfig
F: doc/board/sipeed/
F: include/configs/sipeed-maix.h
F: include/dt-bindings/*/k210-sysctl.h
--- /dev/null
+CONFIG_RISCV=y
+CONFIG_SYS_TEXT_BASE=0x80020000
+CONFIG_TARGET_SIPEED_MAIX=y
+CONFIG_ARCH_RV64I=y
+CONFIG_RISCV_SMODE=y
+CONFIG_STACK_SIZE=0x100000
+# CONFIG_NET is not set
+# CONFIG_INPUT is not set
+# CONFIG_DM_ETH is not set
+# CONFIG_EFI_UNICODE_CAPITALIZATION is not set
Err: serial@38000000
=>
+OpenSBI
+^^^^^^^
+
+OpenSBI is an open source supervisor execution environment implementing the
+RISC-V Supervisor Binary Interface Specification [1]. One of its features is
+to intercept run-time exceptions, e.g. for unaligned access or illegal
+instructions, and to emulate the failing instructions.
+
+The OpenSBI source can be downloaded via:
+
+.. code-block:: bash
+
+ git clone https://github.com/riscv/opensbi
+
+As OpenSBI will be loaded at 0x80000000 we have to adjust the U-Boot text base.
+Furthermore we have to enable building U-Boot for S-mode::
+
+ CONFIG_SYS_TEXT_BASE=0x80020000
+ CONFIG_RISCV_SMODE=y
+
+Both settings are contained in sipeed_maix_smode_defconfig so we can build
+U-Boot with:
+
+.. code-block:: bash
+
+ make sipeed_maix_smode_defconfig
+ make
+
+To build OpenSBI with U-Boot as a payload:
+
+.. code-block:: bash
+
+ cd opensbi
+ make \
+ PLATFORM=kendryte/k210 \
+ FW_PAYLOAD=y \
+ FW_PAYLOAD_OFFSET=0x20000 \
+ FW_PAYLOAD_PATH=<path to U-Boot>/u-boot-dtb.bin
+
+The value of FW_PAYLOAD_OFFSET must match CONFIG_SYS_TEXT_BASE - 0x80000000.
+
+The file to flash is build/platform/kendryte/k210/firmware/fw_payload.bin.
+
Loading Images
^^^^^^^^^^^^^^
interrupts)
0x8801f000 0x1000 credits
========== ========= ===========
+
+Links
+-----
+
+[1] https://github.com/riscv/riscv-sbi-doc
+ RISC-V Supervisor Binary Interface Specification