Reduce the runtime stack size in BL stages.
authorSoby Mathew <soby.mathew@arm.com>
Mon, 4 Aug 2014 15:02:05 +0000 (16:02 +0100)
committerSoby Mathew <soby.mathew@arm.com>
Mon, 11 Aug 2014 13:45:08 +0000 (14:45 +0100)
This patch separates the stack size for each BL stage and
reduces it after stack usage analysis was done.

Fixes ARM-software/tf-issues#200

Change-Id: I8edc6de2551b0a6788761d121937692b2149bb29

plat/fvp/include/platform_def.h

index 70f84bbee86d05bd7e200a20536cae2efc7b8fec..8f607bae2c8d565e06c9921b4d0cbb8f57aa48ef 100644 (file)
  ******************************************************************************/
 
 /* Size of cacheable stacks */
-#define PLATFORM_STACK_SIZE    0x800
+#if DEBUG_XLAT_TABLE
+#define PLATFORM_STACK_SIZE 0x800
+#elif IMAGE_BL1
+#define PLATFORM_STACK_SIZE 0x440
+#elif IMAGE_BL2
+#define PLATFORM_STACK_SIZE 0x400
+#elif IMAGE_BL31
+#define PLATFORM_STACK_SIZE 0x400
+#elif IMAGE_BL32
+#define PLATFORM_STACK_SIZE 0x440
+#endif
 
 #define FIRMWARE_WELCOME_STR           "Booting trusted firmware boot loader stage 1\n\r"