From: Giacomo Travaglini Date: Fri, 8 Mar 2019 11:06:21 +0000 (+0000) Subject: dev-arm: Fix GICv3 overflow for INTID > 256 X-Git-Tag: v19.0.0.0~1006 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8a6811ad6105605d1932627c3737fe9b645f8d0;p=gem5.git dev-arm: Fix GICv3 overflow for INTID > 256 SPIs can get to a maximum number of 1023, so that an uint8_t is not capable of representing all of them. Change-Id: I7a2c43b41ac93eabdfcf8311681240416b954177 Signed-off-by: Giacomo Travaglini Reviewed-by: Ciro Santilli Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17631 Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg --- diff --git a/src/dev/arm/gic_v3_distributor.hh b/src/dev/arm/gic_v3_distributor.hh index 6b7b0cbb1..86e53a3b6 100644 --- a/src/dev/arm/gic_v3_distributor.hh +++ b/src/dev/arm/gic_v3_distributor.hh @@ -184,7 +184,7 @@ class Gicv3Distributor : public Serializable Gicv3::IntStatus intStatus(uint32_t int_id) const; - inline bool isNotSPI(uint8_t int_id) const + inline bool isNotSPI(uint32_t int_id) const { if (int_id < (Gicv3::SGI_MAX + Gicv3::PPI_MAX) || int_id >= itLines) { return true; @@ -193,7 +193,7 @@ class Gicv3Distributor : public Serializable } } - inline bool nsAccessToSecInt(uint8_t int_id, bool is_secure_access) const + inline bool nsAccessToSecInt(uint32_t int_id, bool is_secure_access) const { return !DS && !is_secure_access && getIntGroup(int_id) != Gicv3::G1NS; }