]> git.sur5r.net Git - u-boot/blobdiff - tools/zynqimage.c
Merge branch 'master' of git://git.denx.de/u-boot-sh
[u-boot] / tools / zynqimage.c
index 021d2d3fc91f0ae515b160b33a56a8872fd5dda2..d3f418b0612b311b0537dddce8769c6e07b046a4 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2015 Nathan Rossi <nathan@nathanrossi.com>
  *
- * SPDX-License-Identifier:    GPL-2.0+
- *
  * The following Boot Header format/structures and values are defined in the
  * following documents:
  *   * Xilinx Zynq-7000 Technical Reference Manual (Section 6.3)
@@ -147,6 +146,12 @@ static int zynqimage_verify_header(unsigned char *ptr, int image_size,
        if (image_size < sizeof(struct zynq_header))
                return -1;
 
+       if (zynqhdr->__reserved1 != 0)
+               return -1;
+
+       if (zynqhdr->__reserved2 != 0)
+               return -1;
+
        if (zynqhdr->width_detection != HEADER_WIDTHDETECTION)
                return -1;
        if (zynqhdr->image_identifier != HEADER_IMAGEIDENTIFIER)