1 /*
2  * Copyright (c) 2023, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __CONFIG_ENGINE_BUF_H__
9 #define __CONFIG_ENGINE_BUF_H__
10 
11 /*
12  * CRYPTO_ENGINE_BUF_SIZE is decided by multiple components configs.
13  * CRYPTO_ENGINE_BUF_SIZE can be overridden below by other component configs.
14  * It must be guaranteed that this header file is included at last before CRYPTO_ENGINE_BUF_SIZE
15  * is referred in crypto_library.c.
16  * Otherwise, crypto_library.c may include an incorrect definition value.
17  */
18 
19 /* The CC312 needs at least 0x4000 of heap size to work properly */
20 #if defined(CRYPTO_HW_ACCELERATOR_CC312) && (CRYPTO_ENGINE_BUF_SIZE < 0x4000)
21 #pragma message("CRYPTO_ENGINE_BUF_SIZE is redefined to 0x4000.")
22 #undef  CRYPTO_ENGINE_BUF_SIZE
23 #define CRYPTO_ENGINE_BUF_SIZE                 0x4000
24 #endif
25 
26 #endif /* __CONFIG_ENGINE_BUF_H__ */
27