io_stm32image.h 774 B

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