gpheader.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * (C) Copyright 2014
  3. * Texas Instruments Incorporated
  4. * Refactored common functions in to gpimage-common.c. Include this common
  5. * header file
  6. *
  7. * (C) Copyright 2010
  8. * Linaro LTD, www.linaro.org
  9. * Author: John Rigby <john.rigby@linaro.org>
  10. * Based on TI's signGP.c
  11. *
  12. * (C) Copyright 2009
  13. * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
  14. *
  15. * (C) Copyright 2008
  16. * Marvell Semiconductor <www.marvell.com>
  17. * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
  18. *
  19. * SPDX-License-Identifier: GPL-2.0+
  20. */
  21. #ifndef _GPIMAGE_H_
  22. #define _GPIMAGE_H_
  23. /* common headers for gpimage and omapimage formats */
  24. struct gp_header {
  25. uint32_t size;
  26. uint32_t load_addr;
  27. };
  28. #define GPIMAGE_HDR_SIZE (sizeof(struct gp_header))
  29. /* common functions across gpimage and omapimage handlers */
  30. int valid_gph_size(uint32_t size);
  31. int valid_gph_load_addr(uint32_t load_addr);
  32. int gph_verify_header(struct gp_header *gph, int be);
  33. void gph_print_header(const struct gp_header *gph, int be);
  34. void gph_set_header(struct gp_header *gph, uint32_t size, uint32_t load_addr,
  35. int be);
  36. int gpimage_check_params(struct image_tool_params *params);
  37. #endif