karo: tx51: add max. size error check for DCD
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 8 Aug 2014 13:27:53 +0000 (15:27 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 8 Aug 2014 13:27:53 +0000 (15:27 +0200)
packages/hal/arm/mx51/karo/v1_0/include/hal_platform_setup.h

index d02cb1e..800aba2 100644 (file)
@@ -692,6 +692,9 @@ dcd_start:
        DCDGEN(4, IOMUXC_BASE_ADDR + 0x574, 0x20a4)     @ NANDF_D1
        DCDGEN(4, IOMUXC_BASE_ADDR + 0x578, 0x20a4)     @ NANDF_D0
 dcd_end:
+       .ifgt   dcd_end - dcd_start - 60 * 12
+       .error  "DCD too large!"
+       .endif
 image_len:
        .long   REDBOOT_IMAGE_SIZE
        .endm