blob: 478220e0b42ee16451febbc981a21ea9c94365ec [file] [log] [blame]
Gyorgy Szing5c873232019-05-10 23:28:14 +02001Design proposal process
2=======================
3
4:Author: Gyorgy Szing
5:Organisation: Arm Limited
6:Contact: Gyorgy Szing <gyorgy.szing@arm.com>
7
8Purpose and Content
9-------------------
10This document describes the steps of changing Trusted Firmware design. It
11specifies:
12
13 - the documentation format to be used
14 - the information which shall be captured
15 - the steps of the process
16 - and the location where the information shall be captured during the process.
17
18General
19-------
20The Trusted Firmware project uses the
21`reStructuredText <http://docutils.sourceforge.net/rst.html>`_ format with
22`Sphinx <http://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
23extensions for documentation. Design documents shall be captured in this format.
24
25Design documents are kept under version control at the project's
26`Gerrit server <https://review.trustedfirmware.org>`_. All decisions made and
27important information gathered during the design discussion, which is not part
28of the design document shall be captured as Gerrit comments or notes for
29archiving purposes. To meet this requirement this process encourages the use of
30the Gerrit web UI for communication.
31
32
33Status of a document
34---------------------
35The status of the document is captured in a *reST filed* called *Status*.
36Bibliographic fields like the *Status* shall be kept near to the top of the
37document after the document title.
38
39Example document fragment::
40
41 TF-M Crypto Service design
42 --------------------------
43
44 :Author: Antonio de Angelis
45 :Organization: Arm Limited
46 :Contact: Antonio de Angelis <antonio.deangelis@arm.com>
47 :Status: Draft
48
49Design documents are kept in three different sections of the documentation
50reflecting the status of the document. The status of the document determines
51the section it is in. Open (*Draft* and *Detailed* status) and accepted design
52documents shall be put to the ``docs/design_documents``
53directory and rejected documents to the ``docs/design_documents/rejected``
54directory.
55
56Preparation
57-------------
58In order to work on TF-M documentation the TF-M git repository has to be
59available locally. Setting up the documentation tools will allow pre-viewing the
60documentation file in preparation.
61For information on what tools are needed please refer to
62:doc:`sw requirements </docs/user_guides/tfm_sw_requirement>`. To see how to get
63a local copy of the TF-M repository please see
64:doc:`build instructions </docs/user_guides/tfm_build_instruction>`
65
66Process steps
67-------------
68
69- Write the design proposal in the format that is described in this document
70 with the status set to *Draft*. Put it to the ``docs/design_documents``
71 directory and create a pull request.
72- Start an e-mail thread on the
73 `TF-M mailing list <mailto:tf-m@lists.trustedfirmware.org>`_ for discussing
74 the proposal.
75- Build initial consensus within the community about the proposed design
76 change, rework it according to the feedbacks and identify members who would
77 like to participate in the detailed review.
78- When the "short list" of members who are willing to participate in the
79 detailed review is established, set the *Status* field to *Detailed* and
80 push the change to Gerrit.
81- Add the members of the "short list" to the Gerrit review as reviewers.
82- The detailed discussion then takes place in the Gerrit review and gets
83 recorded there.
84 Additional changes are submitted as new commits to the review.
85- When the proposal is accepted, the status field is set to *Accepted*, the
86 change updated and merged.
87- If at any point the proposal is rejected its status field is set to
88 *Rejected*, and the document is moved to the *rejected design documents*
89 section.
90
91.. uml::
92
93 @startuml
94 !define DRAFT_DIR **docs/design_documents/**
95 !define REJECTED_DIR **docs/design_documents/rejected/**
96 !define GERRIT_URL https://review.trustedfirmware.org
97 !define GERRIT_LINK [[GERRIT_URL trustedfirmware.org]]
98 !define MAINTAINER_RST_URL https://git.trustedfirmware.org/trusted-firmware-m.git/tree/maintainers.rst
99 !define TFM_MAILING_LIST mailto:tf-m@lists.trustedfirmware.org
100 !define NO_DECISION **no**
101 !define YES_DECISION **yes**
102 !define STATUS_DRAFT **Draft**
103 !define STATUS_DETAILED **Detailed**
104 !define STATUS_REJECTED **Rejected**
105 !define STATUS_ACCEPTED **Accepted**
106
107 title Design Proposal Process
108
109 start
110 :Create first draft.in [[http://docutils.sourceforge.net/rst.html ReST format]];
111 :Set it's status to STATUS_DRAFT.;
112
113 :Add your document under DRAFT_DIR.;
114 :Create pull-request at GERRIT_LINK.;
115 partition "Initial review." {
116 :Start an e-mail thread at [[TFM_MAILING_LIST tf-m mailing list]].;
117 repeat
118 :Build initial consensus within the
119 community about the proposed design change.;
120 :Gather developers interested in detailed review.;
121 repeat while (Ready for detailed review?)
122 }
123
124 partition "Detailed review." {
125 :Set document status to STATUS_DETAILED.;
126 :Add reviewers to pull request.;
127
128 repeat
129 :Discuss design in Gerrit comments/notes.;
130 :Log the result of discussions over
131 other communication channels
132 as Gerrit comments/notes.;
133 :Push new document version if needed.;
134 repeat while (Consensus reached?)
135 }
136
137 if (Design is rejected?) then (YES_DECISION)
138 :Set document status to STATUS_REJECTED.;
139 :Move the document to REJECTED_DIR.;
140 else (NO_DECISION)
141 :Sets the document status to STATUS_ACCEPTED.;
142 endif
143
144 ://Submit// the pull-request.;
145 stop
146
147 @enduml
148
149--------------
150
151*Copyright (c) 2019, Arm Limited. All rights reserved.*