Hi,
Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.
4 new defect(s) introduced to coreboot found with Coverity Scan. 1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan Showing 4 of 4 defect(s)
** CID 1393341: Control flow issues (DEADCODE) /3rdparty/arm-trusted-firmware/lib/extensions/amu/aarch64/amu.c: 173 in amu_context_restore()
________________________________________________________________________________________________________ *** CID 1393341: Control flow issues (DEADCODE) /3rdparty/arm-trusted-firmware/lib/extensions/amu/aarch64/amu.c: 173 in amu_context_restore() 167 for (i = 0; i < AMU_GROUP0_NR_COUNTERS; i++) 168 if (AMU_GROUP0_COUNTERS_MASK & (1U << i)) 169 amu_group0_cnt_write(i, ctx->group0_cnts[i]); 170 171 /* Restore group 1 counters */ 172 for (i = 0; i < AMU_GROUP1_NR_COUNTERS; i++)
CID 1393341: Control flow issues (DEADCODE) Execution cannot reach this statement: "if (0U & (1U << i))
amu_g...". 173 if (AMU_GROUP1_COUNTERS_MASK & (1U << i)) 174 amu_group1_cnt_write(i, ctx->group1_cnts[i]); 175 isb(); 176 177 /* Restore group 0/1 counter configuration */ 178 write_amcntenset0_el0(AMU_GROUP0_COUNTERS_MASK);
** CID 1393340: Control flow issues (DEADCODE) /3rdparty/arm-trusted-firmware/lib/extensions/amu/aarch64/amu.c: 147 in amu_context_save()
________________________________________________________________________________________________________ *** CID 1393340: Control flow issues (DEADCODE) /3rdparty/arm-trusted-firmware/lib/extensions/amu/aarch64/amu.c: 147 in amu_context_save() 141 /* Save group 0 counters */ 142 for (i = 0; i < AMU_GROUP0_NR_COUNTERS; i++) 143 ctx->group0_cnts[i] = amu_group0_cnt_read(i); 144 145 /* Save group 1 counters */ 146 for (i = 0; i < AMU_GROUP1_NR_COUNTERS; i++)
CID 1393340: Control flow issues (DEADCODE) Execution cannot reach this statement: "ctx->group1_cnts[i] = amu_g...".
147 ctx->group1_cnts[i] = amu_group1_cnt_read(i); 148 149 return 0; 150 } 151 152 static void *amu_context_restore(const void *arg)
** CID 1393339: Integer handling issues (NO_EFFECT) /3rdparty/arm-trusted-firmware/lib/extensions/amu/aarch64/amu.c: 130 in amu_context_save()
________________________________________________________________________________________________________ *** CID 1393339: Integer handling issues (NO_EFFECT) /3rdparty/arm-trusted-firmware/lib/extensions/amu/aarch64/amu.c: 130 in amu_context_save() 124 return (void *)-1; 125 126 /* Assert that group 0/1 counter configuration is what we expect */ 127 assert(read_amcntenset0_el0() == AMU_GROUP0_COUNTERS_MASK && 128 read_amcntenset1_el0() == AMU_GROUP1_COUNTERS_MASK); 129
CID 1393339: Integer handling issues (NO_EFFECT) This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "0UL <= 0UL".
130 assert((sizeof(int) * 8) - __builtin_clz(AMU_GROUP1_COUNTERS_MASK) 131 <= AMU_GROUP1_NR_COUNTERS); 132 133 /* 134 * Disable group 0/1 counters to avoid other observers like SCP sampling 135 * counter values from the future via the memory mapped view.
** CID 1393338: Integer handling issues (NO_EFFECT) /3rdparty/arm-trusted-firmware/lib/extensions/amu/aarch64/amu.c: 163 in amu_context_restore()
________________________________________________________________________________________________________ *** CID 1393338: Integer handling issues (NO_EFFECT) /3rdparty/arm-trusted-firmware/lib/extensions/amu/aarch64/amu.c: 163 in amu_context_restore() 157 if (!amu_supported()) 158 return (void *)-1; 159 160 /* Counters were disabled in `amu_context_save()` */ 161 assert(read_amcntenset0_el0() == 0 && read_amcntenset1_el0() == 0); 162
CID 1393338: Integer handling issues (NO_EFFECT) This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "0UL <= 0UL".
163 assert((sizeof(int) * 8) - __builtin_clz(AMU_GROUP1_COUNTERS_MASK) 164 <= AMU_GROUP1_NR_COUNTERS); 165 166 /* Restore group 0 counters */ 167 for (i = 0; i < AMU_GROUP0_NR_COUNTERS; i++) 168 if (AMU_GROUP0_COUNTERS_MASK & (1U << i))
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05...