From c0849cd731fca884c939e6a1a699a853231292a2 Mon Sep 17 00:00:00 2001
From: Liu Yibin <yibin_liu@c-sky.com>
Date: Thu, 2 Jan 2020 12:21:36 +0800
Subject: platform: Add T-head C910 initial support

This commit provides basic support for the Thead/C910 platform.

Signed-off-by: Liu Yibin <yibin_liu@c-sky.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
---
 docs/platform/platform.md   |  3 +++
 docs/platform/thead-c910.md | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 docs/platform/thead-c910.md

(limited to 'docs')

diff --git a/docs/platform/platform.md b/docs/platform/platform.md
index 424efe9..17cbfb8 100644
--- a/docs/platform/platform.md
+++ b/docs/platform/platform.md
@@ -26,6 +26,8 @@ OpenSBI currently supports the following virtual and hardware platforms:
 
 * **Andes AE350 SoC**: Platform support for the Andes's SoC (AE350).
 
+* **T-HEAD C910**: Platform support for the T-HEAD C910 Processor.
+
 The code for these supported platforms can be used as example to implement
 support for other platforms. The *platform/template* directory also provides
 template files for implementing support for a new platform. The *object.mk*,
@@ -37,3 +39,4 @@ facilitate the implementation.
 [sifive_fu540.md]: sifive_fu540.md
 [ariane-fpga.md]: ariane-fpga.md
 [andes_ae350.md]: andes-ae350.md
+[thead-c910.md]: thead-c910.md
diff --git a/docs/platform/thead-c910.md b/docs/platform/thead-c910.md
new file mode 100644
index 0000000..3ba0b96
--- /dev/null
+++ b/docs/platform/thead-c910.md
@@ -0,0 +1,34 @@
+T-HEAD C910 Processor
+=====================
+C910 is a 12-stage, 3 issues, 8 executions, out-of-order 64-bit RISC-V CPU which
+supports 16 cores, runs with 2.5GHz, and is capable of running Linux.
+
+To build platform specific library and firmwares, provide the *PLATFORM=thead/c910*
+parameter to the top level make command.
+
+Platform Options
+----------------
+
+The *T-HEAD C910* platform does not have any platform-specific options.
+
+Building T-HEAD C910 Platform
+-----------------------------
+
+```
+make PLATFORM=thead/c910
+```
+
+Booting T-HEAD C910 Platform
+-----------------------------
+
+**No Payload**
+
+As there's no payload, you may download vmlinux or u-boot to FW_JUMP_ADDR which
+specified in config.mk or compile commands with GDB. And the execution flow will
+turn to vmlinux or u-boot when opensbi ends.
+
+**Linux Kernel Payload**
+
+You can also choose to use Linux kernel as payload by enabling FW_PAYLOAD=y
+along with specifying FW_PAYLOAD_OFFSET. The kernel image will be embedded in
+the OPENSBI firmware binary, T-head will directly boot into Linux after OpenSBI.
-- 
cgit v1.2.3