Four image descriptors form the BL31 Chain of Trust:
-.. code:: asm
+.. code:: c
[TRUSTED_KEY_CERT_ID] = {
.img_id = TRUSTED_KEY_CERT_ID,
#include "./a_header.h"
Include statement variants
-^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^
Two variants of the ``#include`` directive are acceptable in the TF codebase.
Correct use of the two styles improves readability by suggesting the location
------------------
Use of built-in *C* and *libc* data types
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The TF codebase should be kept as portable as possible, especially since both
64-bit and 32-bit platforms are supported. To help with this, the following data
u_register_t arg7;
} aapcs64_params_t;
-
- If some code wants to operate on ``arg0`` and knows that it represents a
- 32-bit unsigned integer on all systems, cast it to ``unsigned int``.
+If some code wants to operate on ``arg0`` and knows that it represents a 32-bit
+unsigned integer on all systems, cast it to ``unsigned int``.
These guidelines should be updated if additional types are needed.
A subscriber that wants to subscribe to event ``foo`` published above would
implement:
-::
+.. code:: c
- void *foo_handler(const void *arg)
- {
- void *result;
+ void *foo_handler(const void *arg)
+ {
+ void *result;
- /* Do handling ... */
+ /* Do handling ... */
- return result;
- }
+ return result;
+ }
- SUBSCRIBE_TO_EVENT(foo, foo_handler);
+ SUBSCRIBE_TO_EVENT(foo, foo_handler);
Reclaiming the BL31 initialization code
1 (do save and restore). 0 is the default. An SPD may set this to 1 if it
wants the timer registers to be saved and restored.
-- ``OVERRIDE_LIBC``: This option allows platforms to override the default libc
+- ``OVERRIDE_LIBC``: This option allows platforms to override the default libc
for the BL image. It can be either 0 (include) or 1 (remove). The default
value is 0.