summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-04-28 06:53:30 +0300
committerAnup Patel <anup@brainfault.org>2020-05-01 08:03:05 +0300
commitf1aa9e54e00006ae70aeac638d5b75093520f65d (patch)
tree34ca3d90e5ef4c62062ced3119852e27eb11cb79 /docs
parent4d063538f0493916dc6263276c4c84f31446db41 (diff)
downloadopensbi-f1aa9e54e00006ae70aeac638d5b75093520f65d.tar.xz
platform: Add generic FDT based platform support
We add generic FDT based platform support which provides platform specific functionality based on the FDT passed by previous booting stage. By default, the generic FDT platform makes following assumptions: 1. platform FW_TEXT_START is 0x80000000 2. platform features are default 3. platform stack size is default 4. platform has no quirks or work-arounds The above assumptions (except 1) can be overridden by adding special platform callbacks which will be called based on the FDT root node compatible string. By default, we compile OpenSBI generic platform as follows: $ make PLATFORM=generic For a non-standard FW_TEXT_START, we can compile OpenSBI generic platform as follows: $ make PLATFORM=generic FW_TEXT_START=<non_standard_text_start> Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/platform/generic.md42
-rw-r--r--docs/platform/platform.md6
2 files changed, 48 insertions, 0 deletions
diff --git a/docs/platform/generic.md b/docs/platform/generic.md
new file mode 100644
index 0000000..73b6fca
--- /dev/null
+++ b/docs/platform/generic.md
@@ -0,0 +1,42 @@
+Generic Platform
+================
+
+The **Generic** platform is a flattened device tree (FDT) based platform
+where all platform specific functionality is provided based on FDT passed
+by previous booting stage. The **Generic** platform allows us to use same
+OpenSBI firmware binaries on various emulators, simulators, FPGAs, and
+boards.
+
+By default, the generic FDT platform makes following assumptions:
+
+1. platform FW_TEXT_START is 0x80000000
+2. platform features are default
+3. platform stack size is default
+4. platform has no quirks or work-arounds
+
+The above assumptions (except 1) can be overridden by adding special platform
+callbacks which will be called based on FDT root node compatible string.
+
+Users of the generic FDT platform will have to ensure that:
+
+1. Various FDT based drivers under lib/utils directory are upto date
+ based on their platform requirements
+2. The FDT passed by previous booting stage has DT compatible strings and
+ DT properties in sync with the FDT based drivers under lib/utils directory
+
+To build the platform-specific library and firmware images, provide the
+*PLATFORM=generic* parameter to the top level `make` command.
+
+For custom FW_TEXT_START, we can build the platform-specific library and
+firmware images by passing *PLATFORM=generic FW_TEXT_START=<custom_text_start>*
+parameter to the top level `make` command.
+
+Platform Options
+----------------
+
+The *Generic* platform does not have any platform-specific options.
+
+RISC-V Platforms Using Generic Platform
+---------------------------------------
+
+To be added later.
diff --git a/docs/platform/platform.md b/docs/platform/platform.md
index 5580283..c8f6ade 100644
--- a/docs/platform/platform.md
+++ b/docs/platform/platform.md
@@ -3,6 +3,11 @@ OpenSBI Supported Platforms
OpenSBI currently supports the following virtual and hardware platforms:
+* **Generic**: Flattened device tree (FDT) based platform where platform
+ specific functionality is provided based on the FDT passed by previous
+ booting stage. More details on this platform can be found in the file
+ *[generic.md]*.
+
* **QEMU RISC-V Virt Machine**: Platform support for the QEMU *virt* virtual
RISC-V machine. This virtual machine is intended for RISC-V software
development and tests. More details on this platform can be found in the
@@ -34,6 +39,7 @@ template files for implementing support for a new platform. The *object.mk*,
*config.mk* and *platform.c* template files provides enough comments to
facilitate the implementation.
+[generic.md]: generic.md
[qemu_virt.md]: qemu_virt.md
[sifive_fu540.md]: sifive_fu540.md
[fpga-ariane.md]: fpga-ariane.md