aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYann Gautier <yann.gautier@st.com>2018-10-15 09:36:32 +0200
committerYann Gautier <yann.gautier@st.com>2018-10-15 09:36:32 +0200
commitceaff75c9fbf04ded58edfccef3333c9a700f941 (patch)
treefa40731f4feffd49c7c76d45c346e6af521684fb /include
parent6fe8b195fade423dd0ffca656c7af79a40c81440 (diff)
downloadplatform_external_arm-trusted-firmware-ceaff75c9fbf04ded58edfccef3333c9a700f941.tar.gz
platform_external_arm-trusted-firmware-ceaff75c9fbf04ded58edfccef3333c9a700f941.tar.bz2
platform_external_arm-trusted-firmware-ceaff75c9fbf04ded58edfccef3333c9a700f941.zip
stm32mp1: add an IO to read STM32IMAGE binaries
This IO is required to read binaries with STM32 header. This header is added with the stm32image tool. Signed-off-by: Yann Gautier <yann.gautier@st.com>
Diffstat (limited to 'include')
-rw-r--r--include/drivers/st/io_stm32image.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/drivers/st/io_stm32image.h b/include/drivers/st/io_stm32image.h
new file mode 100644
index 000000000..b66821960
--- /dev/null
+++ b/include/drivers/st/io_stm32image.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef IO_STM32IMAGE_H
+#define IO_STM32IMAGE_H
+
+#include <io_driver.h>
+#include <partition.h>
+
+#define MAX_LBA_SIZE 512
+#define MAX_PART_NAME_SIZE (EFI_NAMELEN + 1)
+#define STM32_PART_NUM (PLAT_PARTITION_MAX_ENTRIES - STM32_TF_A_COPIES)
+
+struct stm32image_part_info {
+ char name[MAX_PART_NAME_SIZE];
+ uint32_t binary_type;
+ uintptr_t part_offset;
+ uint32_t bkp_offset;
+};
+
+struct stm32image_device_info {
+ struct stm32image_part_info part_info[STM32_PART_NUM];
+ uint32_t device_size;
+ uint32_t lba_size;
+};
+
+int register_io_dev_stm32image(const io_dev_connector_t **dev_con);
+
+#endif /* IO_STM32IMAGE_H */