blob: d0562c6d29fc0f53cad3e13b7c3211f57d46c188 [file] [log] [blame]
Xinyu Zhanga2fab0e2022-10-24 15:37:46 +08001/*
2 * Copyright (c) 2022, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#ifndef __CONFIG_BASE_H__
9#define __CONFIG_BASE_H__
10
Xinyu Zhang77668dd2022-10-24 16:17:37 +080011/* Platform Partition Configs */
12
13/* Size of input buffer in platform service */
14#define PLATFORM_SERVICE_INPUT_BUFFER_SIZE 64
15
16/* Size of output buffer in platform service */
17#define PLATFORM_SERVICE_OUTPUT_BUFFER_SIZE 64
18
19/* The stack size of the Platform Secure Partition */
20#define PLATFORM_SP_STACK_SIZE 0x500
21
22/* Disable Non-volatile counter module */
23#define PLATFORM_NV_COUNTER_MODULE_DISABLED 0
24
Xinyu Zhangd755b822022-10-25 11:18:09 +080025/* Crypto Partition Configs */
26
27/*
28 * Heap size for the crypto backend
29 * CRYPTO_ENGINE_BUF_SIZE needs to be >8KB for EC signing by attest module.
30 */
31#define CRYPTO_ENGINE_BUF_SIZE 0x2080
32
33/* The max number of concurrent operations that can be active (allocated) at any time in Crypto */
34#define CRYPTO_CONC_OPER_NUM 8
35
36/* Disable PSA Crypto random number generator module */
37#define CRYPTO_RNG_MODULE_DISABLED 0
38
39/* Disable PSA Crypto Key module */
40#define CRYPTO_KEY_MODULE_DISABLED 0
41
42/* Disable PSA Crypto AEAD module */
43#define CRYPTO_AEAD_MODULE_DISABLED 0
44
45/* Disable PSA Crypto MAC module */
46#define CRYPTO_MAC_MODULE_DISABLED 0
47
48/* Disable PSA Crypto Hash module */
49#define CRYPTO_HASH_MODULE_DISABLED 0
50
51/* Disable PSA Crypto Cipher module */
52#define CRYPTO_CIPHER_MODULE_DISABLED 0
53
54/* Disable PSA Crypto asymmetric key signature module */
55#define CRYPTO_ASYM_SIGN_MODULE_DISABLED 0
56
57/* Disable PSA Crypto asymmetric key encryption module */
58#define CRYPTO_ASYM_ENCRYPT_MODULE_DISABLED 0
59
60/* Disable PSA Crypto key derivation module */
61#define CRYPTO_KEY_DERIVATION_MODULE_DISABLED 0
62
63/* Default size of the internal scratch buffer used for PSA FF IOVec allocations */
64#define CRYPTO_IOVEC_BUFFER_SIZE 5120
65
66/* Use stored NV seed to provide entropy */
67#define CRYPTO_NV_SEED 1
68
69/*
70 * Only enable multi-part operations in Hash, MAC, AEAD and symmetric ciphers,
71 * to optimize memory footprint in resource-constrained devices.
72 */
73#define CRYPTO_SINGLE_PART_FUNCS_DISABLED 0
74
75/* The stack size of the Crypto Secure Partition */
76#define CRYPTO_STACK_SIZE 0x1B00
77
Xinyu Zhanga2fab0e2022-10-24 15:37:46 +080078#endif /* __CONFIG_BASE_H__ */