From 9f033ee6c8fff0dbfb7cd9cea3f753ba399c0d17 Mon Sep 17 00:00:00 2001 From: Hoa Nguyen <hoanguyen@ucdavis.edu> Date: Thu, 30 Jul 2020 15:51:58 -0700 Subject: [PATCH] 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 <hoanguyen@ucdavis.edu> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32015 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com> --- src/dev/arm/smmu_v3_transl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2