Sanitise includes across codebaseEnforce full include path for includes. Deprecate old paths.The following folders inside include/lib have been left unchanged:- include/lib/cpus/${ARCH}- inclu
Sanitise includes across codebaseEnforce full include path for includes. Deprecate old paths.The following folders inside include/lib have been left unchanged:- include/lib/cpus/${ARCH}- include/lib/el3_runtime/${ARCH}The reason for this change is that having a global namespace forincludes isn't a good idea. It defeats one of the advantages of havingfolders and it introduces problems that are sometimes subtle (becauseyou may not know the header you are actually including if there are twoof them).For example, this patch had to be created because two headers werecalled the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platformto avoid collision."). More recently, this patch has had similarproblems: 46f9b2c3a282 ("drivers: add tzc380 support").This problem was introduced in commit 4ecca33988b9 ("Move include andsource files to logical locations"). At that time, there weren't toomany headers so it wasn't a real issue. However, time has shown thatthis creates problems.Platforms that want to preserve the way they include headers may add theremoved paths to PLAT_INCLUDES, but this is discouraged.Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8fSigned-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
cert: move platform_oid.h to include/tools_share for all platformsPlatforms aligned with TBBR are supposed to use their own OIDs, butdefining the same macros with different OIDs does not provide a
cert: move platform_oid.h to include/tools_share for all platformsPlatforms aligned with TBBR are supposed to use their own OIDs, butdefining the same macros with different OIDs does not provide anyvalue (at least technically).For easier use of TBBR, this commit allows platforms to reuse the OIDsobtained by ARM Ltd. This will be useful for non-ARM vendors thatdo not need their own extension fields in their certificate files.The OIDs of ARM Ltd. have been moved to include/tools_share/tbbr_oid.hPlatforms can include <tbbr_oid.h> instead of <platform_oid.h> bydefining USE_TBBR_DEFS as 1. USE_TBBR_DEFS is 0 by default to keep thebackward compatibility.For clarification, I inserted a blank line between headers from theinclude/ directory (#include <...>) and ones from a local directory(#include "..." ).Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Use SPDX license identifiersTo make software license auditing simpler, use SPDX[0] licenseidentifiers instead of duplicating the license text in every file.NOTE: Files that have been imported by
Use SPDX license identifiersTo make software license auditing simpler, use SPDX[0] licenseidentifiers instead of duplicating the license text in every file.NOTE: Files that have been imported by FreeBSD have not been modified.[0]: https://spdx.org/Change-Id: I80a00e1f641b8cc075ca5a95b10607ed9ed8761aSigned-off-by: dp-arm <dimitris.papastamos@arm.com>
tbbr: Simplify conditionalThese are equivalent so use the reduced form.Change-Id: I40ca097411b9abab69985b8e4dbccf7582eae49eSigned-off-by: dp-arm <dimitris.papastamos@arm.com>
tbbr: Fix updating of Non-Trusted NV counterThe previous code required that a certificate be signed with the ROTkey before the platform's NV counter could be updated with the valuein the certific
tbbr: Fix updating of Non-Trusted NV counterThe previous code required that a certificate be signed with the ROTkey before the platform's NV counter could be updated with the valuein the certificate. This implies that the Non-Trusted NV counter wasnot being updated for Non-Trusted content certificates, as they cannotbe signed with the ROT key in the TBBR CoT scheme.The code is reworked to only allow updating the platform's Trusted NVcounter when a certificate protected by the Trusted NV counter issigned with the ROT key.Content certificates protected by the Non-Trusted NV counter areallowed to update the platform's Non-Trusted NV counter, assumingthat the certificate value is higher than the platform's value.A new optional platform API has been introduced, namedplat_set_nv_ctr2(). Platforms may choose to implement it and performadditional checks based on the authentication image descriptor beforemodifying the NV counters. A default weak implementation is availablethat just calls into plat_set_nv_ctr().Fixes ARM-software/tf-issues#426Change-Id: I4fc978fd28a3007bc0cef972ff1f69ad0413b79cSigned-off-by: dp-arm <dimitris.papastamos@arm.com>