blob: 1f5614036e7de9c1694ade675c9554426ed833b0 [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-------------------
Ken Liuc54a6c92019-12-16 12:18:11 +080010This document describes the steps of adding/changing Trusted Firmware design. It
Gyorgy Szing5c873232019-05-10 23:28:14 +020011specifies:
12
Ken Liuc54a6c92019-12-16 12:18:11 +080013 - The documentation format to be used.
14 - The information which shall be captured.
15 - The steps of the process.
16 - The location where the information shall be captured during the process.
Gyorgy Szing5c873232019-05-10 23:28:14 +020017
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>
Gyorgy Szing5c873232019-05-10 23:28:14 +020047
48Design documents are kept in three different sections of the documentation
49reflecting the status of the document. The status of the document determines
50the section it is in. Open (*Draft* and *Detailed* status) and accepted design
Summer Qinabf66982021-04-06 17:22:15 +080051documents shall be put to the ``docs/technical_references`` directory.
Ken Liuc54a6c92019-12-16 12:18:11 +080052
53.. important::
54 - 'Author' and 'Organization' can be *OPTIONAL* but at least one of them is
55 *MANDATORY*.
56 - 'Contact' is *MANDATORY* and must be valid for contacting with 'Author'
57 or 'Organization'.
58 - 'Status' is *OPTIONAL* if the design document is managed under a version
59 control tool. In this 'Status' field not available case, a guideline can be:
60
61 - No review comments given design is a *Draft* design.
62 - Positive review comments given design is a *Detailed* design.
63 - Merged design is an *Accepted* design.
Gyorgy Szing5c873232019-05-10 23:28:14 +020064
65Preparation
66-------------
67In order to work on TF-M documentation the TF-M git repository has to be
68available locally. Setting up the documentation tools will allow pre-viewing the
69documentation file in preparation.
70For information on what tools are needed please refer to
Summer Qin6d5c91c2021-05-24 15:32:44 +080071:doc:`TF-M getting started </docs/getting_started/tfm_getting_started>`. To see
72how to get a local copy of the TF-M repository please see
Summer Qinab1dd992021-05-25 13:58:55 +080073:doc:`build instructions </docs/technical_references/instructions/tfm_build_instruction>`
Gyorgy Szing5c873232019-05-10 23:28:14 +020074
75Process steps
76-------------
77
78- Write the design proposal in the format that is described in this document
Ken Liuc54a6c92019-12-16 12:18:11 +080079 with the *Status* set to *Draft* if *Status* field is provided. Put it to the
Summer Qinabf66982021-04-06 17:22:15 +080080 ``docs/technical_references`` directory and create a pull request.
Gyorgy Szing5c873232019-05-10 23:28:14 +020081- Start an e-mail thread on the
82 `TF-M mailing list <mailto:tf-m@lists.trustedfirmware.org>`_ for discussing
83 the proposal.
84- Build initial consensus within the community about the proposed design
85 change, rework it according to the feedbacks and identify members who would
86 like to participate in the detailed review.
87- When the "short list" of members who are willing to participate in the
Ken Liuc54a6c92019-12-16 12:18:11 +080088 detailed review is established, set the *Status* field to *Detailed* if
89 *Status* field is provided and push the change to Gerrit.
Gyorgy Szing5c873232019-05-10 23:28:14 +020090- Add the members of the "short list" to the Gerrit review as reviewers.
91- The detailed discussion then takes place in the Gerrit review and gets
92 recorded there.
93 Additional changes are submitted as new commits to the review.
Ken Liuc54a6c92019-12-16 12:18:11 +080094- When the proposal is accepted and *Status* field is provided, the *Status*
95 field is set to *Accepted* and update the change then get merged.
Gyorgy Szing5c873232019-05-10 23:28:14 +020096
97.. uml::
98
99 @startuml
Summer Qinabf66982021-04-06 17:22:15 +0800100 !define DRAFT_DIR **docs/technical_references/**
101 !define REJECTED_DIR **docs/technical_references/rejected/**
Gyorgy Szing5c873232019-05-10 23:28:14 +0200102 !define GERRIT_URL https://review.trustedfirmware.org
103 !define GERRIT_LINK [[GERRIT_URL trustedfirmware.org]]
Minos Galanakis0f39fa52020-06-08 16:53:53 +0100104 !define MAINTAINER_RST_URL https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/tree/docs/maintainers.rst
Gyorgy Szing5c873232019-05-10 23:28:14 +0200105 !define TFM_MAILING_LIST mailto:tf-m@lists.trustedfirmware.org
106 !define NO_DECISION **no**
107 !define YES_DECISION **yes**
108 !define STATUS_DRAFT **Draft**
109 !define STATUS_DETAILED **Detailed**
110 !define STATUS_REJECTED **Rejected**
111 !define STATUS_ACCEPTED **Accepted**
112
113 title Design Proposal Process
114
115 start
116 :Create first draft.in [[http://docutils.sourceforge.net/rst.html ReST format]];
Ken Liuc54a6c92019-12-16 12:18:11 +0800117 :Set it's available 'Status' field to STATUS_DRAFT.;
Gyorgy Szing5c873232019-05-10 23:28:14 +0200118
119 :Add your document under DRAFT_DIR.;
120 :Create pull-request at GERRIT_LINK.;
121 partition "Initial review." {
122 :Start an e-mail thread at [[TFM_MAILING_LIST tf-m mailing list]].;
123 repeat
124 :Build initial consensus within the
125 community about the proposed design change.;
126 :Gather developers interested in detailed review.;
127 repeat while (Ready for detailed review?)
128 }
129
130 partition "Detailed review." {
Ken Liuc54a6c92019-12-16 12:18:11 +0800131 :Set available 'Status' field to STATUS_DETAILED.;
Gyorgy Szing5c873232019-05-10 23:28:14 +0200132 :Add reviewers to pull request.;
133
134 repeat
135 :Discuss design in Gerrit comments/notes.;
136 :Log the result of discussions over
137 other communication channels
138 as Gerrit comments/notes.;
139 :Push new document version if needed.;
140 repeat while (Consensus reached?)
141 }
142
Ken Liuc54a6c92019-12-16 12:18:11 +0800143 if (Design is accepted?) then (STATUS_ACCEPTED)
144 :Sets available 'Status' field to STATUS_ACCEPTED.;
145 ://Submit// the pull-request.;
146 else (STATUS_REJECTED)
Gyorgy Szing5c873232019-05-10 23:28:14 +0200147 endif
148
Gyorgy Szing5c873232019-05-10 23:28:14 +0200149 stop
150
151 @enduml
152
153--------------
154
Summer Qinabf66982021-04-06 17:22:15 +0800155*Copyright (c) 2019-2021, Arm Limited. All rights reserved.*