diff options
author | Manish Pandey <manish.pandey2@arm.com> | 2023-01-10 11:56:42 +0100 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2023-01-10 11:56:42 +0100 |
commit | 601e2d4325a7def628990f4a25889f374c81ca06 (patch) | |
tree | b3e34881b61fc2e03dc5ed49d4c83ab832bd7913 /docs/getting_started | |
parent | 0e4655f828db2c0b03bdab22e676b77274caa656 (diff) | |
parent | 291be198faf634c2cde6812ac9a59b1573b71806 (diff) | |
download | arm-trusted-firmware-601e2d4325a7def628990f4a25889f374c81ca06.tar.gz |
Merge changes from topic "bk/warnings" into integration
* changes:
docs: describe the new warning levels
build: add -Wunused-const-variable=2 to W=2
build: include -Wextra in generic builds
docs(porting-guide): update a reference
fix(st-usb): replace redundant checks with asserts
fix(brcm): add braces around bodies of conditionals
fix(renesas): align incompatible function pointers
fix(zynqmp): remove redundant api_version check
fix: remove old-style declarations
fix: unify fallthrough annotations
Diffstat (limited to 'docs/getting_started')
-rw-r--r-- | docs/getting_started/build-options.rst | 45 | ||||
-rw-r--r-- | docs/getting_started/porting-guide.rst | 4 |
2 files changed, 48 insertions, 1 deletions
diff --git a/docs/getting_started/build-options.rst b/docs/getting_started/build-options.rst index e54ff4194..d5ded5ea7 100644 --- a/docs/getting_started/build-options.rst +++ b/docs/getting_started/build-options.rst @@ -213,6 +213,12 @@ Common build options - ``E``: Boolean option to make warnings into errors. Default is 1. + When specifying higher warnings levels (``W=1`` and higher), this option + defaults to 0. This is done to encourage contributors to use them, as they + are expected to produce warnings that would otherwise fail the build. New + contributions are still expected to build with ``W=0`` and ``E=1`` (the + default). + - ``EL3_PAYLOAD_BASE``: This option enables booting an EL3 payload instead of the normal boot flow. It must specify the entry point address of the EL3 payload. Please refer to the "Booting an EL3 payload" section for more @@ -954,6 +960,43 @@ Common build options regrouped and put in the root Makefile. This flag can take the values 0 to 3, each level enabling more warning options. Default is 0. + This option is closely related to the ``E`` option, which enables + ``-Werror``. + + - ``W=0`` (default) + + Enables a wide assortment of warnings, most notably ``-Wall`` and + ``-Wextra``, as well as various bad practices and things that are likely to + result in errors. Includes some compiler specific flags. No warnings are + expected at this level for any build. + + - ``W=1`` + + Enables warnings we want the generic build to include but are too time + consuming to fix at the moment. It re-enables warnings taken out for + ``W=0`` builds (a few of the ``-Wextra`` additions). This level is expected + to eventually be merged into ``W=0``. Some warnings are expected on some + builds, but new contributions should not introduce new ones. + + - ``W=2`` (recommended) + + Enables warnings we want the generic build to include but cannot be enabled + due to external libraries. This level is expected to eventually be merged + into ``W=0``. Lots of warnings are expected, primarily from external + libraries like zlib and compiler-rt, but new controbutions should not + introduce new ones. + + - ``W=3`` + + Enables warnings that are informative but not necessary and generally too + verbose and frequently ignored. A very large number of warnings are + expected. + + The exact set of warning flags depends on the compiler and TF-A warning + level, however they are all succinctly set in the top-level Makefile. Please + refer to the `GCC`_ or `Clang`_ documentation for more information on the + individual flags. + - ``WARMBOOT_ENABLE_DCACHE_EARLY`` : Boolean option to enable D-cache early on the CPU after warm boot. This is applicable for platforms which do not require interconnect programming to enable cache coherency (eg: single @@ -1161,3 +1204,5 @@ Firmware update options .. _DEN0115: https://developer.arm.com/docs/den0115/latest .. _PSA FW update specification: https://developer.arm.com/documentation/den0118/a/ .. _PSA DRTM specification: https://developer.arm.com/documentation/den0113/a +.. _GCC: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html +.. _Clang: https://clang.llvm.org/docs/DiagnosticsReference.html diff --git a/docs/getting_started/porting-guide.rst b/docs/getting_started/porting-guide.rst index d57345d34..80b72e52e 100644 --- a/docs/getting_started/porting-guide.rst +++ b/docs/getting_started/porting-guide.rst @@ -2135,7 +2135,7 @@ CPUs. BL31 executes at EL3 and is responsible for: #. Providing runtime firmware services. Currently, BL31 only implements a subset of the Power State Coordination Interface (PSCI) API as a runtime - service. See Section 3.3 below for details of porting the PSCI + service. See :ref:`psci_in_bl31` below for details of porting the PSCI implementation. #. Optionally passing control to the BL32 image, pre-loaded at a platform- @@ -2544,6 +2544,8 @@ Function: bool plat_get_entropy(uint64_t \*out) [mandatory] This function writes entropy into storage provided by the caller. If no entropy is available, it must return false and the storage must not be written. +.. _psci_in_bl31: + Power State Coordination Interface (in BL31) -------------------------------------------- |