Yann Gautier | eb16b47 | 2018-10-15 09:36:32 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef IO_STM32IMAGE_H |
| 8 | #define IO_STM32IMAGE_H |
| 9 | |
| 10 | #include <io_driver.h> |
| 11 | #include <partition.h> |
| 12 | |
| 13 | #define MAX_LBA_SIZE 512 |
| 14 | #define MAX_PART_NAME_SIZE (EFI_NAMELEN + 1) |
| 15 | #define STM32_PART_NUM (PLAT_PARTITION_MAX_ENTRIES - STM32_TF_A_COPIES) |
| 16 | |
| 17 | struct stm32image_part_info { |
| 18 | char name[MAX_PART_NAME_SIZE]; |
| 19 | uint32_t binary_type; |
| 20 | uintptr_t part_offset; |
| 21 | uint32_t bkp_offset; |
| 22 | }; |
| 23 | |
| 24 | struct stm32image_device_info { |
| 25 | struct stm32image_part_info part_info[STM32_PART_NUM]; |
| 26 | uint32_t device_size; |
| 27 | uint32_t lba_size; |
| 28 | }; |
| 29 | |
| 30 | int register_io_dev_stm32image(const io_dev_connector_t **dev_con); |
| 31 | |
| 32 | #endif /* IO_STM32IMAGE_H */ |