Louis Mayencourt | 944ade8 | 2019-08-08 12:03:26 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2019-2020, ARM Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef FCONF_TBBR_GETTER_H |
| 8 | #define FCONF_TBBR_GETTER_H |
| 9 | |
Sandrine Bailleux | 4bca140 | 2020-03-25 11:22:34 +0100 | [diff] [blame] | 10 | #include <assert.h> |
| 11 | |
Louis Mayencourt | 944ade8 | 2019-08-08 12:03:26 +0100 | [diff] [blame] | 12 | #include <lib/fconf/fconf.h> |
| 13 | |
| 14 | /* TBBR related getter */ |
Sandrine Bailleux | 4bca140 | 2020-03-25 11:22:34 +0100 | [diff] [blame] | 15 | #define tbbr__cot_getter(id) __extension__ ({ \ |
| 16 | assert((id) < cot_desc_size); \ |
| 17 | cot_desc_ptr[id]; \ |
| 18 | }) |
Louis Mayencourt | 944ade8 | 2019-08-08 12:03:26 +0100 | [diff] [blame] | 19 | |
Louis Mayencourt | 4da9b31 | 2019-09-30 10:57:24 +0100 | [diff] [blame] | 20 | #define tbbr__dyn_config_getter(id) tbbr_dyn_config.id |
| 21 | |
| 22 | struct tbbr_dyn_config_t { |
| 23 | uint32_t disable_auth; |
Louis Mayencourt | 5b9055f | 2019-10-01 10:45:14 +0100 | [diff] [blame] | 24 | void *mbedtls_heap_addr; |
| 25 | size_t mbedtls_heap_size; |
Alexei Fedorov | c717617 | 2020-07-13 12:11:05 +0100 | [diff] [blame] | 26 | #if MEASURED_BOOT |
| 27 | uint8_t bl2_hash_data[TCG_DIGEST_SIZE]; |
| 28 | #endif |
Louis Mayencourt | 4da9b31 | 2019-09-30 10:57:24 +0100 | [diff] [blame] | 29 | }; |
| 30 | |
| 31 | extern struct tbbr_dyn_config_t tbbr_dyn_config; |
| 32 | |
| 33 | int fconf_populate_tbbr_dyn_config(uintptr_t config); |
| 34 | |
Louis Mayencourt | 944ade8 | 2019-08-08 12:03:26 +0100 | [diff] [blame] | 35 | #endif /* FCONF_TBBR_GETTER_H */ |