From: Hoa Nguyen Date: Thu, 30 Jul 2020 22:51:58 +0000 (-0700) Subject: dev-arm: Initialize cd_addr in src/dev/arm/smmu_v3_transl.cc X-Git-Tag: v20.1.0.0~355 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f033ee6c8fff0dbfb7cd9cea3f753ba399c0d17;p=gem5.git dev-arm: Initialize cd_addr in src/dev/arm/smmu_v3_transl.cc In src/dev/arm/smmu_v3_transl.cc#L1401, cd_addr might not be initialized when all if statements fail. Change-Id: Idf53c07a9b5d52eea488e631f7334d4b566e645a Signed-off-by: Hoa Nguyen Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32015 Reviewed-by: Giacomo Travaglini Maintainer: Giacomo Travaglini Tested-by: kokoro --- diff --git a/src/dev/arm/smmu_v3_transl.cc b/src/dev/arm/smmu_v3_transl.cc index 209b04f06..c7b20f924 100644 --- a/src/dev/arm/smmu_v3_transl.cc +++ b/src/dev/arm/smmu_v3_transl.cc @@ -1398,7 +1398,7 @@ SMMUTranslationProcess::doReadCD(Yield &yield, const StreamTableEntry &ste, uint32_t sid, uint32_t ssid) { - Addr cd_addr; + Addr cd_addr = 0; if (ste.dw0.s1cdmax == 0) { cd_addr = ste.dw0.s1ctxptr << ST_CD_ADDR_SHIFT;