mbedtls/include/mbedtls
Roberto Vargas 7decfe8c1e Convert mbedtls_free and mbedtls_calloc into functions
When MBEDTLS_PLATFORM_MEMORY is defined but MBEDTLS_PLATFORM_FREE_MACRO or
MBEDTLS_PLATFORM_CALLOC_MACRO are not defined then the actual functions
used to allocate and free memory are stored in function pointers.
These pointers are exposed to the caller, and it means that the caller
and the library have to share a data section.

In TF-A, we execute in a very constrained environment, where some images
are executed from ROM and other images are executed from SRAM. The
images that are executed from ROM cannot be modified. The SRAM size
is very small and we are moving libraries to the ROM that can be shared
between the different SRAM images.  These SRAM images could import all the
symbols used in mbedtls, but it would create an undesirable hard binary
dependency between the different images. For this reason, all the library
functions in ROM are accesed using a jump table whose base address is
known, allowing the images to execute with different versions of the ROM.

This commit changes the function pointers to actual functions,
so that the SRAM images only have to use the new exported symbols
(mbedtls_calloc and mbedtls_free) using the jump table. In
our scenario, mbedtls_platform_set_calloc_free is called from
mbedtls_memory_buffer_alloc_init which initializes the function pointers
to the internal buffer_alloc_calloc and buffer_alloc_free functions.

No functional changes to mbedtls_memory_buffer_alloc_init.

Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
2018-06-13 09:17:59 +01:00
..
aes.h Merge branch 'crypto_alt_revision' into development-restricted-proposed 2018-04-19 21:02:40 +02:00
aesni.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
arc4.h Take Cryptographic API outside the XXX_ALT check 2018-04-01 15:12:46 +03:00
asn1.h Merge remote-tracking branch 'upstream-restricted/pr/398' into development-restricted-proposed 2018-03-13 17:18:06 +01:00
asn1write.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
base64.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
bignum.h Clarify the behavior of bignum resize and copy functions 2018-03-21 16:28:41 +01:00
blowfish.h Take Cryptographic API outside the XXX_ALT check 2018-04-01 15:12:46 +03:00
bn_mul.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
camellia.h Take Cryptographic API outside the XXX_ALT check 2018-04-01 15:12:46 +03:00
ccm.h Merge branch 'development-proposed' into development-restricted-proposed 2018-04-24 17:16:34 +01:00
certs.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
check_config.h Move and reword deprecation warning/error on compression support 2018-03-08 13:26:12 +00:00
cipher.h Update cipher.h 2018-04-19 14:41:33 +01:00
cipher_internal.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
cmac.h Merge branch 'crypto_alt_revision' into development-restricted-proposed 2018-04-19 21:02:40 +02:00
compat-1.3.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
config.h Reword config.h docs for MBEDTLS_PLATFORM_ZEROIZE_ALT 2018-04-24 08:31:34 -05:00
ctr_drbg.h Update ctr_drbg.h 2018-04-16 14:51:52 +01:00
debug.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
des.h Minor modifications for alt support in des and ecp 2018-04-16 17:40:04 +03:00
dhm.h Fix minor code style issues 2018-05-15 09:21:57 +01:00
ecdh.h Fix minor code style issues 2018-05-15 09:21:57 +01:00
ecdsa.h Update ecdsa.h 2018-04-23 06:16:40 +01:00
ecjpake.h Add new modules to the refactoring 2018-04-01 15:12:46 +03:00
ecp.h ecp: Fix binary compatibility with group ID 2018-04-27 18:20:31 +01:00
ecp_internal.h Fix minor code style issues 2018-05-15 09:21:57 +01:00
entropy.h Fix minor code style issues 2018-05-15 09:21:57 +01:00
entropy_poll.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
error.h Merge branch 'development' into development-restricted 2018-01-26 20:57:38 +00:00
gcm.h Fix minor code style issues 2018-05-15 09:21:57 +01:00
havege.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
hmac_drbg.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
md.h Update md.h 2018-04-16 16:31:16 +01:00
md2.h Take Cryptographic API outside the XXX_ALT check 2018-04-01 15:12:46 +03:00
md4.h Take Cryptographic API outside the XXX_ALT check 2018-04-01 15:12:46 +03:00
md5.h Take Cryptographic API outside the XXX_ALT check 2018-04-01 15:12:46 +03:00
md_internal.h Merge remote-tracking branch 'upstream-public/pr/1294' into development 2018-01-25 14:47:39 +00:00
memory_buffer_alloc.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
net.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
net_sockets.h Merge branch 'pr_946' into development-proposed 2018-04-04 10:33:45 +02:00
oid.h pkcs5v2: add support for additional hmacSHA algorithms 2018-02-08 17:18:15 +08:00
padlock.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
pem.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
pk.h Clarify the use of MBEDTLS_ERR_PK_SIG_LEN_MISMATCH 2018-03-30 18:43:16 +02:00
pk_internal.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
pkcs5.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
pkcs11.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
pkcs12.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
platform.h Convert mbedtls_free and mbedtls_calloc into functions 2018-06-13 09:17:59 +01:00
platform_time.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
platform_util.h Improve mbedtls_platform_zeroize() docs 2018-04-24 08:37:52 -05:00
ripemd160.h Take Cryptographic API outside the XXX_ALT check 2018-04-01 15:12:46 +03:00
rsa.h Fix minor code style issues 2018-05-15 09:21:57 +01:00
rsa_internal.h Merge remote-tracking branch 'upstream-public/pr/1457' into development-proposed 2018-04-04 09:19:27 +02:00
sha1.h Fix minor code style issues 2018-05-15 09:21:57 +01:00
sha256.h Merge branch 'crypto_alt_revision' into development-restricted-proposed 2018-04-19 21:02:40 +02:00
sha512.h Merge branch 'crypto_alt_revision' into development-restricted-proposed 2018-04-19 21:02:40 +02:00
ssl.h Fix minor code style issues 2018-05-15 09:21:57 +01:00
ssl_cache.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
ssl_ciphersuites.h Fix minor code style issues 2018-05-15 09:21:57 +01:00
ssl_cookie.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
ssl_internal.h Merge remote-tracking branch 'upstream-public/pr/1296' into HEAD 2018-03-11 00:44:14 +01:00
ssl_ticket.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
threading.h Do not define and initialize global mutexes on configurations that do not use them. 2018-03-21 15:01:55 +00:00
timing.h Adjust more modules to new design 2018-04-01 15:59:58 +03:00
version.h Update version to 2.9.0 2018-04-30 09:58:33 +01:00
x509.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
x509_crl.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
x509_crt.h Merge branch 'development' into iotssl-1381-x509-verify-refactor-restricted 2018-03-05 11:55:38 +01:00
x509_csr.h Update Doxygen file blocks to remove copyright and license information 2018-01-23 15:44:39 +00:00
xtea.h Take Cryptographic API outside the XXX_ALT check 2018-04-01 15:12:46 +03:00