1*57bf6057SJulius WernerAll headers under include/export/ are export headers that are intended for 2*57bf6057SJulius Wernerinclusion in third-party code which needs to interact with TF-A data structures 3*57bf6057SJulius Werneror interfaces. They must follow these special rules: 4*57bf6057SJulius Werner 5*57bf6057SJulius Werner- Header guards should start with ARM_TRUSTED_FIRMWARE_ to reduce clash risk. 6*57bf6057SJulius Werner 7*57bf6057SJulius Werner- All definitions should be sufficiently namespaced (e.g. with BL_ or TF_) to 8*57bf6057SJulius Werner make name clashes with third-party code unlikely. 9*57bf6057SJulius Werner 10*57bf6057SJulius Werner- They must not #include any headers except other export headers, and those 11*57bf6057SJulius Werner includes must use relative paths with "../double_quotes.h" notation. 12*57bf6057SJulius Werner 13*57bf6057SJulius Werner- They must not rely on any type definitions other that <stdint.h> types defined 14*57bf6057SJulius Werner in the ISO C standard (i.e. uint64_t is fine, but not u_register_t). They 15*57bf6057SJulius Werner should still not #include <stdint.h>. Instead, wrapper headers including 16*57bf6057SJulius Werner export headers need to ensure that they #include <stdint.h> earlier in their 17*57bf6057SJulius Werner include order. 18*57bf6057SJulius Werner 19*57bf6057SJulius Werner- They must not rely on any macro definitions other than those which are 20*57bf6057SJulius Werner pre-defined by all common compilers (e.g. __ASSEMBLER__ or __aarch64__). 21*57bf6057SJulius Werner 22*57bf6057SJulius Werner- They must only contain macro, type and structure definitions, no prototypes. 23*57bf6057SJulius Werner 24*57bf6057SJulius Werner- They should avoid using integer types with architecture-dependent widths 25*57bf6057SJulius Werner (e.g. long, uintptr_t, pointer types) where possible. (Some existing export 26*57bf6057SJulius Werner headers are violating this for now.) 27*57bf6057SJulius Werner 28*57bf6057SJulius Werner- Their names should always end in "_exp.h". 29*57bf6057SJulius Werner 30*57bf6057SJulius Werner- Normal TF-A code should never include export headers directly. Instead, it 31*57bf6057SJulius Werner should include a wrapper header that ensures the export header is included in 32*57bf6057SJulius Werner the right manner. (The wrapper header for include/export/x/y/z_exp.h should 33*57bf6057SJulius Werner normally be placed at include/x/y/z.h.) 34