Gyorgy Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 1 | Design proposal process |
| 2 | ======================= |
| 3 | |
| 4 | :Author: Gyorgy Szing |
| 5 | :Organisation: Arm Limited |
| 6 | :Contact: Gyorgy Szing <gyorgy.szing@arm.com> |
| 7 | |
| 8 | Purpose and Content |
| 9 | ------------------- |
Ken Liu | c54a6c9 | 2019-12-16 12:18:11 +0800 | [diff] [blame] | 10 | This document describes the steps of adding/changing Trusted Firmware design. It |
Gyorgy Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 11 | specifies: |
| 12 | |
Ken Liu | c54a6c9 | 2019-12-16 12:18:11 +0800 | [diff] [blame] | 13 | - 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 Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 17 | |
| 18 | General |
| 19 | ------- |
| 20 | The 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>`_ |
| 23 | extensions for documentation. Design documents shall be captured in this format. |
| 24 | |
| 25 | Design documents are kept under version control at the project's |
| 26 | `Gerrit server <https://review.trustedfirmware.org>`_. All decisions made and |
| 27 | important information gathered during the design discussion, which is not part |
| 28 | of the design document shall be captured as Gerrit comments or notes for |
| 29 | archiving purposes. To meet this requirement this process encourages the use of |
| 30 | the Gerrit web UI for communication. |
| 31 | |
| 32 | |
| 33 | Status of a document |
| 34 | --------------------- |
| 35 | The status of the document is captured in a *reST filed* called *Status*. |
| 36 | Bibliographic fields like the *Status* shall be kept near to the top of the |
| 37 | document after the document title. |
| 38 | |
| 39 | Example 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 Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 47 | |
| 48 | Design documents are kept in three different sections of the documentation |
| 49 | reflecting the status of the document. The status of the document determines |
| 50 | the section it is in. Open (*Draft* and *Detailed* status) and accepted design |
Summer Qin | abf6698 | 2021-04-06 17:22:15 +0800 | [diff] [blame] | 51 | documents shall be put to the ``docs/technical_references`` directory. |
Ken Liu | c54a6c9 | 2019-12-16 12:18:11 +0800 | [diff] [blame] | 52 | |
| 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 Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 64 | |
| 65 | Preparation |
| 66 | ------------- |
| 67 | In order to work on TF-M documentation the TF-M git repository has to be |
| 68 | available locally. Setting up the documentation tools will allow pre-viewing the |
| 69 | documentation file in preparation. |
| 70 | For information on what tools are needed please refer to |
Summer Qin | 6d5c91c | 2021-05-24 15:32:44 +0800 | [diff] [blame] | 71 | :doc:`TF-M getting started </docs/getting_started/tfm_getting_started>`. To see |
| 72 | how to get a local copy of the TF-M repository please see |
Summer Qin | ab1dd99 | 2021-05-25 13:58:55 +0800 | [diff] [blame] | 73 | :doc:`build instructions </docs/technical_references/instructions/tfm_build_instruction>` |
Gyorgy Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 74 | |
| 75 | Process steps |
| 76 | ------------- |
| 77 | |
| 78 | - Write the design proposal in the format that is described in this document |
Ken Liu | c54a6c9 | 2019-12-16 12:18:11 +0800 | [diff] [blame] | 79 | with the *Status* set to *Draft* if *Status* field is provided. Put it to the |
Summer Qin | abf6698 | 2021-04-06 17:22:15 +0800 | [diff] [blame] | 80 | ``docs/technical_references`` directory and create a pull request. |
Gyorgy Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 81 | - 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 Liu | c54a6c9 | 2019-12-16 12:18:11 +0800 | [diff] [blame] | 88 | detailed review is established, set the *Status* field to *Detailed* if |
| 89 | *Status* field is provided and push the change to Gerrit. |
Gyorgy Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 90 | - 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 Liu | c54a6c9 | 2019-12-16 12:18:11 +0800 | [diff] [blame] | 94 | - 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 Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 96 | |
| 97 | .. uml:: |
| 98 | |
| 99 | @startuml |
Summer Qin | abf6698 | 2021-04-06 17:22:15 +0800 | [diff] [blame] | 100 | !define DRAFT_DIR **docs/technical_references/** |
| 101 | !define REJECTED_DIR **docs/technical_references/rejected/** |
Gyorgy Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 102 | !define GERRIT_URL https://review.trustedfirmware.org |
| 103 | !define GERRIT_LINK [[GERRIT_URL trustedfirmware.org]] |
Minos Galanakis | 0f39fa5 | 2020-06-08 16:53:53 +0100 | [diff] [blame] | 104 | !define MAINTAINER_RST_URL https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/tree/docs/maintainers.rst |
Gyorgy Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 105 | !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 Liu | c54a6c9 | 2019-12-16 12:18:11 +0800 | [diff] [blame] | 117 | :Set it's available 'Status' field to STATUS_DRAFT.; |
Gyorgy Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 118 | |
| 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 Liu | c54a6c9 | 2019-12-16 12:18:11 +0800 | [diff] [blame] | 131 | :Set available 'Status' field to STATUS_DETAILED.; |
Gyorgy Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 132 | :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 Liu | c54a6c9 | 2019-12-16 12:18:11 +0800 | [diff] [blame] | 143 | 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 Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 147 | endif |
| 148 | |
Gyorgy Szing | 5c87323 | 2019-05-10 23:28:14 +0200 | [diff] [blame] | 149 | stop |
| 150 | |
| 151 | @enduml |
| 152 | |
| 153 | -------------- |
| 154 | |
Summer Qin | abf6698 | 2021-04-06 17:22:15 +0800 | [diff] [blame] | 155 | *Copyright (c) 2019-2021, Arm Limited. All rights reserved.* |