Home
last modified time | relevance | path

Searched hist:"20 d384978b7e79b15ac92f07664db59efa17bf59" (Results 1 – 1 of 1) sorted by relevance

/rk3399_ARM-atf/drivers/arm/gic/v2/
H A Dgicv2_main.c20d384978b7e79b15ac92f07664db59efa17bf59 Mon Sep 28 21:56:48 UTC 2020 johpow01 <john.powell@arm.com> Fix casting bug in gicv2_main.c

In the function gicv2_set_spi_routing, the signed value proc_num is cast
to unsigned int before being compared to other unsigned values in two
assert calls. The value proc_num can be a negative value, and once the
negative value is cast to unsigned it becomes a very large number which
will trigger the assert. This patch changes the assert cast so that the
unsigned values are cast to signed instead, keeping the same functionality
but allowing proc_num to be negative.

This bug can be seen when running the SDEI RM_ANY routing mode test in
TFTF on the Juno platform.

This patch also makes the usage of the proc_num variable in other gicv2
functions more clear.

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: If1b98eebb00bd9b73862e5e995e5e68c168170a6