qemu: Add support for stack canary protection

Allow qemu users to enable stack protection. Since the virt platform
does not provide an RNG, use a basic, timer-based, canary generation,
similarly to FVP.

Increase SRAM size and BL2 size to fit images when stack protection is
enabled.

Notice that stack protection is not enabled by default in qemu.

Fixes ARM-software/tf-issues#568

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
diff --git a/plat/qemu/platform.mk b/plat/qemu/platform.mk
index 5bfd48a..e11f504 100644
--- a/plat/qemu/platform.mk
+++ b/plat/qemu/platform.mk
@@ -168,6 +168,10 @@
 endif
 
 SEPARATE_CODE_AND_RODATA := 1
+ENABLE_STACK_PROTECTOR	 := 0
+ifneq ($(ENABLE_STACK_PROTECTOR), 0)
+	PLAT_BL_COMMON_SOURCES += plat/qemu/qemu_stack_protector.c
+endif
 
 # Disable the PSCI platform compatibility layer
 ENABLE_PLAT_COMPAT	:= 	0