Yann Gautier | 29f1f94 | 2021-07-13 18:07:41 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2021, STMicroelectronics - All Rights Reserved |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef STM32MP_FCONF_GETTER |
| 8 | #define STM32MP_FCONF_GETTER |
| 9 | |
| 10 | #include <assert.h> |
| 11 | |
| 12 | #include <lib/fconf/fconf.h> |
Sughosh Ganu | 57c6f90 | 2021-11-10 15:24:56 +0530 | [diff] [blame] | 13 | #include <tools_share/uuid.h> |
Yann Gautier | 29f1f94 | 2021-07-13 18:07:41 +0200 | [diff] [blame] | 14 | |
| 15 | /* IO policies */ |
| 16 | #define stm32mp__io_policies_getter(id) __extension__ ({ \ |
| 17 | assert((id) < MAX_NUMBER_IDS); \ |
| 18 | &policies[id]; \ |
| 19 | }) |
| 20 | |
| 21 | struct plat_io_policy { |
| 22 | uintptr_t *dev_handle; |
| 23 | uintptr_t image_spec; |
Sughosh Ganu | 57c6f90 | 2021-11-10 15:24:56 +0530 | [diff] [blame] | 24 | struct efi_guid img_type_guid; |
Yann Gautier | 29f1f94 | 2021-07-13 18:07:41 +0200 | [diff] [blame] | 25 | int (*check)(const uintptr_t spec); |
| 26 | }; |
| 27 | |
| 28 | extern struct plat_io_policy policies[]; |
| 29 | int fconf_populate_stm32mp_io_policies(uintptr_t config); |
| 30 | |
| 31 | #endif /* STM32MP_FCONF_GETTER */ |