9os

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 068b2d46a0e7d0b670a6317f61621120b4e4713a
parent 03083156b8ed304d5bce3d074ea4cfc7b4cb5387
Author: Dimitris Papastamos <dimitris.papastamos@arm.com>
Date:   Tue, 23 Apr 2019 11:12:11 +0100

Add initial design spec

Change-Id: I4c9a68545026f71c2276b7facd3fe11f60dc8401
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>

Diffstat:
Adoc/DESIGN | 178+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 178 insertions(+), 0 deletions(-)

diff --git a/doc/DESIGN b/doc/DESIGN @@ -0,0 +1,178 @@ +rcode design document +===================== + +0) Overview +----------- + +rcode was designed to be the reference implementation of the Bowmore +rcode specification. Due to the change of direction of the Bowmore +project, rcode was not finalized. + +What remains is basically a generic firmware implementation that can +be used as a starting point for any firmware project. rcode was +designed to be split into two parts, the ROM firmware and the runtime +firmware. + +The sections below explain a bit about how the code is organized. + +1) Directory structure +---------------------- +. +|-- config +| `-- toolchain + +rcode contains a primitive configuration system that operates on top +of the build system. The config directory contains the various +configurations. The file names are a pair that describes the +architecture and OS ABI of the configurations. + +The toolchain directory contains the toolchain specific +configurations. The toolchain configuration is independent of the +higher level configurations. + +|-- doc + +The doc/ directory contains rcode documentation as well as the +licenses of all code that is used in rcode. + +|-- drivers + +Top-level driver model as well as generic driver implementations. +There is a section below that describes the driver model in more +detail. + +|-- include +| |-- bits +| | |-- amd64 +| | | `-- arch +| | |-- arm32 +| | | `-- arch +| | |-- arm64 +| | | `-- arch +| | |-- darwin +| | | `-- sys +| | |-- dragonfly +| | | `-- sys +| | |-- i386 +| | | `-- arch +| | |-- linux +| | | `-- sys +| | |-- netbsd +| | | `-- sys +| | |-- openbsd +| | | `-- sys +| | |-- rcode +| | | `-- sys +| | `-- z80 +| | `-- arch +| `-- rcode + +Top-level include headers. include/bits/ contains the target specific +header definitions. This is used by libc. + +include/rcode/ contains generic definitions used by all rcode targets. + +|-- scripts + +Various helper scripts that are used as part of the build/config +system. + +|-- src +| |-- lib9p + +Generic 9p implementation. This is used by the generic driver model +to serialize/deserialize access to devices that live outside of the +rcode image. + +| |-- libc +| | |-- arch +| | | |-- amd64 +| | | | |-- darwin +| | | | |-- dragonfly +| | | | |-- linux +| | | | |-- netbsd +| | | | `-- openbsd +| | | |-- arm32 +| | | | `-- linux +| | | |-- arm64 +| | | | |-- linux +| | | | `-- rcode +| | | `-- posix +| | |-- assert +| | |-- ctype +| | |-- locale +| | |-- stdio +| | |-- stdlib +| | |-- string +| | `-- time + +Generic C99 libc implementation. Only a small subset of this library +is used when rcode is built to run natively. This code is derived +from the scc[0] project. + +| |-- libhdl + +libhdl is an abstraction used when handling RMC calls. It sits +between the runtime firmware dispatch code and the librmu library. + +| |-- libk + +Auxiliary routines augmenting those of libc that are used when rcode +is built to run natively. It provides facilities similar of those of +libc but simpler and more space efficient. + +| |-- librmu + +RMU command handling library. This is where all the RMU commands were +to be implemented. This library is architecture agnostic. + +| |-- libtypes + +A library to serialize/deserialize types. In the original +implementation Bowmore specified some fairly complex packing +semantics. libtypes provides the pack()/unpack() abstractions that +take a high level type and serialize/deserialize it to/from a +bitstream. + +| |-- ramfw + +Generic runtime firmware implementation. + +| `-- romfw + +Generic ROM firmware implementation. + +|-- target +| |-- hosted +| `-- native + +rcode supports hosted and native targets. The hosted target builds +rcode to execute as a userspace application on a UNIX-like system. +This mode of operation makes it easy to debug, profile and test the +code. + +`-- test + |-- functional + |-- fuzzing + |-- integration + |-- model + `-- unit + +This is where the test framework lives. There are 5 types of tests. + +2) Driver model +--------------- + +TBD + +3) RMC handling flow +-------------------- + +TBD + +4) Build system +--------------- + +TBD + +[0] http://www.simple-cc.org