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 /* This file is only needed in case of the old, legacy driver */
12 #ifndef CC3XX_RUNTIME_ENABLED
13 /*
14  * CRYPTO_ENGINE_BUF_SIZE is decided by multiple components configs.
15  * CRYPTO_ENGINE_BUF_SIZE can be overridden below by other component configs.
16  * It must be guaranteed that this header file is included at last before
17  * CRYPTO_ENGINE_BUF_SIZE is referred in crypto_library.c.
18  * Otherwise, crypto_library.c may include an incorrect definition value.
19  */
20 
21 /* The legacy CC312 driver needs at least 0x4000 of heap size to work properly */
22 #if defined(CRYPTO_HW_ACCELERATOR_CC312) && (CRYPTO_ENGINE_BUF_SIZE < 0x4000)
23 #pragma message("CRYPTO_ENGINE_BUF_SIZE is redefined to 0x4000.")
24 #undef  CRYPTO_ENGINE_BUF_SIZE
25 #define CRYPTO_ENGINE_BUF_SIZE                 0x4000
26 #endif
27 #endif /* CC3XX_RUNTIME_ENABLED */
28 
29 #endif /* __CONFIG_ENGINE_BUF_H__ */
30