_sphinx.addnodesdocument)}( rawsourcechildren](docutils.nodessubstitution_definition)}(h&.. |AArch32| replace:: :term:`AArch32`h]h pending_xref)}(h:term:`AArch32`h]h inline)}(hhh]h TextAArch32}(hhparenthuba attributes}(ids]classes](xrefstdstd-termenames]dupnames]backrefs]utagnamehh!hubah"}(h$]h&]h+]h-]h/]refdocprocess/coding-guidelines refdomainh)reftypeterm refexplicitrefwarn reftargetAArch32uh1hsource lineKh!h ubah"}(h$]h&]h+]AArch32ah-]h/]uh1h hAhBhCKh!hhhubh )}(h&.. |AArch64| replace:: :term:`AArch64`h]h)}(h:term:`AArch64`h]h)}(hhQh]hAArch64}(hhh!hSubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!hOubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainh]reftypeterm refexplicitrefwarnh?AArch64uh1hhAhBhCKh!hKubah"}(h$]h&]h+]AArch64ah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |AMU| replace:: :term:`AMU`h]h)}(h :term:`AMU`h]h)}(hh|h]hAMU}(hhh!h~ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!hzubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainhreftypeterm refexplicitrefwarnh?AMUuh1hhAhBhCKh!hvubah"}(h$]h&]h+]AMUah-]h/]uh1h hAhBhCKh!hhhubh )}(h&.. |AMUs| replace:: :term:`AMUs `h]h)}(h:term:`AMUs `h]h)}(hhh]hAMUs}(hhh!hubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!hubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainhreftypeterm refexplicitrefwarnh?AMUuh1hhAhBhCKh!hubah"}(h$]h&]h+]AMUsah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |API| replace:: :term:`API`h]h)}(h :term:`API`h]h)}(hhh]hAPI}(hhh!hubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!hubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainhތreftypeterm refexplicitrefwarnh?APIuh1hhAhBhCKh!hubah"}(h$]h&]h+]APIah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |BTI| replace:: :term:`BTI`h]h)}(h :term:`BTI`h]h)}(hhh]hBTI}(hhh!hubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!hubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?BTIuh1hhAhBhCKh!hubah"}(h$]h&]h+]BTIah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |CoT| replace:: :term:`CoT`h]h)}(h :term:`CoT`h]h)}(hj(h]hCoT}(hhh!j*ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j&ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj4reftypeterm refexplicitrefwarnh?CoTuh1hhAhBhCKh!j"ubah"}(h$]h&]h+]CoTah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |COT| replace:: :term:`COT`h]h)}(h :term:`COT`h]h)}(hjSh]hCOT}(hhh!jUubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jQubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj_reftypeterm refexplicitrefwarnh?COTuh1hhAhBhCKh!jMubah"}(h$]h&]h+]COTah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |CSS| replace:: :term:`CSS`h]h)}(h :term:`CSS`h]h)}(hj~h]hCSS}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j|ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?CSSuh1hhAhBhCK h!jxubah"}(h$]h&]h+]CSSah-]h/]uh1h hAhBhCK h!hhhubh )}(h.. |CVE| replace:: :term:`CVE`h]h)}(h :term:`CVE`h]h)}(hjh]hCVE}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?CVEuh1hhAhBhCK h!jubah"}(h$]h&]h+]CVEah-]h/]uh1h hAhBhCK h!hhhubh )}(h.. |DTB| replace:: :term:`DTB`h]h)}(h :term:`DTB`h]h)}(hjh]hDTB}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?DTBuh1hhAhBhCK h!jubah"}(h$]h&]h+]DTBah-]h/]uh1h hAhBhCK h!hhhubh )}(h .. |DS-5| replace:: :term:`DS-5`h]h)}(h :term:`DS-5`h]h)}(hjh]hDS-5}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?DS-5uh1hhAhBhCK h!jubah"}(h$]h&]h+]DS-5ah-]h/]uh1h hAhBhCK h!hhhubh )}(h.. |DSU| replace:: :term:`DSU`h]h)}(h :term:`DSU`h]h)}(hj*h]hDSU}(hhh!j,ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j(ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj6reftypeterm refexplicitrefwarnh?DSUuh1hhAhBhCK h!j$ubah"}(h$]h&]h+]DSUah-]h/]uh1h hAhBhCK h!hhhubh )}(h.. |DT| replace:: :term:`DT`h]h)}(h :term:`DT`h]h)}(hjUh]hDT}(hhh!jWubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jSubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjareftypeterm refexplicitrefwarnh?DTuh1hhAhBhCKh!jOubah"}(h$]h&]h+]DTah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |EL| replace:: :term:`EL`h]h)}(h :term:`EL`h]h)}(hjh]hEL}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j~ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?ELuh1hhAhBhCKh!jzubah"}(h$]h&]h+]ELah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |EHF| replace:: :term:`EHF`h]h)}(h :term:`EHF`h]h)}(hjh]hEHF}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?EHFuh1hhAhBhCKh!jubah"}(h$]h&]h+]EHFah-]h/]uh1h hAhBhCKh!hhhubh )}(h".. |FCONF| replace:: :term:`FCONF`h]h)}(h :term:`FCONF`h]h)}(hjh]hFCONF}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?FCONFuh1hhAhBhCKh!jubah"}(h$]h&]h+]FCONFah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |FDT| replace:: :term:`FDT`h]h)}(h :term:`FDT`h]h)}(hjh]hFDT}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?FDTuh1hhAhBhCKh!jubah"}(h$]h&]h+]FDTah-]h/]uh1h hAhBhCKh!hhhubh )}(h .. |FF-A| replace:: :term:`FF-A`h]h)}(h :term:`FF-A`h]h)}(hj,h]hFF-A}(hhh!j.ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j*ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj8reftypeterm refexplicitrefwarnh?FF-Auh1hhAhBhCKh!j&ubah"}(h$]h&]h+]FF-Aah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |FIP| replace:: :term:`FIP`h]h)}(h :term:`FIP`h]h)}(hjWh]hFIP}(hhh!jYubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jUubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjcreftypeterm refexplicitrefwarnh?FIPuh1hhAhBhCKh!jQubah"}(h$]h&]h+]FIPah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |FVP| replace:: :term:`FVP`h]h)}(h :term:`FVP`h]h)}(hjh]hFVP}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?FVPuh1hhAhBhCKh!j|ubah"}(h$]h&]h+]FVPah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |FWU| replace:: :term:`FWU`h]h)}(h :term:`FWU`h]h)}(hjh]hFWU}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?FWUuh1hhAhBhCKh!jubah"}(h$]h&]h+]FWUah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |GIC| replace:: :term:`GIC`h]h)}(h :term:`GIC`h]h)}(hjh]hGIC}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?GICuh1hhAhBhCKh!jubah"}(h$]h&]h+]GICah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |ISA| replace:: :term:`ISA`h]h)}(h :term:`ISA`h]h)}(hjh]hISA}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?ISAuh1hhAhBhCKh!jubah"}(h$]h&]h+]ISAah-]h/]uh1h hAhBhCKh!hhhubh )}(h$.. |Linaro| replace:: :term:`Linaro`h]h)}(h:term:`Linaro`h]h)}(hj.h]hLinaro}(hhh!j0ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j,ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj:reftypeterm refexplicitrefwarnh?Linarouh1hhAhBhCKh!j(ubah"}(h$]h&]h+]Linaroah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |MMU| replace:: :term:`MMU`h]h)}(h :term:`MMU`h]h)}(hjYh]hMMU}(hhh!j[ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jWubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjereftypeterm refexplicitrefwarnh?MMUuh1hhAhBhCKh!jSubah"}(h$]h&]h+]MMUah-]h/]uh1h hAhBhCKh!hhhubh )}(h .. |MPAM| replace:: :term:`MPAM`h]h)}(h :term:`MPAM`h]h)}(hjh]hMPAM}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?MPAMuh1hhAhBhCKh!j~ubah"}(h$]h&]h+]MPAMah-]h/]uh1h hAhBhCKh!hhhubh )}(h .. |MPMM| replace:: :term:`MPMM`h]h)}(h :term:`MPMM`h]h)}(hjh]hMPMM}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?MPMMuh1hhAhBhCKh!jubah"}(h$]h&]h+]MPMMah-]h/]uh1h hAhBhCKh!hhhubh )}(h".. |MPIDR| replace:: :term:`MPIDR`h]h)}(h :term:`MPIDR`h]h)}(hjh]hMPIDR}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?MPIDRuh1hhAhBhCKh!jubah"}(h$]h&]h+]MPIDRah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |MTE| replace:: :term:`MTE`h]h)}(h :term:`MTE`h]h)}(hjh]hMTE}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?MTEuh1hhAhBhCKh!jubah"}(h$]h&]h+]MTEah-]h/]uh1h hAhBhCKh!hhhubh )}(h.. |OEN| replace:: :term:`OEN`h]h)}(h :term:`OEN`h]h)}(hj0h]hOEN}(hhh!j2ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j.ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj<reftypeterm refexplicitrefwarnh?OENuh1hhAhBhCKh!j*ubah"}(h$]h&]h+]OENah-]h/]uh1h hAhBhCKh!hhhubh )}(h$.. |OP-TEE| replace:: :term:`OP-TEE`h]h)}(h:term:`OP-TEE`h]h)}(hj[h]hOP-TEE}(hhh!j]ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jYubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjgreftypeterm refexplicitrefwarnh?OP-TEEuh1hhAhBhCK h!jUubah"}(h$]h&]h+]OP-TEEah-]h/]uh1h hAhBhCK h!hhhubh )}(h.. |OTE| replace:: :term:`OTE`h]h)}(h :term:`OTE`h]h)}(hjh]hOTE}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?OTEuh1hhAhBhCK!h!jubah"}(h$]h&]h+]OTEah-]h/]uh1h hAhBhCK!h!hhhubh )}(h.. |PDD| replace:: :term:`PDD`h]h)}(h :term:`PDD`h]h)}(hjh]hPDD}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?PDDuh1hhAhBhCK"h!jubah"}(h$]h&]h+]PDDah-]h/]uh1h hAhBhCK"h!hhhubh )}(h".. |PAUTH| replace:: :term:`PAUTH`h]h)}(h :term:`PAUTH`h]h)}(hjh]hPAUTH}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?PAUTHuh1hhAhBhCK#h!jubah"}(h$]h&]h+]PAUTHah-]h/]uh1h hAhBhCK#h!hhhubh )}(h.. |PMF| replace:: :term:`PMF`h]h)}(h :term:`PMF`h]h)}(hjh]hPMF}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?PMFuh1hhAhBhCK$h!jubah"}(h$]h&]h+]PMFah-]h/]uh1h hAhBhCK$h!hhhubh )}(h .. |PSCI| replace:: :term:`PSCI`h]h)}(h :term:`PSCI`h]h)}(hj2h]hPSCI}(hhh!j4ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j0ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj>reftypeterm refexplicitrefwarnh?PSCIuh1hhAhBhCK%h!j,ubah"}(h$]h&]h+]PSCIah-]h/]uh1h hAhBhCK%h!hhhubh )}(h.. |RAS| replace:: :term:`RAS`h]h)}(h :term:`RAS`h]h)}(hj]h]hRAS}(hhh!j_ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j[ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjireftypeterm refexplicitrefwarnh?RASuh1hhAhBhCK&h!jWubah"}(h$]h&]h+]RASah-]h/]uh1h hAhBhCK&h!hhhubh )}(h.. |ROT| replace:: :term:`ROT`h]h)}(h :term:`ROT`h]h)}(hjh]hROT}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?ROTuh1hhAhBhCK'h!jubah"}(h$]h&]h+]ROTah-]h/]uh1h hAhBhCK'h!hhhubh )}(h .. |SCMI| replace:: :term:`SCMI`h]h)}(h :term:`SCMI`h]h)}(hjh]hSCMI}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SCMIuh1hhAhBhCK(h!jubah"}(h$]h&]h+]SCMIah-]h/]uh1h hAhBhCK(h!hhhubh )}(h.. |SCP| replace:: :term:`SCP`h]h)}(h :term:`SCP`h]h)}(hjh]hSCP}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SCPuh1hhAhBhCK)h!jubah"}(h$]h&]h+]SCPah-]h/]uh1h hAhBhCK)h!hhhubh )}(h .. |SDEI| replace:: :term:`SDEI`h]h)}(h :term:`SDEI`h]h)}(hj h]hSDEI}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SDEIuh1hhAhBhCK*h!jubah"}(h$]h&]h+]SDEIah-]h/]uh1h hAhBhCK*h!hhhubh )}(h.. |SDS| replace:: :term:`SDS`h]h)}(h :term:`SDS`h]h)}(hj4h]hSDS}(hhh!j6ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j2ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj@reftypeterm refexplicitrefwarnh?SDSuh1hhAhBhCK+h!j.ubah"}(h$]h&]h+]SDSah-]h/]uh1h hAhBhCK+h!hhhubh )}(h.. |SEA| replace:: :term:`SEA`h]h)}(h :term:`SEA`h]h)}(hj_h]hSEA}(hhh!jaubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j]ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjkreftypeterm refexplicitrefwarnh?SEAuh1hhAhBhCK,h!jYubah"}(h$]h&]h+]SEAah-]h/]uh1h hAhBhCK,h!hhhubh )}(h.. |SiP| replace:: :term:`SiP`h]h)}(h :term:`SiP`h]h)}(hjh]hSiP}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SiPuh1hhAhBhCK-h!jubah"}(h$]h&]h+]SiPah-]h/]uh1h hAhBhCK-h!hhhubh )}(h.. |SIP| replace:: :term:`SIP`h]h)}(h :term:`SIP`h]h)}(hjh]hSIP}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SIPuh1hhAhBhCK.h!jubah"}(h$]h&]h+]SIPah-]h/]uh1h hAhBhCK.h!hhhubh )}(h.. |SMC| replace:: :term:`SMC`h]h)}(h :term:`SMC`h]h)}(hjh]hSMC}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SMCuh1hhAhBhCK/h!jubah"}(h$]h&]h+]SMCah-]h/]uh1h hAhBhCK/h!hhhubh )}(h".. |SMCCC| replace:: :term:`SMCCC`h]h)}(h :term:`SMCCC`h]h)}(hj h]hSMCCC}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SMCCCuh1hhAhBhCK0h!jubah"}(h$]h&]h+]SMCCCah-]h/]uh1h hAhBhCK0h!hhhubh )}(h.. |SoC| replace:: :term:`SoC`h]h)}(h :term:`SoC`h]h)}(hj6h]hSoC}(hhh!j8ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j4ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjBreftypeterm refexplicitrefwarnh?SoCuh1hhAhBhCK1h!j0ubah"}(h$]h&]h+]SoCah-]h/]uh1h hAhBhCK1h!hhhubh )}(h.. |SP| replace:: :term:`SP`h]h)}(h :term:`SP`h]h)}(hjah]hSP}(hhh!jcubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j_ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjmreftypeterm refexplicitrefwarnh?SPuh1hhAhBhCK2h!j[ubah"}(h$]h&]h+]SPah-]h/]uh1h hAhBhCK2h!hhhubh )}(h.. |SPD| replace:: :term:`SPD`h]h)}(h :term:`SPD`h]h)}(hjh]hSPD}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SPDuh1hhAhBhCK3h!jubah"}(h$]h&]h+]SPDah-]h/]uh1h hAhBhCK3h!hhhubh )}(h.. |SPM| replace:: :term:`SPM`h]h)}(h :term:`SPM`h]h)}(hjh]hSPM}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SPMuh1hhAhBhCK4h!jubah"}(h$]h&]h+]SPMah-]h/]uh1h hAhBhCK4h!hhhubh )}(h .. |SSBS| replace:: :term:`SSBS`h]h)}(h :term:`SSBS`h]h)}(hjh]hSSBS}(hhh!jubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjreftypeterm refexplicitrefwarnh?SSBSuh1hhAhBhCK5h!jubah"}(h$]h&]h+]SSBSah-]h/]uh1h hAhBhCK5h!hhhubh )}(h.. |SVE| replace:: :term:`SVE`h]h)}(h :term:`SVE`h]h)}(hj h]hSVE}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?SVEuh1hhAhBhCK6h!j ubah"}(h$]h&]h+]SVEah-]h/]uh1h hAhBhCK6h!hhhubh )}(h.. |TBB| replace:: :term:`TBB`h]h)}(h :term:`TBB`h]h)}(hj8 h]hTBB}(hhh!j: ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j6 ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjD reftypeterm refexplicitrefwarnh?TBBuh1hhAhBhCK7h!j2 ubah"}(h$]h&]h+]TBBah-]h/]uh1h hAhBhCK7h!hhhubh )}(h .. |TBBR| replace:: :term:`TBBR`h]h)}(h :term:`TBBR`h]h)}(hjc h]hTBBR}(hhh!je ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!ja ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjo reftypeterm refexplicitrefwarnh?TBBRuh1hhAhBhCK8h!j] ubah"}(h$]h&]h+]TBBRah-]h/]uh1h hAhBhCK8h!hhhubh )}(h.. |TEE| replace:: :term:`TEE`h]h)}(h :term:`TEE`h]h)}(hj h]hTEE}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TEEuh1hhAhBhCK9h!j ubah"}(h$]h&]h+]TEEah-]h/]uh1h hAhBhCK9h!hhhubh )}(h .. |TF-A| replace:: :term:`TF-A`h]h)}(h :term:`TF-A`h]h)}(hj h]hTF-A}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TF-Auh1hhAhBhCK:h!j ubah"}(h$]h&]h+]TF-Aah-]h/]uh1h hAhBhCK:h!hhhubh )}(h .. |TF-M| replace:: :term:`TF-M`h]h)}(h :term:`TF-M`h]h)}(hj h]hTF-M}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TF-Muh1hhAhBhCK;h!j ubah"}(h$]h&]h+]TF-Mah-]h/]uh1h hAhBhCK;h!hhhubh )}(h.. |TLB| replace:: :term:`TLB`h]h)}(h :term:`TLB`h]h)}(hj h]hTLB}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TLBuh1hhAhBhCKh!j_ ubah"}(h$]h&]h+]TRNGah-]h/]uh1h hAhBhCK>h!hhhubh )}(h.. |TSP| replace:: :term:`TSP`h]h)}(h :term:`TSP`h]h)}(hj h]hTSP}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TSPuh1hhAhBhCK?h!j ubah"}(h$]h&]h+]TSPah-]h/]uh1h hAhBhCK?h!hhhubh )}(h.. |TZC| replace:: :term:`TZC`h]h)}(h :term:`TZC`h]h)}(hj h]hTZC}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?TZCuh1hhAhBhCK@h!j ubah"}(h$]h&]h+]TZCah-]h/]uh1h hAhBhCK@h!hhhubh )}(h".. |UBSAN| replace:: :term:`UBSAN`h]h)}(h :term:`UBSAN`h]h)}(hj h]hUBSAN}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?UBSANuh1hhAhBhCKAh!j ubah"}(h$]h&]h+]UBSANah-]h/]uh1h hAhBhCKAh!hhhubh )}(h .. |UEFI| replace:: :term:`UEFI`h]h)}(h :term:`UEFI`h]h)}(hj h]hUEFI}(hhh!j ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypeterm refexplicitrefwarnh?UEFIuh1hhAhBhCKBh!j ubah"}(h$]h&]h+]UEFIah-]h/]uh1h hAhBhCKBh!hhhubh )}(h .. |WDOG| replace:: :term:`WDOG`h]h)}(h :term:`WDOG`h]h)}(hj< h]hWDOG}(hhh!j> ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!j: ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjH reftypeterm refexplicitrefwarnh?WDOGuh1hhAhBhCKCh!j6 ubah"}(h$]h&]h+]WDOGah-]h/]uh1h hAhBhCKCh!hhhubh )}(h!.. |XLAT| replace:: :term:`XLAT` h]h)}(h :term:`XLAT`h]h)}(hjg h]hXLAT}(hhh!ji ubah"}(h$]h&](h(stdstd-termeh+]h-]h/]uh1hh!je ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainjs reftypeterm refexplicitrefwarnh?XLATuh1hhAhBhCKDh!ja ubah"}(h$]h&]h+]XLATah-]h/]uh1h hAhBhCKDh!hhhubh section)}(hhh](h title)}(hCoding Guidelinesh]hCoding Guidelines}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAZ/home/test/workspace/code/optee_3.16/trusted-firmware-a/docs/process/coding-guidelines.rsthCKubh paragraph)}(hThis document provides some additional guidelines to consider when writing |TF-A| code. These are not intended to be strictly-enforced rules like the contents of the :ref:`Coding Style`.h](hKThis document provides some additional guidelines to consider when writing }(hKThis document provides some additional guidelines to consider when writing h!j hhhANhCNubh)}(hj h]h)}(hj h]hTF-A}(hhh!j ubah"}(h$]h&](h(j j eh+]h-]h/]uh1hhANhCNh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypej refexplicitrefwarn reftargetj uh1hhAhBhCK:h!j hhubhU code. These are not intended to be strictly-enforced rules like the contents of the }(hU code. These are not intended to be strictly-enforced rules like the contents of the h!j hhhANhCNubh)}(h:ref:`Coding Style`h]h)}(hj h]h Coding Style}(hhh!j ubah"}(h$]h&](h(stdstd-refeh+]h-]h/]uh1hh!j ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftyperef refexplicitrefwarnh? coding styleuh1hhAj hCKh!j ubh.}(h.h!j hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j hhubj )}(hhh](j )}(hAutomatic Editor Configurationh]hAutomatic Editor Configuration}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCK ubj )}(hXUMany of the rules given below (such as indentation size, use of tabs, and newlines) can be set automatically using the `EditorConfig`_ configuration file in the root of the repository: ``.editorconfig``. With a supported editor, the rules set out in this file can be automatically applied when you are editing files in the |TF-A| repository.h](hwMany of the rules given below (such as indentation size, use of tabs, and newlines) can be set automatically using the }(hwMany of the rules given below (such as indentation size, use of tabs, and newlines) can be set automatically using the h!j hhhANhCNubh reference)}(h`EditorConfig`_h]h EditorConfig}(h EditorConfigh!j ubah"}(h$]h&]h+]h-]h/]namej refurihttp://editorconfig.org/uh1j h!j resolvedKubh3 configuration file in the root of the repository: }(h3 configuration file in the root of the repository: h!j hhhANhCNubh literal)}(h``.editorconfig``h]h .editorconfig}(hhh!j/ ubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubhy. With a supported editor, the rules set out in this file can be automatically applied when you are editing files in the }(hy. With a supported editor, the rules set out in this file can be automatically applied when you are editing files in the h!j hhhANhCNubh)}(hj h]h)}(hj h]hTF-A}(hhh!jE ubah"}(h$]h&](h(j j eh+]h-]h/]uh1hhANhCNh!jB ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypej refexplicitrefwarn reftargetj uh1hhAhBhCK:h!j hhubh repository.}(h repository.h!j hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCK h!j hhubj )}(h{Several editors include built-in support for EditorConfig files, and many others support its functionality through plugins.h]h{Several editors include built-in support for EditorConfig files, and many others support its functionality through plugins.}(hjk h!ji hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j hhubj )}(h>Use of the EditorConfig file is suggested but is not required.h]h>Use of the EditorConfig file is suggested but is not required.}(hjy h!jw hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j hhubh target)}(h".. _automatic-compliance-checking:h]h"}(h$]h&]h+]h-]h/]refidautomatic-compliance-checkinguh1j hCK[h!j hhhAj ubeh"}(h$]automatic-editor-configurationah&]h+]automatic editor configurationah-]h/]uh1j h!j hhhAj hCK ubj )}(hhh](j )}(hAutomatic Compliance Checkingh]hAutomatic Compliance Checking}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCKubj )}(hXTo assist with coding style compliance, the project Makefile contains two targets which both utilise the `checkpatch.pl` script that ships with the Linux source tree. The project also defines certain *checkpatch* options in the ``.checkpatch.conf`` file in the top-level directory.h](hiTo assist with coding style compliance, the project Makefile contains two targets which both utilise the }(hiTo assist with coding style compliance, the project Makefile contains two targets which both utilise the h!j hhhANhCNubh title_reference)}(h`checkpatch.pl`h]h checkpatch.pl}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!j ubhP script that ships with the Linux source tree. The project also defines certain }(hP script that ships with the Linux source tree. The project also defines certain h!j hhhANhCNubh emphasis)}(h *checkpatch*h]h checkpatch}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!j ubh options in the }(h options in the h!j hhhANhCNubj. )}(h``.checkpatch.conf``h]h.checkpatch.conf}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubh! file in the top-level directory.}(h! file in the top-level directory.h!j hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j hhubh note)}(hCheckpatch errors will gate upstream merging of pull requests. Checkpatch warnings will not gate merging but should be reviewed and fixed if possible.h]j )}(hCheckpatch errors will gate upstream merging of pull requests. Checkpatch warnings will not gate merging but should be reviewed and fixed if possible.h]hCheckpatch errors will gate upstream merging of pull requests. Checkpatch warnings will not gate merging but should be reviewed and fixed if possible.}(hj h!j ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCK!h!j ubah"}(h$]h&]h+]h-]h/]uh1j h!j hhhAj hCNubj )}(hXfTo check the entire source tree, you must first download copies of ``checkpatch.pl``, ``spelling.txt`` and ``const_structs.checkpatch`` available in the `Linux master tree`_ *scripts* directory, then set the ``CHECKPATCH`` environment variable to point to ``checkpatch.pl`` (with the other 2 files in the same directory) and build the `checkcodebase` target:h](hCTo check the entire source tree, you must first download copies of }(hCTo check the entire source tree, you must first download copies of h!j hhhANhCNubj. )}(h``checkpatch.pl``h]h checkpatch.pl}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubh, }(h, h!j hhhANhCNubj. )}(h``spelling.txt``h]h spelling.txt}(hhh!j. ubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubh and }(h and h!j hhhANhCNubj. )}(h``const_structs.checkpatch``h]hconst_structs.checkpatch}(hhh!jA ubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubh available in the }(h available in the h!j hhhANhCNubj )}(h`Linux master tree`_h]hLinux master tree}(hLinux master treeh!jT ubah"}(h$]h&]h+]h-]h/]nameLinux master treej% Hhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/uh1j h!j j' Kubh }(h h!j hhhANhCNubj )}(h *scripts*h]hscripts}(hhh!jk ubah"}(h$]h&]h+]h-]h/]uh1j h!j ubh directory, then set the }(h directory, then set the h!j hhhANhCNubj. )}(h``CHECKPATCH``h]h CHECKPATCH}(hhh!j~ ubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubh" environment variable to point to }(h" environment variable to point to h!j hhhANhCNubj. )}(h``checkpatch.pl``h]h checkpatch.pl}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubh> (with the other 2 files in the same directory) and build the }(h> (with the other 2 files in the same directory) and build the h!j hhhANhCNubj )}(h`checkcodebase`h]h checkcodebase}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!j ubh target:}(h target:h!j hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCK%h!j hhubh literal_block)}(hImake CHECKPATCH=/linux/scripts/checkpatch.pl checkcodebaseh]hImake CHECKPATCH=/linux/scripts/checkpatch.pl checkcodebase}(hhh!j ubah"}(h$]h&]h+]h-]h/]forcehighlight_args} xml:spacepreservelanguageshelluh1j hAj hCK+h!j hhubj )}(hfTo just check the style on the files that differ between your local branch and the remote master, use:h]hfTo just check the style on the files that differ between your local branch and the remote master, use:}(hj h!j hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCK/h!j hhubj )}(hFmake CHECKPATCH=/linux/scripts/checkpatch.pl checkpatchh]hFmake CHECKPATCH=/linux/scripts/checkpatch.pl checkpatch}(hhh!j ubah"}(h$]h&]h+]h-]h/]forcehighlight_args}j j j shelluh1j hAj hCK2h!j hhubj )}(hIf you wish to check your patch against something other than the remote master, set the ``BASE_COMMIT`` variable to your desired branch. By default, ``BASE_COMMIT`` is set to ``origin/master``.h](hXIf you wish to check your patch against something other than the remote master, set the }(hXIf you wish to check your patch against something other than the remote master, set the h!j hhhANhCNubj. )}(h``BASE_COMMIT``h]h BASE_COMMIT}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubh. variable to your desired branch. By default, }(h. variable to your desired branch. By default, h!j hhhANhCNubj. )}(h``BASE_COMMIT``h]h BASE_COMMIT}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubh is set to }(h is set to h!j hhhANhCNubj. )}(h``origin/master``h]h origin/master}(hhh!j#ubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubh.}(hj h!j hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCK6h!j hhubj )}(hhh](j )}(hIgnored Checkpatch Warningsh]hIgnored Checkpatch Warnings}(hj@h!j>hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j;hhhAj hCK;ubj )}(hTSome checkpatch warnings in the TF codebase are deliberately ignored. These include:h]hTSome checkpatch warnings in the TF codebase are deliberately ignored. These include:}(hjNh!jLhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCK=h!j;hhubh bullet_list)}(hhh](h list_item)}(h``**WARNING: line over 80 characters**``: Although the codebase should generally conform to the 80 character limit this is overly restrictive in some cases. h]j )}(h``**WARNING: line over 80 characters**``: Although the codebase should generally conform to the 80 character limit this is overly restrictive in some cases.h](j. )}(h(``**WARNING: line over 80 characters**``h]h$**WARNING: line over 80 characters**}(hhh!jiubah"}(h$]h&]h+]h-]h/]uh1j- h!jeubht: Although the codebase should generally conform to the 80 character limit this is overly restrictive in some cases.}(ht: Although the codebase should generally conform to the 80 character limit this is overly restrictive in some cases.h!jeubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCK@h!jaubah"}(h$]h&]h+]h-]h/]uh1j_h!j\hhhAj hCNubj`)}(h``**WARNING: Use of volatile is usually wrong``: see `Why the “volatile” type class should not be used`_ . Although this document contains some very useful information, there are several legimate uses of the volatile keyword within the TF codebase. h]j )}(h``**WARNING: Use of volatile is usually wrong``: see `Why the “volatile” type class should not be used`_ . Although this document contains some very useful information, there are several legimate uses of the volatile keyword within the TF codebase.h](j. )}(h/``**WARNING: Use of volatile is usually wrong``h]h+**WARNING: Use of volatile is usually wrong}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh: see }(h: see h!jubj )}(h7`Why the “volatile” type class should not be used`_h]h4Why the “volatile” type class should not be used}(h4Why the “volatile” type class should not be usedh!jubah"}(h$]h&]h+]h-]h/]name4Why the “volatile” type class should not be usedj% Ohttps://www.kernel.org/doc/html/latest/process/volatile-considered-harmful.htmluh1j h!jj' Kubh . Although this document contains some very useful information, there are several legimate uses of the volatile keyword within the TF codebase.}(h . Although this document contains some very useful information, there are several legimate uses of the volatile keyword within the TF codebase.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKDh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!j\hhhAj hCNubeh"}(h$]h&]h+]h-]h/]bullet-uh1jZhAj hCK@h!j;hhubeh"}(h$]ignored-checkpatch-warningsah&]h+]ignored checkpatch warningsah-]h/]uh1j h!j hhhAj hCK;ubeh"}(h$](j id1eh&]h+](automatic compliance checkingautomatic-compliance-checkingeh-]h/]uh1j h!j hhhAj hCKexpect_referenced_by_name}jj sexpect_referenced_by_id}j j subj )}(hhh](j )}(hPerformance considerationsh]hPerformance considerations}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCKJubj )}(hhh](j )}(h#Avoid printf and use logging macrosh]h#Avoid printf and use logging macros}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCKMubj )}(hX``debug.h`` provides logging macros (for example, ``WARN`` and ``ERROR``) which wrap ``tf_log`` and which allow the logging call to be compiled-out depending on the ``make`` command. Use these macros to avoid print statements being compiled unconditionally into the binary.h](j. )}(h ``debug.h``h]hdebug.h}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh' provides logging macros (for example, }(h' provides logging macros (for example, h!jhhhANhCNubj. )}(h``WARN``h]hWARN}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh and }(h and h!jhhhANhCNubj. )}(h ``ERROR``h]hERROR}(hhh!j/ubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh ) which wrap }(h ) which wrap h!jhhhANhCNubj. )}(h ``tf_log``h]htf_log}(hhh!jBubah"}(h$]h&]h+]h-]h/]uh1j- h!jubhF and which allow the logging call to be compiled-out depending on the }(hF and which allow the logging call to be compiled-out depending on the h!jhhhANhCNubj. )}(h``make``h]hmake}(hhh!jUubah"}(h$]h&]h+]h-]h/]uh1j- h!jubhd command. Use these macros to avoid print statements being compiled unconditionally into the binary.}(hd command. Use these macros to avoid print statements being compiled unconditionally into the binary.h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKOh!jhhubj )}(h-Each logging macro has a numerical log level:h]h-Each logging macro has a numerical log level:}(hjph!jnhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKTh!jhhubj )}(h#define LOG_LEVEL_NONE 0 #define LOG_LEVEL_ERROR 10 #define LOG_LEVEL_NOTICE 20 #define LOG_LEVEL_WARNING 30 #define LOG_LEVEL_INFO 40 #define LOG_LEVEL_VERBOSE 50h]h#define LOG_LEVEL_NONE 0 #define LOG_LEVEL_ERROR 10 #define LOG_LEVEL_NOTICE 20 #define LOG_LEVEL_WARNING 30 #define LOG_LEVEL_INFO 40 #define LOG_LEVEL_VERBOSE 50}(hhh!j|ubah"}(h$]h&]h+]h-]h/]forcehighlight_args}j j j cuh1j hAj hCKVh!jhhubj )}(hXZBy default, all logging statements with a log level ``<= LOG_LEVEL_INFO`` will be compiled into debug builds and all statements with a log level ``<= LOG_LEVEL_NOTICE`` will be compiled into release builds. This can be overridden from the command line or by the platform makefile (although it may be necessary to clean the build directory first).h](h4By default, all logging statements with a log level }(h4By default, all logging statements with a log level h!jhhhANhCNubj. )}(h``<= LOG_LEVEL_INFO``h]h<= LOG_LEVEL_INFO}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubhH will be compiled into debug builds and all statements with a log level }(hH will be compiled into debug builds and all statements with a log level h!jhhhANhCNubj. )}(h``<= LOG_LEVEL_NOTICE``h]h<= LOG_LEVEL_NOTICE}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh will be compiled into release builds. This can be overridden from the command line or by the platform makefile (although it may be necessary to clean the build directory first).}(h will be compiled into release builds. This can be overridden from the command line or by the platform makefile (although it may be necessary to clean the build directory first).h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCK_h!jhhubj )}(h2For example, to enable ``VERBOSE`` logging on FVP:h](hFor example, to enable }(hFor example, to enable h!jhhhANhCNubj. )}(h ``VERBOSE``h]hVERBOSE}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh logging on FVP:}(h logging on FVP:h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKeh!jhhubj )}(hmake PLAT=fvp LOG_LEVEL=50 allh]hmake PLAT=fvp LOG_LEVEL=50 all}(hhh!jubah"}(h$]h&]h+]h-]h/]forcehighlight_args}j j j shelluh1j hAj hCKgh!jhhubeh"}(h$]#avoid-printf-and-use-logging-macrosah&]h+]#avoid printf and use logging macrosah-]h/]uh1j h!jhhhAj hCKMubj )}(hhh](j )}(hUse const data where possibleh]hUse const data where possible}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCKlubj )}(h For example, the following code:h]h For example, the following code:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKnh!jhhubj )}(hstruct my_struct { int arg1; int arg2; }; void init(struct my_struct *ptr); void main(void) { struct my_struct x; x.arg1 = 1; x.arg2 = 2; init(&x); }h]hstruct my_struct { int arg1; int arg2; }; void init(struct my_struct *ptr); void main(void) { struct my_struct x; x.arg1 = 1; x.arg2 = 2; init(&x); }}(hhh!jubah"}(h$]h&]h+]h-]h/]forcehighlight_args}j j j juh1j hAj hCKph!jhhubj )}(his better written as:h]his better written as:}(hj1h!j/hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jhhubj )}(hstruct my_struct { int arg1; int arg2; }; void init(const struct my_struct *ptr); void main(void) { const struct my_struct x = { 1, 2 }; init(&x); }h]hstruct my_struct { int arg1; int arg2; }; void init(const struct my_struct *ptr); void main(void) { const struct my_struct x = { 1, 2 }; init(&x); }}(hhh!j=ubah"}(h$]h&]h+]h-]h/]forcehighlight_args}j j j juh1j hAj hCKh!jhhubj )}(hX3This allows the linker to put the data in a read-only data section instead of a writeable data section, which may result in a smaller and faster binary. Note that this may require dependent functions (``init()`` in the above example) to have ``const`` arguments, assuming they don't need to modify the data.h](hThis allows the linker to put the data in a read-only data section instead of a writeable data section, which may result in a smaller and faster binary. Note that this may require dependent functions (}(hThis allows the linker to put the data in a read-only data section instead of a writeable data section, which may result in a smaller and faster binary. Note that this may require dependent functions (h!jNhhhANhCNubj. )}(h ``init()``h]hinit()}(hhh!jWubah"}(h$]h&]h+]h-]h/]uh1j- h!jNubh in the above example) to have }(h in the above example) to have h!jNhhhANhCNubj. )}(h ``const``h]hconst}(hhh!jjubah"}(h$]h&]h+]h-]h/]uh1j- h!jNubh: arguments, assuming they don’t need to modify the data.}(h8 arguments, assuming they don't need to modify the data.h!jNhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jhhubeh"}(h$]use-const-data-where-possibleah&]h+]use const data where possibleah-]h/]uh1j h!jhhhAj hCKlubeh"}(h$]performance-considerationsah&]h+]performance considerationsah-]h/]uh1j h!j hhhAj hCKJubj )}(hhh](j )}(h9Libc functions that are banned or to be used with cautionh]h9Libc functions that are banned or to be used with caution}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCKubj )}(hBelow is a list of functions that present security risks and either must not be used (Banned) or are discouraged from use and must be used with care (Caution).h]hBelow is a list of functions that present security risks and either must not be used (Banned) or are discouraged from use and must be used with care (Caution).}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jhhubh table)}(hhh]h tgroup)}(hhh](h colspec)}(hhh]h"}(h$]h&]h+]h-]h/]colwidthKuh1jh!jubj)}(hhh]h"}(h$]h&]h+]h-]h/]colwidthK uh1jh!jubj)}(hhh]h"}(h$]h&]h+]h-]h/]colwidthK&uh1jh!jubh thead)}(hhh]h row)}(hhh](h entry)}(hhh]j )}(h libc functionh]h libc function}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(hStatush]hStatus}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(hCommentsh]hComments}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubeh"}(h$]h&]h+]h-]h/]uh1jh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubh tbody)}(hhh](j)}(hhh](j)}(hhh]j )}(h``strcpy, wcscpy``, ``strncpy``h](j. )}(h``strcpy, wcscpy``h]hstrcpy, wcscpy}(hhh!jHubah"}(h$]h&]h+]h-]h/]uh1j- h!jDubh, }(h, h!jDubj. )}(h ``strncpy``h]hstrncpy}(hhh!j[ubah"}(h$]h&]h+]h-]h/]uh1j- h!jDubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jAubah"}(h$]h&]h+]h-]h/]uh1jh!j>ubj)}(hhh]j )}(hBannedh]hBanned}(hjzh!jxubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!juubah"}(h$]h&]h+]h-]h/]uh1jh!j>ubj)}(hhh]j )}(huse strlcpy insteadh]huse strlcpy instead}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!j>ubeh"}(h$]h&]h+]h-]h/]uh1jh!j;ubj)}(hhh](j)}(hhh]j )}(h``strcat, wcscat``, ``strncat``h](j. )}(h``strcat, wcscat``h]hstrcat, wcscat}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh, }(h, h!jubj. )}(h ``strncat``h]hstrncat}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(hBannedh]hBanned}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(huse strlcat insteadh]huse strlcat instead}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubeh"}(h$]h&]h+]h-]h/]uh1jh!j;ubj)}(hhh](j)}(hhh]j )}(h``sprintf, vsprintf``h]j. )}(hjh]hsprintf, vsprintf}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(hBannedh]hBanned}(hj<h!j:ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j7ubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(huse snprintf, vsnprintf insteadh]huse snprintf, vsnprintf instead}(hjSh!jQubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jNubah"}(h$]h&]h+]h-]h/]uh1jh!jubeh"}(h$]h&]h+]h-]h/]uh1jh!j;ubj)}(hhh](j)}(hhh]j )}(h ``snprintf``h]j. )}(hjsh]hsnprintf}(hhh!juubah"}(h$]h&]h+]h-]h/]uh1j- h!jqubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jnubah"}(h$]h&]h+]h-]h/]uh1jh!jkubj)}(hhh]j )}(hCautionh]hCaution}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jkubj)}(hhh]j )}(h?ensure result fits in buffer i.e : snprintf(buf,size...) < sizeh]h?ensure result fits in buffer i.e : snprintf(buf,size…) < size}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jkubeh"}(h$]h&]h+]h-]h/]uh1jh!j;ubj)}(hhh](j)}(hhh]j )}(h ``vsnprintf``h]j. )}(hjh]h vsnprintf}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(hCautionh]hCaution}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(h6inspect va_list match types specified in format stringh]h6inspect va_list match types specified in format string}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubeh"}(h$]h&]h+]h-]h/]uh1jh!j;ubj)}(hhh](j)}(hhh]j )}(h ``strtok``h]j. )}(hj!h]hstrtok}(hhh!j#ubah"}(h$]h&]h+]h-]h/]uh1j- h!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(hBannedh]hBanned}(hjAh!j?ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j<ubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(huse strtok_r or strsep insteadh]huse strtok_r or strsep instead}(hjXh!jVubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jSubah"}(h$]h&]h+]h-]h/]uh1jh!jubeh"}(h$]h&]h+]h-]h/]uh1jh!j;ubj)}(hhh](j)}(hhh]j )}(h``strtok_r, strsep``h]j. )}(hjxh]hstrtok_r, strsep}(hhh!jzubah"}(h$]h&]h+]h-]h/]uh1j- h!jvubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jsubah"}(h$]h&]h+]h-]h/]uh1jh!jpubj)}(hhh]j )}(hCautionh]hCaution}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jpubj)}(hhh]j )}(h#inspect for terminated input bufferh]h#inspect for terminated input buffer}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jpubeh"}(h$]h&]h+]h-]h/]uh1jh!j;ubj)}(hhh](j)}(hhh]j )}(h``ato*``h]j. )}(hjh]hato*}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(hBannedh]hBanned}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(huse equivalent strto* functionsh]huse equivalent strto* functions}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jubeh"}(h$]h&]h+]h-]h/]uh1jh!j;ubj)}(hhh](j)}(hhh]j )}(h``*toa``h]j. )}(hj&h]h*toa}(hhh!j(ubah"}(h$]h&]h+]h-]h/]uh1j- h!j$ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!j!ubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(hBannedh]hBanned}(hjFh!jDubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jAubah"}(h$]h&]h+]h-]h/]uh1jh!jubj)}(hhh]j )}(hUse snprintf insteadh]hUse snprintf instead}(hj]h!j[ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jXubah"}(h$]h&]h+]h-]h/]uh1jh!jubeh"}(h$]h&]h+]h-]h/]uh1jh!j;ubeh"}(h$]h&]h+]h-]h/]uh1j9h!jubeh"}(h$]h&]h+]h-]h/]colsKuh1jh!jubah"}(h$]h&]h+]h-]h/]uh1jh!jhhhAj hCNubj )}(hNThe `libc` component in the codebase will not add support for the banned APIs.h](hThe }(hThe h!jhhhANhCNubj )}(h`libc`h]hlibc}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubhD component in the codebase will not add support for the banned APIs.}(hD component in the codebase will not add support for the banned APIs.h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jhhubeh"}(h$]9libc-functions-that-are-banned-or-to-be-used-with-cautionah&]h+]9libc functions that are banned or to be used with cautionah-]h/]uh1j h!j hhhAj hCKubj )}(hhh](j )}(hError handling and robustnessh]hError handling and robustness}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCKubj )}(hhh](j )}(h3Using CASSERT to check for compile time data errorsh]h3Using CASSERT to check for compile time data errors}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCKubj )}(hWhere possible, use the ``CASSERT`` macro to check the validity of data known at compile time instead of checking validity at runtime, to avoid unnecessary runtime code.h](hWhere possible, use the }(hWhere possible, use the h!jhhhANhCNubj. )}(h ``CASSERT``h]hCASSERT}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh macro to check the validity of data known at compile time instead of checking validity at runtime, to avoid unnecessary runtime code.}(h macro to check the validity of data known at compile time instead of checking validity at runtime, to avoid unnecessary runtime code.h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jhhubj )}(huFor example, this can be used to check that the assembler's and compiler's views of the size of an array is the same.h]hyFor example, this can be used to check that the assembler’s and compiler’s views of the size of an array is the same.}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jhhubj )}(h#include define MY_STRUCT_SIZE 8 /* Used by assembler source files */ struct my_struct { uint32_t arg1; uint32_t arg2; }; CASSERT(MY_STRUCT_SIZE == sizeof(struct my_struct), assert_my_struct_size_mismatch);h]h#include define MY_STRUCT_SIZE 8 /* Used by assembler source files */ struct my_struct { uint32_t arg1; uint32_t arg2; }; CASSERT(MY_STRUCT_SIZE == sizeof(struct my_struct), assert_my_struct_size_mismatch);}(hhh!jubah"}(h$]h&]h+]h-]h/]forcehighlight_args}j j j juh1j hAj hCKh!jhhubj )}(hfIf ``MY_STRUCT_SIZE`` in the above example were wrong then the compiler would emit an error like this:h](hIf }(hIf h!jhhhANhCNubj. )}(h``MY_STRUCT_SIZE``h]hMY_STRUCT_SIZE}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubhQ in the above example were wrong then the compiler would emit an error like this:}(hQ in the above example were wrong then the compiler would emit an error like this:h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jhhubj )}(hWmy_struct.h:10:1: error: size of array ‘assert_my_struct_size_mismatch’ is negativeh]hWmy_struct.h:10:1: error: size of array ‘assert_my_struct_size_mismatch’ is negative}(hhh!j7ubah"}(h$]h&]h+]h-]h/]j j uh1j hAj hCKh!jhhubeh"}(h$]3using-cassert-to-check-for-compile-time-data-errorsah&]h+]3using cassert to check for compile time data errorsah-]h/]uh1j h!jhhhAj hCKubj )}(hhh](j )}(h.Using assert() to check for programming errorsh]h.Using assert() to check for programming errors}(hjRh!jPhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jMhhhAj hCKubj )}(hX~In general, each secure world TF image (BL1, BL2, BL31 and BL32) should be treated as a tightly integrated package; the image builder should be aware of and responsible for all functionality within the image, even if code within that image is provided by multiple entities. This allows us to be more aggressive in interpreting invalid state or bad function arguments as programming errors using ``assert()``, including arguments passed across platform porting interfaces. This is in contrast to code in a Linux environment, which is less tightly integrated and may attempt to be more defensive by passing the error back up the call stack.h](hXIn general, each secure world TF image (BL1, BL2, BL31 and BL32) should be treated as a tightly integrated package; the image builder should be aware of and responsible for all functionality within the image, even if code within that image is provided by multiple entities. This allows us to be more aggressive in interpreting invalid state or bad function arguments as programming errors using }(hXIn general, each secure world TF image (BL1, BL2, BL31 and BL32) should be treated as a tightly integrated package; the image builder should be aware of and responsible for all functionality within the image, even if code within that image is provided by multiple entities. This allows us to be more aggressive in interpreting invalid state or bad function arguments as programming errors using h!j^hhhANhCNubj. )}(h ``assert()``h]hassert()}(hhh!jgubah"}(h$]h&]h+]h-]h/]uh1j- h!j^ubh, including arguments passed across platform porting interfaces. This is in contrast to code in a Linux environment, which is less tightly integrated and may attempt to be more defensive by passing the error back up the call stack.}(h, including arguments passed across platform porting interfaces. This is in contrast to code in a Linux environment, which is less tightly integrated and may attempt to be more defensive by passing the error back up the call stack.h!j^hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jMhhubj )}(hXWhere possible, badly written TF code should fail early using ``assert()``. This helps reduce the amount of untested conditional code. By default these statements are not compiled into release builds, although this can be overridden using the ``ENABLE_ASSERTIONS`` build flag.h](h>Where possible, badly written TF code should fail early using }(h>Where possible, badly written TF code should fail early using h!jhhhANhCNubj. )}(h ``assert()``h]hassert()}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh. This helps reduce the amount of untested conditional code. By default these statements are not compiled into release builds, although this can be overridden using the }(h. This helps reduce the amount of untested conditional code. By default these statements are not compiled into release builds, although this can be overridden using the h!jhhhANhCNubj. )}(h``ENABLE_ASSERTIONS``h]hENABLE_ASSERTIONS}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh build flag.}(h build flag.h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jMhhubj )}(h Examples:h]h Examples:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jMhhubj[)}(hhh](j`)}(h)Bad argument supplied to library functionh]j )}(hjh]h)Bad argument supplied to library function}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(h2Bad argument provided by platform porting functionh]j )}(hjh]h2Bad argument provided by platform porting function}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(h3Internal secure world image state is inconsistent h]j )}(h1Internal secure world image state is inconsistenth]h1Internal secure world image state is inconsistent}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubeh"}(h$]h&]h+]h-]h/]jjuh1jZhAj hCKh!jMhhubeh"}(h$],using-assert-to-check-for-programming-errorsah&]h+].using assert() to check for programming errorsah-]h/]uh1j h!jhhhAj hCKubj )}(hhh](j )}(hHandling integration errorsh]hHandling integration errors}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCKubj )}(hEach secure world image may be provided by a different entity (for example, a Trusted Boot vendor may provide the BL2 image, a TEE vendor may provide the BL32 image and the OEM/SoC vendor may provide the other images).h]hEach secure world image may be provided by a different entity (for example, a Trusted Boot vendor may provide the BL2 image, a TEE vendor may provide the BL32 image and the OEM/SoC vendor may provide the other images).}(hj-h!j+hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jhhubj )}(hXAn image may contain bugs that are only visible when the images are integrated. The system integrator may not even have access to the debug variants of all the images in order to check if asserts are firing. For example, the release variant of BL1 may have already been burnt into the SoC. Therefore, TF code that detects an integration error should _not_ consider this a programming error, and should always take action, even in release builds.h]hXAn image may contain bugs that are only visible when the images are integrated. The system integrator may not even have access to the debug variants of all the images in order to check if asserts are firing. For example, the release variant of BL1 may have already been burnt into the SoC. Therefore, TF code that detects an integration error should _not_ consider this a programming error, and should always take action, even in release builds.}(hj;h!j9hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCKh!jhhubj )}(hIf an integration error is considered non-critical it should be treated as a recoverable error. If the error is considered critical it should be treated as an unexpected unrecoverable error.h]hIf an integration error is considered non-critical it should be treated as a recoverable error. If the error is considered critical it should be treated as an unexpected unrecoverable error.}(hjIh!jGhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubeh"}(h$]handling-integration-errorsah&]h+]handling integration errorsah-]h/]uh1j h!jhhhAj hCKubj )}(hhh](j )}(hHandling recoverable errorsh]hHandling recoverable errors}(hjbh!j`hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!j]hhhAj hCM ubj )}(hXThe secure world **must not** crash when supplied with bad data from an external source. For example, data from the normal world or a hardware device. Similarly, the secure world **must not** crash if it detects a non-critical problem within itself or the system. It must make every effort to recover from the problem by emitting a ``WARN`` message, performing any necessary error handling and continuing.h](hThe secure world }(hThe secure world h!jnhhhANhCNubh strong)}(h **must not**h]hmust not}(hhh!jyubah"}(h$]h&]h+]h-]h/]uh1jwh!jnubh crash when supplied with bad data from an external source. For example, data from the normal world or a hardware device. Similarly, the secure world }(h crash when supplied with bad data from an external source. For example, data from the normal world or a hardware device. Similarly, the secure world h!jnhhhANhCNubjx)}(h **must not**h]hmust not}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1jwh!jnubh crash if it detects a non-critical problem within itself or the system. It must make every effort to recover from the problem by emitting a }(h crash if it detects a non-critical problem within itself or the system. It must make every effort to recover from the problem by emitting a h!jnhhhANhCNubj. )}(h``WARN``h]hWARN}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jnubhA message, performing any necessary error handling and continuing.}(hA message, performing any necessary error handling and continuing.h!jnhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCM h!j]hhubj )}(h Examples:h]h Examples:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j]hhubj[)}(hhh](j`)}(h?Secure world receives SMC from normal world with bad arguments.h]j )}(hjh]h?Secure world receives SMC from normal world with bad arguments.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(hBSecure world receives SMC from normal world at an unexpected time.h]j )}(hjh]hBSecure world receives SMC from normal world at an unexpected time.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(h/BL31 receives SMC from BL32 with bad arguments.h]j )}(hjh]h/BL31 receives SMC from BL32 with bad arguments.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(h/BL31 receives SMC from BL32 at unexpected time.h]j )}(hjh]h/BL31 receives SMC from BL32 at unexpected time.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(hcSecure world receives recoverable error from hardware device. Retrying the operation may help here.h]j )}(hcSecure world receives recoverable error from hardware device. Retrying the operation may help here.h]hcSecure world receives recoverable error from hardware device. Retrying the operation may help here.}(hj+h!j)ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j%ubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(h?Non-critical secure world service is not functioning correctly.h]j )}(hj?h]h?Non-critical secure world service is not functioning correctly.}(hj?h!jAubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j=ubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(hFBL31 SPD discovers minor configuration problem with corresponding SP. h]j )}(hEBL31 SPD discovers minor configuration problem with corresponding SP.h]hEBL31 SPD discovers minor configuration problem with corresponding SP.}(hjZh!jXubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jTubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubeh"}(h$]h&]h+]h-]h/]jjuh1jZhAj hCMh!j]hhubeh"}(h$]handling-recoverable-errorsah&]h+]handling recoverable errorsah-]h/]uh1j h!jhhhAj hCM ubj )}(hhh](j )}(hHandling unrecoverable errorsh]hHandling unrecoverable errors}(hjh!j}hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jzhhhAj hCMubj )}(hIn some cases it may not be possible for the secure world to recover from an error. This situation should be handled in one of the following ways:h]hIn some cases it may not be possible for the secure world to recover from an error. This situation should be handled in one of the following ways:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM h!jzhhubh enumerated_list)}(hhh](j`)}(hIf the unrecoverable error is unexpected then emit an ``ERROR`` message and call ``panic()``. This will end up calling the platform-specific function ``plat_panic_handler()``.h]j )}(hIf the unrecoverable error is unexpected then emit an ``ERROR`` message and call ``panic()``. This will end up calling the platform-specific function ``plat_panic_handler()``.h](h6If the unrecoverable error is unexpected then emit an }(h6If the unrecoverable error is unexpected then emit an h!jubj. )}(h ``ERROR``h]hERROR}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh message and call }(h message and call h!jubj. )}(h ``panic()``h]hpanic()}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh:. This will end up calling the platform-specific function }(h:. This will end up calling the platform-specific function h!jubj. )}(h``plat_panic_handler()``h]hplat_panic_handler()}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh.}(hj h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCM#h!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(hIf the unrecoverable error is expected to occur in certain circumstances, then emit an ``ERROR`` message and call the platform-specific function ``plat_error_handler()``. h]j )}(hIf the unrecoverable error is expected to occur in certain circumstances, then emit an ``ERROR`` message and call the platform-specific function ``plat_error_handler()``.h](hWIf the unrecoverable error is expected to occur in certain circumstances, then emit an }(hWIf the unrecoverable error is expected to occur in certain circumstances, then emit an h!jubj. )}(h ``ERROR``h]hERROR}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh1 message and call the platform-specific function }(h1 message and call the platform-specific function h!jubj. )}(h``plat_error_handler()``h]hplat_error_handler()}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh.}(hj h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCM&h!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubeh"}(h$]h&]h+]h-]h/]enumtypearabicprefixhsuffixj uh1jh!jzhhhAj hCM#ubj )}(hX%Cases 1 and 2 are subtly different. A platform may implement ``plat_panic_handler`` and ``plat_error_handler`` in the same way (for example, by waiting for a secure watchdog to time-out or by invoking an interface on the platform's power controller to reset the platform). However, ``plat_error_handler`` may take additional action for some errors (for example, it may set a flag so the platform resets into a different mode). Also, ``plat_panic_handler()`` may implement additional debug functionality (for example, invoking a hardware breakpoint).h](h=Cases 1 and 2 are subtly different. A platform may implement }(h=Cases 1 and 2 are subtly different. A platform may implement h!j7hhhANhCNubj. )}(h``plat_panic_handler``h]hplat_panic_handler}(hhh!j@ubah"}(h$]h&]h+]h-]h/]uh1j- h!j7ubh and }(h and h!j7hhhANhCNubj. )}(h``plat_error_handler``h]hplat_error_handler}(hhh!jSubah"}(h$]h&]h+]h-]h/]uh1j- h!j7ubh in the same way (for example, by waiting for a secure watchdog to time-out or by invoking an interface on the platform’s power controller to reset the platform). However, }(h in the same way (for example, by waiting for a secure watchdog to time-out or by invoking an interface on the platform's power controller to reset the platform). However, h!j7hhhANhCNubj. )}(h``plat_error_handler``h]hplat_error_handler}(hhh!jfubah"}(h$]h&]h+]h-]h/]uh1j- h!j7ubh may take additional action for some errors (for example, it may set a flag so the platform resets into a different mode). Also, }(h may take additional action for some errors (for example, it may set a flag so the platform resets into a different mode). Also, h!j7hhhANhCNubj. )}(h``plat_panic_handler()``h]hplat_panic_handler()}(hhh!jyubah"}(h$]h&]h+]h-]h/]uh1j- h!j7ubh\ may implement additional debug functionality (for example, invoking a hardware breakpoint).}(h\ may implement additional debug functionality (for example, invoking a hardware breakpoint).h!j7hhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCM*h!jzhhubj )}(h,Examples of unexpected unrecoverable errors:h]h,Examples of unexpected unrecoverable errors:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM3h!jzhhubj[)}(hhh](j`)}(hUBL32 receives an unexpected SMC response from BL31 that it is unable to recover from.h]j )}(hUBL32 receives an unexpected SMC response from BL31 that it is unable to recover from.h]hUBL32 receives an unexpected SMC response from BL31 that it is unable to recover from.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM5h!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(hBL31 Trusted OS SPD code discovers that BL2 has not loaded the corresponding Trusted OS, which is critical for platform operation.h]j )}(hBL31 Trusted OS SPD code discovers that BL2 has not loaded the corresponding Trusted OS, which is critical for platform operation.h]hBL31 Trusted OS SPD code discovers that BL2 has not loaded the corresponding Trusted OS, which is critical for platform operation.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM7h!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(h`Secure world discovers that a critical hardware device is an unexpected and unrecoverable state.h]j )}(h`Secure world discovers that a critical hardware device is an unexpected and unrecoverable state.h]h`Secure world discovers that a critical hardware device is an unexpected and unrecoverable state.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM9h!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(h\Secure world receives an unexpected and unrecoverable error from a critical hardware device.h]j )}(h\Secure world receives an unexpected and unrecoverable error from a critical hardware device.h]h\Secure world receives an unexpected and unrecoverable error from a critical hardware device.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM;h!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(hCSecure world discovers that it is running on unsupported hardware. h]j )}(hBSecure world discovers that it is running on unsupported hardware.h]hBSecure world discovers that it is running on unsupported hardware.}(hj h!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM=h!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubeh"}(h$]h&]h+]h-]h/]jjuh1jZhAj hCM5h!jzhhubj )}(h*Examples of expected unrecoverable errors:h]h*Examples of expected unrecoverable errors:}(hj#h!j!hhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCM?h!jzhhubj[)}(hhh](j`)}(hMBL1/BL2 fails to load the next image due to missing/corrupt firmware on disk.h]j )}(hj4h]hMBL1/BL2 fails to load the next image due to missing/corrupt firmware on disk.}(hj4h!j6ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMAh!j2ubah"}(h$]h&]h+]h-]h/]uh1j_h!j/hhhAj hCNubj`)}(hKBL1/BL2 fails to authenticate the next image due to an invalid certificate.h]j )}(hjKh]hKBL1/BL2 fails to authenticate the next image due to an invalid certificate.}(hjKh!jMubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMBh!jIubah"}(h$]h&]h+]h-]h/]uh1j_h!j/hhhAj hCNubj`)}(hSecure world continuously receives recoverable errors from a hardware device but is unable to proceed without a valid response. h]j )}(hSecure world continuously receives recoverable errors from a hardware device but is unable to proceed without a valid response.h]hSecure world continuously receives recoverable errors from a hardware device but is unable to proceed without a valid response.}(hjfh!jdubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMCh!j`ubah"}(h$]h&]h+]h-]h/]uh1j_h!j/hhhAj hCNubeh"}(h$]h&]h+]h-]h/]jjuh1jZhAj hCMAh!jzhhubeh"}(h$]handling-unrecoverable-errorsah&]h+]handling unrecoverable errorsah-]h/]uh1j h!jhhhAj hCMubj )}(hhh](j )}(h"Handling critical unresponsivenessh]h"Handling critical unresponsiveness}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCMGubj )}(hXoIf the secure world is waiting for a response from an external source (for example, the normal world or a hardware device) which is critical for continued operation, it must not wait indefinitely. It must have a mechanism (for example, a secure watchdog) for resetting itself and/or the external source to prevent the system from executing in this state indefinitely.h]hXoIf the secure world is waiting for a response from an external source (for example, the normal world or a hardware device) which is critical for continued operation, it must not wait indefinitely. It must have a mechanism (for example, a secure watchdog) for resetting itself and/or the external source to prevent the system from executing in this state indefinitely.}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMIh!jhhubj )}(h Examples:h]h Examples:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMOh!jhhubj[)}(hhh](j`)}(hwBL1 is waiting for the normal world to raise an SMC to proceed to the next stage of the secure firmware update process.h]j )}(hwBL1 is waiting for the normal world to raise an SMC to proceed to the next stage of the secure firmware update process.h]hwBL1 is waiting for the normal world to raise an SMC to proceed to the next stage of the secure firmware update process.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMQh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(hqA Trusted OS is waiting for a response from a proxy in the normal world that is critical for continued operation.h]j )}(hqA Trusted OS is waiting for a response from a proxy in the normal world that is critical for continued operation.h]hqA Trusted OS is waiting for a response from a proxy in the normal world that is critical for continued operation.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMSh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubj`)}(hZSecure world is waiting for a hardware response that is critical for continued operation. h]j )}(hYSecure world is waiting for a hardware response that is critical for continued operation.h]hYSecure world is waiting for a hardware response that is critical for continued operation.}(hjh!jubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMUh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jhhhAj hCNubeh"}(h$]h&]h+]h-]h/]jjuh1jZhAj hCMQh!jhhubeh"}(h$]"handling-critical-unresponsivenessah&]h+]"handling critical unresponsivenessah-]h/]uh1j h!jhhhAj hCMGubeh"}(h$]error-handling-and-robustnessah&]h+]error handling and robustnessah-]h/]uh1j h!j hhhAj hCKubj )}(hhh](j )}(h)Use of built-in *C* and *libc* data typesh](hUse of built-in }(hUse of built-in h!jhhhANhCNubj )}(h*C*h]hC}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!jubh and }(h and h!jhhhANhCNubj )}(h*libc*h]hlibc}(hhh!j3ubah"}(h$]h&]h+]h-]h/]uh1j h!jubh data types}(h data typesh!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCMYubj )}(hThe |TF-A| 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 type usage guidelines should be followed:h](hThe }(hThe h!jLhhhANhCNubh)}(hj h]h)}(hj h]hTF-A}(hhh!jXubah"}(h$]h&](h(j j eh+]h-]h/]uh1hhANhCNh!jUubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainj reftypej refexplicitrefwarn reftargetj uh1hhAhBhCK:h!jLhhubh 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 type usage guidelines should be followed:}(h 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 type usage guidelines should be followed:h!jLhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCM[h!jhhubj[)}(hhh](j`)}(hXWhere possible, use the built-in *C* data types for variable storage (for example, ``char``, ``int``, ``long long``, etc) instead of the standard *C99* types. Most code is typically only concerned with the minimum size of the data stored, which the built-in *C* types guarantee. h]j )}(hXWhere possible, use the built-in *C* data types for variable storage (for example, ``char``, ``int``, ``long long``, etc) instead of the standard *C99* types. Most code is typically only concerned with the minimum size of the data stored, which the built-in *C* types guarantee.h](h!Where possible, use the built-in }(h!Where possible, use the built-in h!jubj )}(h*C*h]hC}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubh/ data types for variable storage (for example, }(h/ data types for variable storage (for example, h!jubj. )}(h``char``h]hchar}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh, }(h, h!jubj. )}(h``int``h]hint}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh, }(hjh!jubj. )}(h ``long long``h]h long long}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh, etc) instead of the standard }(h, etc) instead of the standard h!jubj )}(h*C99*h]hC99}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubhk types. Most code is typically only concerned with the minimum size of the data stored, which the built-in }(hk types. Most code is typically only concerned with the minimum size of the data stored, which the built-in h!jubj )}(h*C*h]hC}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j h!jubh types guarantee.}(h types guarantee.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCM_h!jubah"}(h$]h&]h+]h-]h/]uh1j_h!j|hhhAj hCNubj`)}(hXAvoid using the exact-size standard *C99* types in general (for example, ``uint16_t``, ``uint32_t``, ``uint64_t``, etc) since they can prevent the compiler from making optimizations. There are legitimate uses for them, for example to represent data of a known structure. When using them in struct definitions, consider how padding in the struct will work across architectures. For example, extra padding may be introduced in |AArch32| systems if a struct member crosses a 32-bit boundary. h]j )}(hXAvoid using the exact-size standard *C99* types in general (for example, ``uint16_t``, ``uint32_t``, ``uint64_t``, etc) since they can prevent the compiler from making optimizations. There are legitimate uses for them, for example to represent data of a known structure. When using them in struct definitions, consider how padding in the struct will work across architectures. For example, extra padding may be introduced in |AArch32| systems if a struct member crosses a 32-bit boundary.h](h$Avoid using the exact-size standard }(h$Avoid using the exact-size standard h!j ubj )}(h*C99*h]hC99}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j h!j ubh types in general (for example, }(h types in general (for example, h!j ubj. )}(h ``uint16_t``h]huint16_t}(hhh!j)ubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubh, }(h, h!j ubj. )}(h ``uint32_t``h]huint32_t}(hhh!j<ubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubh, }(hj;h!j ubj. )}(h ``uint64_t``h]huint64_t}(hhh!jNubah"}(h$]h&]h+]h-]h/]uh1j- h!j ubhX8, etc) since they can prevent the compiler from making optimizations. There are legitimate uses for them, for example to represent data of a known structure. When using them in struct definitions, consider how padding in the struct will work across architectures. For example, extra padding may be introduced in }(hX8, etc) since they can prevent the compiler from making optimizations. There are legitimate uses for them, for example to represent data of a known structure. When using them in struct definitions, consider how padding in the struct will work across architectures. For example, extra padding may be introduced in h!j ubh)}(hhh]h)}(hhh]hAArch32}(hhh!jdubah"}(h$]h&](h(h)h*eh+]h-]h/]uh1hhANhCNh!jaubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainh)reftypeh< refexplicitrefwarn reftargeth@uh1hhAhBhCKh!j ubh6 systems if a struct member crosses a 32-bit boundary.}(h6 systems if a struct member crosses a 32-bit boundary.h!j ubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMdh!j ubah"}(h$]h&]h+]h-]h/]uh1j_h!j|hhhAj hCNubj`)}(hXUse ``int`` as the default integer type - it's likely to be the fastest on all systems. Also this can be assumed to be 32-bit as a consequence of the `Procedure Call Standard for the Arm Architecture`_ and the `Procedure Call Standard for the Arm 64-bit Architecture`_ . h]j )}(hXUse ``int`` as the default integer type - it's likely to be the fastest on all systems. Also this can be assumed to be 32-bit as a consequence of the `Procedure Call Standard for the Arm Architecture`_ and the `Procedure Call Standard for the Arm 64-bit Architecture`_ .h](hUse }(hUse h!jubj. )}(h``int``h]hint}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh as the default integer type - it’s likely to be the fastest on all systems. Also this can be assumed to be 32-bit as a consequence of the }(h as the default integer type - it's likely to be the fastest on all systems. Also this can be assumed to be 32-bit as a consequence of the h!jubj )}(h3`Procedure Call Standard for the Arm Architecture`_h]h0Procedure Call Standard for the Arm Architecture}(h0Procedure Call Standard for the Arm Architectureh!jubah"}(h$]h&]h+]h-]h/]name0Procedure Call Standard for the Arm Architecturej% .https://developer.arm.com/docs/ihi0042/latest/uh1j h!jj' Kubh and the }(h and the h!jubj )}(h:`Procedure Call Standard for the Arm 64-bit Architecture`_h]h7Procedure Call Standard for the Arm 64-bit Architecture}(h7Procedure Call Standard for the Arm 64-bit Architectureh!jubah"}(h$]h&]h+]h-]h/]name7Procedure Call Standard for the Arm 64-bit Architecturej% .https://developer.arm.com/docs/ihi0055/latest/uh1j h!jj' Kubh .}(h .h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMlh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!j|hhhAj hCNubj`)}(hAvoid use of ``short`` as this may end up being slower than ``int`` in some systems. If a variable must be exactly 16-bit, use ``int16_t`` or ``uint16_t``. h]j )}(hAvoid use of ``short`` as this may end up being slower than ``int`` in some systems. If a variable must be exactly 16-bit, use ``int16_t`` or ``uint16_t``.h](h Avoid use of }(h Avoid use of h!jubj. )}(h ``short``h]hshort}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh& as this may end up being slower than }(h& as this may end up being slower than h!jubj. )}(h``int``h]hint}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh< in some systems. If a variable must be exactly 16-bit, use }(h< in some systems. If a variable must be exactly 16-bit, use h!jubj. )}(h ``int16_t``h]hint16_t}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh or }(h or h!jubj. )}(h ``uint16_t``h]huint16_t}(hhh!j.ubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh.}(hj h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMqh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!j|hhhAj hCNubj`)}(hAvoid use of ``long``. This is guaranteed to be at least 32-bit but, given that `int` is 32-bit on Arm platforms, there is no use for it. For integers of at least 64-bit, use ``long long``. h]j )}(hAvoid use of ``long``. This is guaranteed to be at least 32-bit but, given that `int` is 32-bit on Arm platforms, there is no use for it. For integers of at least 64-bit, use ``long long``.h](h Avoid use of }(h Avoid use of h!jPubj. )}(h``long``h]hlong}(hhh!jYubah"}(h$]h&]h+]h-]h/]uh1j- h!jPubh;. This is guaranteed to be at least 32-bit but, given that }(h;. This is guaranteed to be at least 32-bit but, given that h!jPubj )}(h`int`h]hint}(hhh!jlubah"}(h$]h&]h+]h-]h/]uh1j h!jPubhZ is 32-bit on Arm platforms, there is no use for it. For integers of at least 64-bit, use }(hZ is 32-bit on Arm platforms, there is no use for it. For integers of at least 64-bit, use h!jPubj. )}(h ``long long``h]h long long}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jPubh.}(hj h!jPubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMuh!jLubah"}(h$]h&]h+]h-]h/]uh1j_h!j|hhhAj hCNubj`)}(hMUse ``char`` for storing text. Use ``uint8_t`` for storing other 8-bit data. h]j )}(hLUse ``char`` for storing text. Use ``uint8_t`` for storing other 8-bit data.h](hUse }(hUse h!jubj. )}(h``char``h]hchar}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh for storing text. Use }(h for storing text. Use h!jubj. )}(h ``uint8_t``h]huint8_t}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh for storing other 8-bit data.}(h for storing other 8-bit data.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMyh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!j|hhhAj hCNubj`)}(hXUse ``unsigned`` for integers that can never be negative (counts, indices, sizes, etc). TF intends to comply with MISRA "essential type" coding rules (10.X), where signed and unsigned types are considered different essential types. Choosing the correct type will aid this. MISRA static analysers will pick up any implicit signed/unsigned conversions that may lead to unexpected behaviour. h]j )}(hXUse ``unsigned`` for integers that can never be negative (counts, indices, sizes, etc). TF intends to comply with MISRA "essential type" coding rules (10.X), where signed and unsigned types are considered different essential types. Choosing the correct type will aid this. MISRA static analysers will pick up any implicit signed/unsigned conversions that may lead to unexpected behaviour.h](hUse }(hUse h!jubj. )}(h ``unsigned``h]hunsigned}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubhXx for integers that can never be negative (counts, indices, sizes, etc). TF intends to comply with MISRA “essential type” coding rules (10.X), where signed and unsigned types are considered different essential types. Choosing the correct type will aid this. MISRA static analysers will pick up any implicit signed/unsigned conversions that may lead to unexpected behaviour.}(hXt for integers that can never be negative (counts, indices, sizes, etc). TF intends to comply with MISRA "essential type" coding rules (10.X), where signed and unsigned types are considered different essential types. Choosing the correct type will aid this. MISRA static analysers will pick up any implicit signed/unsigned conversions that may lead to unexpected behaviour.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCM{h!jubah"}(h$]h&]h+]h-]h/]uh1j_h!j|hhhAj hCNubj`)}(hXFor pointer types: - If an argument in a function declaration is pointing to a known type then simply use a pointer to that type (for example: ``struct my_struct *``). - If a variable (including an argument in a function declaration) is pointing to a general, memory-mapped address, an array of pointers or another structure that is likely to require pointer arithmetic then use ``uintptr_t``. This will reduce the amount of casting required in the code. Avoid using ``unsigned long`` or ``unsigned long long`` for this purpose; it may work but is less portable. - For other pointer arguments in a function declaration, use ``void *``. This includes pointers to types that are abstracted away from the known API and pointers to arbitrary data. This allows the calling function to pass a pointer argument to the function without any explicit casting (the cast to ``void *`` is implicit). The function implementation can then do the appropriate casting to a specific type. - Avoid pointer arithmetic generally (as this violates MISRA C 2012 rule 18.4) and especially on void pointers (as this is only supported via language extensions and is considered non-standard). In TF-A, setting the ``W`` build flag to ``W=3`` enables the *-Wpointer-arith* compiler flag and this will emit warnings where pointer arithmetic is used. - Use ``ptrdiff_t`` to compare the difference between 2 pointers. h](j )}(hFor pointer types:h]hFor pointer types:}(hjh!j ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubj[)}(hhh](j`)}(hIf an argument in a function declaration is pointing to a known type then simply use a pointer to that type (for example: ``struct my_struct *``). h]j )}(hIf an argument in a function declaration is pointing to a known type then simply use a pointer to that type (for example: ``struct my_struct *``).h](hzIf an argument in a function declaration is pointing to a known type then simply use a pointer to that type (for example: }(hzIf an argument in a function declaration is pointing to a known type then simply use a pointer to that type (for example: h!j!ubj. )}(h``struct my_struct *``h]hstruct my_struct *}(hhh!j*ubah"}(h$]h&]h+]h-]h/]uh1j- h!j!ubh).}(h).h!j!ubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jubj`)}(hXIf a variable (including an argument in a function declaration) is pointing to a general, memory-mapped address, an array of pointers or another structure that is likely to require pointer arithmetic then use ``uintptr_t``. This will reduce the amount of casting required in the code. Avoid using ``unsigned long`` or ``unsigned long long`` for this purpose; it may work but is less portable. h]j )}(hXIf a variable (including an argument in a function declaration) is pointing to a general, memory-mapped address, an array of pointers or another structure that is likely to require pointer arithmetic then use ``uintptr_t``. This will reduce the amount of casting required in the code. Avoid using ``unsigned long`` or ``unsigned long long`` for this purpose; it may work but is less portable.h](hIf a variable (including an argument in a function declaration) is pointing to a general, memory-mapped address, an array of pointers or another structure that is likely to require pointer arithmetic then use }(hIf a variable (including an argument in a function declaration) is pointing to a general, memory-mapped address, an array of pointers or another structure that is likely to require pointer arithmetic then use h!jMubj. )}(h ``uintptr_t``h]h uintptr_t}(hhh!jVubah"}(h$]h&]h+]h-]h/]uh1j- h!jMubhK. This will reduce the amount of casting required in the code. Avoid using }(hK. This will reduce the amount of casting required in the code. Avoid using h!jMubj. )}(h``unsigned long``h]h unsigned long}(hhh!jiubah"}(h$]h&]h+]h-]h/]uh1j- h!jMubh or }(h or h!jMubj. )}(h``unsigned long long``h]hunsigned long long}(hhh!j|ubah"}(h$]h&]h+]h-]h/]uh1j- h!jMubh4 for this purpose; it may work but is less portable.}(h4 for this purpose; it may work but is less portable.h!jMubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jIubah"}(h$]h&]h+]h-]h/]uh1j_h!jubj`)}(hXFor other pointer arguments in a function declaration, use ``void *``. This includes pointers to types that are abstracted away from the known API and pointers to arbitrary data. This allows the calling function to pass a pointer argument to the function without any explicit casting (the cast to ``void *`` is implicit). The function implementation can then do the appropriate casting to a specific type. h]j )}(hXFor other pointer arguments in a function declaration, use ``void *``. This includes pointers to types that are abstracted away from the known API and pointers to arbitrary data. This allows the calling function to pass a pointer argument to the function without any explicit casting (the cast to ``void *`` is implicit). The function implementation can then do the appropriate casting to a specific type.h](h;For other pointer arguments in a function declaration, use }(h;For other pointer arguments in a function declaration, use h!jubj. )}(h ``void *``h]hvoid *}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh. This includes pointers to types that are abstracted away from the known API and pointers to arbitrary data. This allows the calling function to pass a pointer argument to the function without any explicit casting (the cast to }(h. This includes pointers to types that are abstracted away from the known API and pointers to arbitrary data. This allows the calling function to pass a pointer argument to the function without any explicit casting (the cast to h!jubj. )}(h ``void *``h]hvoid *}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubhb is implicit). The function implementation can then do the appropriate casting to a specific type.}(hb is implicit). The function implementation can then do the appropriate casting to a specific type.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jubj`)}(hX\Avoid pointer arithmetic generally (as this violates MISRA C 2012 rule 18.4) and especially on void pointers (as this is only supported via language extensions and is considered non-standard). In TF-A, setting the ``W`` build flag to ``W=3`` enables the *-Wpointer-arith* compiler flag and this will emit warnings where pointer arithmetic is used. h]j )}(hX[Avoid pointer arithmetic generally (as this violates MISRA C 2012 rule 18.4) and especially on void pointers (as this is only supported via language extensions and is considered non-standard). In TF-A, setting the ``W`` build flag to ``W=3`` enables the *-Wpointer-arith* compiler flag and this will emit warnings where pointer arithmetic is used.h](hAvoid pointer arithmetic generally (as this violates MISRA C 2012 rule 18.4) and especially on void pointers (as this is only supported via language extensions and is considered non-standard). In TF-A, setting the }(hAvoid pointer arithmetic generally (as this violates MISRA C 2012 rule 18.4) and especially on void pointers (as this is only supported via language extensions and is considered non-standard). In TF-A, setting the h!jubj. )}(h``W``h]hW}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh build flag to }(h build flag to h!jubj. )}(h``W=3``h]hW=3}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh enables the }(h enables the h!jubj )}(h*-Wpointer-arith*h]h-Wpointer-arith}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!jubhL compiler flag and this will emit warnings where pointer arithmetic is used.}(hL compiler flag and this will emit warnings where pointer arithmetic is used.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!jubj`)}(h@Use ``ptrdiff_t`` to compare the difference between 2 pointers. h]j )}(h?Use ``ptrdiff_t`` to compare the difference between 2 pointers.h](hUse }(hUse h!j0ubj. )}(h ``ptrdiff_t``h]h ptrdiff_t}(hhh!j9ubah"}(h$]h&]h+]h-]h/]uh1j- h!j0ubh. to compare the difference between 2 pointers.}(h. to compare the difference between 2 pointers.h!j0ubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j,ubah"}(h$]h&]h+]h-]h/]uh1j_h!jubeh"}(h$]h&]h+]h-]h/]jjuh1jZhAj hCMh!jubeh"}(h$]h&]h+]h-]h/]uh1j_h!j|hhhANhCNubj`)}(h8Use ``size_t`` when storing the ``sizeof()`` something. h]j )}(h7Use ``size_t`` when storing the ``sizeof()`` something.h](hUse }(hUse h!jhubj. )}(h ``size_t``h]hsize_t}(hhh!jqubah"}(h$]h&]h+]h-]h/]uh1j- h!jhubh when storing the }(h when storing the h!jhubj. )}(h ``sizeof()``h]hsizeof()}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jhubh something.}(h something.h!jhubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jdubah"}(h$]h&]h+]h-]h/]uh1j_h!j|hhhAj hCNubj`)}(hUse ``ssize_t`` when returning the ``sizeof()`` something from a function that can also return an error code; the signed type allows for a negative return code in case of error. This practice should be used sparingly. h]j )}(hUse ``ssize_t`` when returning the ``sizeof()`` something from a function that can also return an error code; the signed type allows for a negative return code in case of error. This practice should be used sparingly.h](hUse }(hUse h!jubj. )}(h ``ssize_t``h]hssize_t}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh when returning the }(h when returning the h!jubj. )}(h ``sizeof()``h]hsizeof()}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh something from a function that can also return an error code; the signed type allows for a negative return code in case of error. This practice should be used sparingly.}(h something from a function that can also return an error code; the signed type allows for a negative return code in case of error. This practice should be used sparingly.h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!j|hhhAj hCNubj`)}(hXUse ``u_register_t`` when it's important to store the contents of a register in its native size (32-bit in |AArch32| and 64-bit in |AArch64|). This is not a standard *C99* type but is widely available in libc implementations, including the FreeBSD version included with the TF codebase. Where possible, cast the variable to a more appropriate type before interpreting the data. For example, the following struct in ``ep_info.h`` could use this type to minimize the storage required for the set of registers: h]j )}(hXUse ``u_register_t`` when it's important to store the contents of a register in its native size (32-bit in |AArch32| and 64-bit in |AArch64|). This is not a standard *C99* type but is widely available in libc implementations, including the FreeBSD version included with the TF codebase. Where possible, cast the variable to a more appropriate type before interpreting the data. For example, the following struct in ``ep_info.h`` could use this type to minimize the storage required for the set of registers:h](hUse }(hUse h!jubj. )}(h``u_register_t``h]h u_register_t}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubhY when it’s important to store the contents of a register in its native size (32-bit in }(hW when it's important to store the contents of a register in its native size (32-bit in h!jubh)}(hhh]h)}(hhh]hAArch32}(hhh!jubah"}(h$]h&](h(h)h*eh+]h-]h/]uh1hhANhCNh!jubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainh)reftypeh< refexplicitrefwarn reftargeth@uh1hhAhBhCKh!jubh and 64-bit in }(h and 64-bit in h!jubh)}(hhQh]h)}(hhQh]hAArch64}(hhh!j&ubah"}(h$]h&](h(h]h^eh+]h-]h/]uh1hhANhCNh!j#ubah"}(h$]h&]h+]h-]h/]refdoch9 refdomainh]reftypehk refexplicitrefwarn reftargethnuh1hhAhBhCKh!jubh). This is not a standard }(h). This is not a standard h!jubj )}(h*C99*h]hC99}(hhh!jDubah"}(h$]h&]h+]h-]h/]uh1j h!jubh type but is widely available in libc implementations, including the FreeBSD version included with the TF codebase. Where possible, cast the variable to a more appropriate type before interpreting the data. For example, the following struct in }(h type but is widely available in libc implementations, including the FreeBSD version included with the TF codebase. Where possible, cast the variable to a more appropriate type before interpreting the data. For example, the following struct in h!jubj. )}(h ``ep_info.h``h]h ep_info.h}(hhh!jWubah"}(h$]h&]h+]h-]h/]uh1j- h!jubhO could use this type to minimize the storage required for the set of registers:}(hO could use this type to minimize the storage required for the set of registers:h!jubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jubah"}(h$]h&]h+]h-]h/]uh1j_h!j|hhhAj hCNubeh"}(h$]h&]h+]h-]h/]jjuh1jZhAj hCM_h!jhhubj )}(hX typedef struct aapcs64_params { u_register_t arg0; u_register_t arg1; u_register_t arg2; u_register_t arg3; u_register_t arg4; u_register_t arg5; u_register_t arg6; u_register_t arg7; } aapcs64_params_t;h]hX typedef struct aapcs64_params { u_register_t arg0; u_register_t arg1; u_register_t arg2; u_register_t arg3; u_register_t arg4; u_register_t arg5; u_register_t arg6; u_register_t arg7; } aapcs64_params_t;}(hhh!j|ubah"}(h$]h&]h+]h-]h/]forcehighlight_args}j j j juh1j hAj hCMh!jhhubj )}(hIf 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``.h](h!If some code wants to operate on }(h!If some code wants to operate on h!jhhhANhCNubj. )}(h``arg0``h]harg0}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubhS and knows that it represents a 32-bit unsigned integer on all systems, cast it to }(hS and knows that it represents a 32-bit unsigned integer on all systems, cast it to h!jhhhANhCNubj. )}(h``unsigned int``h]h unsigned int}(hhh!jubah"}(h$]h&]h+]h-]h/]uh1j- h!jubh.}(hj h!jhhhANhCNubeh"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(hBThese guidelines should be updated if additional types are needed.h]hBThese guidelines should be updated if additional types are needed.}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubeh"}(h$]%use-of-built-in-c-and-libc-data-typesah&]h+]%use of built-in c and libc data typesah-]h/]uh1j h!j hhhAj hCMYubj )}(hhh](j )}(h'Favor C language over assembly languageh]h'Favor C language over assembly language}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhAj hCMubj )}(hGenerally, prefer code written in C over assembly. Assembly code is less portable, harder to understand, maintain and audit security wise. Also, static analysis tools generally don't analyze assembly code.h]hGenerally, prefer code written in C over assembly. Assembly code is less portable, harder to understand, maintain and audit security wise. Also, static analysis tools generally don’t analyze assembly code.}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(hHThere are, however, legitimate uses of assembly language. These include:h]hHThere are, however, legitimate uses of assembly language. These include:}(hjh!jhhhANhCNubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubh block_quote)}(hhh]j[)}(hhh](j`)}(hDEarly boot code executed before the C runtime environment is setup. h]j )}(hCEarly boot code executed before the C runtime environment is setup.h]hCEarly boot code executed before the C runtime environment is setup.}(hj h!j ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j ubah"}(h$]h&]h+]h-]h/]uh1j_h!j ubj`)}(hException handling code. h]j )}(hException handling code.h]hException handling code.}(hj* h!j( ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j$ ubah"}(h$]h&]h+]h-]h/]uh1j_h!j ubj`)}(hrLow-level code where the exact sequence of instructions executed on the CPU matters, such as CPU reset sequences. h]j )}(hqLow-level code where the exact sequence of instructions executed on the CPU matters, such as CPU reset sequences.h]hqLow-level code where the exact sequence of instructions executed on the CPU matters, such as CPU reset sequences.}(hjB h!j@ ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!j< ubah"}(h$]h&]h+]h-]h/]uh1j_h!j ubj`)}(hlLow-level code where specific system-level instructions must be used, such as cache maintenance operations. h]j )}(hkLow-level code where specific system-level instructions must be used, such as cache maintenance operations.h]hkLow-level code where specific system-level instructions must be used, such as cache maintenance operations.}(hjZ h!jX ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jT ubah"}(h$]h&]h+]h-]h/]uh1j_h!j ubeh"}(h$]h&]h+]h-]h/]jjuh1jZhAj hCMh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!jhhhANhCNubh transition)}(h--------------h]h"}(h$]h&]h+]h-]h/]uh1jx hAj hCMh!jhhubj )}(hH*Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.*h]j )}(hj h]hFCopyright (c) 2020, Arm Limited and Contributors. All rights reserved.}(hhh!j ubah"}(h$]h&]h+]h-]h/]uh1j h!j ubah"}(h$]h&]h+]h-]h/]uh1j hAj hCMh!jhhubj )}(ha.. _`Linux master tree`: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/h]h"}(h$]linux-master-treeah&]h+]linux master treeah-]h/]j% je uh1j hCMh!jhhhAj referencedKubj )}(hf.. _`Procedure Call Standard for the Arm Architecture`: https://developer.arm.com/docs/ihi0042/latest/h]h"}(h$]0procedure-call-standard-for-the-arm-architectureah&]h+]0procedure call standard for the arm architectureah-]h/]j% juh1j hCMh!jhhhAj j Kubj )}(hm.. _`Procedure Call Standard for the Arm 64-bit Architecture`: https://developer.arm.com/docs/ihi0055/latest/h]h"}(h$]7procedure-call-standard-for-the-arm-64-bit-architectureah&]h+]7procedure call standard for the arm 64-bit architectureah-]h/]j% juh1j hCMh!jhhhAj j Kubj )}(h,.. _`EditorConfig`: http://editorconfig.org/h]h"}(h$] editorconfigah&]h+] editorconfigah-]h/]j% j& uh1j hCMh!jhhhAj j Kubj )}(h.. _`Why the “volatile” type class should not be used`: https://www.kernel.org/doc/html/latest/process/volatile-considered-harmful.htmlh]h"}(h$].why-the-volatile-type-class-should-not-be-usedah&]h+]4why the “volatile” type class should not be usedah-]h/]j% juh1j hCMh!jhhhAj j Kubj )}(h`.. _`MISRA C:2012 Guidelines`: https://www.misra.org.uk/Activities/MISRAC/tabid/160/Default.aspxh]h"}(h$]misra-c-2012-guidelinesah&]h+]misra c:2012 guidelinesah-]h/]j% Ahttps://www.misra.org.uk/Activities/MISRAC/tabid/160/Default.aspxuh1j hCMh!jhhhAj ubj )}(h.. _`a spreadsheet`: https://developer.trustedfirmware.org/file/download/lamajxif3w7c4mpjeoo5/PHID-FILE-fp7c7acszn6vliqomyhn/MISRA-and-TF-Analysis-v1.3.odsh]h"}(h$] a-spreadsheetah&]h+] a spreadsheetah-]h/]j% https://developer.trustedfirmware.org/file/download/lamajxif3w7c4mpjeoo5/PHID-FILE-fp7c7acszn6vliqomyhn/MISRA-and-TF-Analysis-v1.3.odsuh1j hCMh!jhhhAj ubeh"}(h$]'favor-c-language-over-assembly-languageah&]h+]'favor c language over assembly languageah-]h/]uh1j h!j hhhAj hCMubeh"}(h$]coding-guidelinesah&]h+]coding guidelinesah-]h/]uh1j h!hhhhAj hCKubeh"}(h$]h&]h+]h-]h/]sourcej uh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(j N generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj$!error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcej _destinationN _config_files]pep_referencesN pep_base_url https://www.python.org/dev/peps/pep_file_url_templatepep-%04drfc_referencesN rfc_base_urlhttps://tools.ietf.org/html/ tab_widthKtrim_footnote_reference_spacefile_insertion_enabled raw_enabledKsyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xformembed_stylesheetcloak_email_addressesenvNubreporterNindirect_targets]substitution_defs}(hHh hshKhhvhhhhjhjJj"jujMjjxjjjjj!jjLj$jwjOjjzjjjjj#jjNj&jyjQjj|jjjjj%jjPj(j{jSjj~jjjjj'jjRj*j}jUjjjjjjj)jjTj,jjWjjjjjjj+jjVj.jjYjjjjjjj-jjXj0jj[jjjjj jj/ j jZ j2 j j] j j j j j j j1 j j\ j4 j j_ j j j j j j j3 j j^ j6 j ja usubstitution_names}(aarch32hHaarch64hsamuhamushɌapihbtijcotjucssjcvejdtbjds-5j!dsujLdtjweljehfjfconfjfdtj#ff-ajNfipjyfvpjfwujgicjisaj%linarojPmmuj{mpamjmpmmjmpidrjmtej'oenjRop-teej}otejpddjpauthjpmfj)pscijTrasjrotjscmijscpjsdeij+sdsjVseajsipjsmcjsmcccj-socjXspjspdjspmjssbsj svej/ tbbjZ tbbrj teej tf-aj tf-mj tlbj1 tlkj\ trngj tspj tzcj ubsanj uefij3 wdogj^ xlatj urefnames}( editorconfig]j alinux master tree]jT a4why the “volatile” type class should not be used]ja0procedure call standard for the arm architecture]ja7procedure call standard for the arm 64-bit architecture]jaurefids}j ]j asnameids}(j j j j jj jjjjjjjjjjjjjjjJjGjjjZjWjwjtjjj jjjj j j j j j j j j j j j j j j j u nametypes}(j Nj NjjNjNjNjNjNjNjNjJNjNjZNjwNjNj NjNj Nj j j j j j j uh$}(j j j j j j jj jj;jjjjjjjjjjjGjjjMjWjjtj]jjzjjjjj jj j j j j j j j j j j j j j u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j2!KsRparse_messages]transform_messages](h system_message)}(hhh]j )}(hhh]hCHyperlink target "automatic-compliance-checking" is not referenced.}(hhh!j!ubah"}(h$]h&]h+]h-]h/]uh1j h!j!ubah"}(h$]h&]h+]h-]h/]levelKtypeINFOsourcej lineK[uh1j!ubj!)}(hhh]j )}(hhh]h=Hyperlink target "misra c:2012 guidelines" is not referenced.}(hhh!j!ubah"}(h$]h&]h+]h-]h/]uh1j h!j!ubah"}(h$]h&]h+]h-]h/]levelKtypej!sourcej lineMuh1j!ubj!)}(hhh]j )}(hhh]h3Hyperlink target "a spreadsheet" is not referenced.}(hhh!j "ubah"}(h$]h&]h+]h-]h/]uh1j h!j"ubah"}(h$]h&]h+]h-]h/]levelKtypej!sourcej lineMuh1j!ube transformerN decorationNhhub.