arm: gicv3: Fix compiler dependent behavior
C99 standard: "What constitutes an access to an object that has
volatile-qualified type is implementation-defined".

GCC is not considering the cast to void of volatile structures as an
access and so is not actually issuing reads.

Clang does read those structures by copying them on the stack, which in
this case creates an overflow because of their large size.

This patch removes the cast to void and instead uses the USED attribute
to tell the compiler to retain the static variables.

Change-Id: I952b5056e3f6e91841e7ef9558434352710ab80d
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
	       Zelalem Aweke <zelalem.aweke@arm.com>
1 parent 87b582e commit d01969118f1120d469d8f870cd195cb97e55fa90
@Ambroise Vincent Ambroise Vincent authored on 18 Jul 2019
Zelalem committed on 10 Dec 2019
Showing 2 changed files
View
include/lib/utils.h
View
plat/arm/common/arm_gicv3.c