TBB: add non-volatile counter supportThis patch adds support for non-volatile counter authentication tothe Authentication Module. This method consists of matching thecounter values provided in th
TBB: add non-volatile counter supportThis patch adds support for non-volatile counter authentication tothe Authentication Module. This method consists of matching thecounter values provided in the certificates with the ones storedin the platform. If the value from the certificate is lower thanthe platform, the boot process is aborted. This mechanism protectsthe system against rollback.The TBBR CoT has been updated to include this method as part of theauthentication process. Two counters are used: one for the trustedworld images and another for the non trusted world images.** NEW PLATFORM APIs (mandatory when TBB is enabled) **int plat_get_nv_ctr(void *cookie, unsigned int *nv_ctr); This API returns the non-volatile counter value stored in the platform. The cookie in the first argument may be used to select the counter in case the platform provides more than one (i.e. TBSA compliant platforms must provide trusted and non-trusted counters). This cookie is specified in the CoT.int plat_set_nv_ctr(void *cookie, unsigned int nv_ctr); This API sets a new counter value. The cookie may be used to select the counter to be updated.An implementation of these new APIs for ARM platforms is alsoprovided. The values are obtained from the Trusted Non-VolatileCounters peripheral. The cookie is used to pass the extension OID.This OID may be interpreted by the platform to know which countermust return. On Juno, The trusted and non-trusted counter valueshave been tied to 31 and 223, respectively, and cannot be modified.** IMPORTANT **THIS PATCH BREAKS THE BUILD WHEN TRUSTED_BOARD_BOOT IS ENABLED. THENEW PLATFORM APIs INTRODUCED IN THIS PATCH MUST BE IMPLEMENTED INORDER TO SUCCESSFULLY BUILD TF.Change-Id: Ic943b76b25f2a37f490eaaab6d87b4a8b3cbc89a
show more ...
Always build with '-pedantic'By default ARM TF is built with the '-pedantic' compiler flag, whichhelps detecting violations of the C standard. However, the mbed TLSlibrary and its associated auth
Always build with '-pedantic'By default ARM TF is built with the '-pedantic' compiler flag, whichhelps detecting violations of the C standard. However, the mbed TLSlibrary and its associated authentication module in TF used to failbuilding with this compiler flag. As a workaround, the mbed TLSauthentication module makefile used to set the 'DISABLE_PEDANTIC'TF build flag.The compiler errors flagged by '-pedantic' in the mbed TLS libraryhave been fixed between versions 1.3.9 and 2.2.0 and the library nowproperly builds with this compiler flag.This patch fixes the remaining compiler errors in the mbed TLSauthentication module in TF and unsets the 'DISABLE_PEDANTIC' TFbuild flag. This means that TF is now always built with '-pedantic'.In particular, this patch: * Removes the final semi-colon in REGISTER_COT() macro. This semi-colon was causing the following error message: drivers/auth/tbbr/tbbr_cot.c:544:23: error: ISO C does not allow extra ';' outside of a function [-Werror=pedantic] This has been fixed both in the mbed TLS authentication module as well as in the certificate generation tool. Note that the latter code didn't need fixing since it is not built with '-pedantic' but the change has been propagated for consistency. Also fixed the REGISTER_KEYS() and REGISTER_EXTENSIONS() macros, which were suffering from the same issue. * Fixes a pointer type. It was causing the following error message: drivers/auth/mbedtls/mbedtls_crypto.c: In function 'verify_hash': drivers/auth/mbedtls/mbedtls_crypto.c:177:42: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]Change-Id: I7b7a04ef711efd65e17b5be26990d1a0d940257d
Move up to mbed TLS 2.xThe mbed TLS library has introduced some changes in the API fromthe 1.3.x to the 2.x releases. Using the 2.x releases requiressome changes to the crypto and transport modul
Move up to mbed TLS 2.xThe mbed TLS library has introduced some changes in the API fromthe 1.3.x to the 2.x releases. Using the 2.x releases requiressome changes to the crypto and transport modules.This patch updates both modules to the mbed TLS 2.x API.All references to the mbed TLS library in the code or documentationhave been updated to 'mbed TLS'. Old references to PolarSSL havebeen updated to 'mbed TLS'.User guide updated to use mbed TLS 2.2.0.NOTE: moving up to mbed TLS 2.x from 1.3.x is not backward compatible.Applying this patch will require an mbed TLS 2.x release to be used.Also note that the mbed TLS license changed to Apache version 2.0.Change-Id: Iba4584408653cf153091f2ca2ee23bc9add7fda4
TBB: add mbedTLS authentication related librariesThis patch adds the following mbedTLS based libraries:* Cryptographic libraryIt is used by the crypto module to verify a digital signatureand a
TBB: add mbedTLS authentication related librariesThis patch adds the following mbedTLS based libraries:* Cryptographic libraryIt is used by the crypto module to verify a digital signatureand a hash. This library relies on mbedTLS to perform thecryptographic operations. mbedTLS sources must be obtainedseparately.Two key algorithms are currently supported: * RSA-2048 * ECDSA-SECP256R1The platform is responsible for picking up the requiredalgorithm by defining the 'MBEDTLS_KEY_ALG' variable in theplatform makefile. Available options are: * 'rsa' (for RSA-2048) (default option) * 'ecdsa' (for ECDSA-SECP256R1)Hash algorithm currently supported is SHA-256.* Image parser libraryUsed by the image parser module to extract the authenticationparameters stored in X509v3 certificates.Change-Id: I597c4be3d29287f2f18b82846973afc142ee0bf0
12345