Hi,
Please find the latest report on new defect(s) introduced to coreboot found
with Coverity Scan.
17 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 17 of 17 defect(s)
** CID 1452607: Control flow issues (DEADCODE)
/src/drivers/elog/elog.c: 798 in elog_init()
________________________________________________________________________________________________________
*** CID 1452607: Control flow issues (DEADCODE)
/src/drivers/elog/elog.c: 798 in elog_init()
792 if (elog_find_flash() < 0)
793 return -1;
794
795 elog_size = region_device_sz(&elog_state.nv_dev);
796 mirror_buffer = elog_mirror_buf;
797 if (!mirror_buffer) {
>>> CID 1452607: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(3, "ELOG: Unable to ...".
798 printk(BIOS_ERR, "ELOG: Unable to allocate backing
store\n");
799 return -1;
800 }
801 mem_region_device_rw_init(&elog_state.mirror_dev, mirror_buffer,
802 elog_size);
803
** CID 1452606: Possible Control flow issues (DEADCODE)
/src/cpu/intel/common/common_init.c: 62 in set_feature_ctrl_vmx()
________________________________________________________________________________________________________
*** CID 1452606: Possible Control flow issues (DEADCODE)
/src/cpu/intel/common/common_init.c: 62 in set_feature_ctrl_vmx()
56 }
57 }
58 }
59
60 wrmsr(IA32_FEATURE_CONTROL, msr);
61
>>> CID 1452606: Possible Control flow issues (DEADCODE)
>>> Execution cannot reach the expression ""disabled"" inside this
>>> statement: "printk(7, "VMX status: %s\n...".
62 printk(BIOS_DEBUG, "VMX status: %s\n",
63 enable ? "enabled" : "disabled");
64 }
65 void set_feature_ctrl_lock(void)
66 {
67 msr_t msr;
** CID 1452605: Control flow issues (DEADCODE)
/src/drivers/net/atl1e.c: 130 in atl1e_init()
________________________________________________________________________________________________________
*** CID 1452605: Control flow issues (DEADCODE)
/src/drivers/net/atl1e.c: 130 in atl1e_init()
124 printk(BIOS_INFO, "atl1e NIC has SPI eeprom, not
setting MAC\n");
125 return;
126 }
127
128 /* Check if the base is invalid */
129 if (!mem_base) {
>>> CID 1452605: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(3, "atl1e: Error can...".
130 printk(BIOS_ERR, "atl1e: Error cant find MEM
resource\n");
131 return;
132 }
133 /* Enable but do not set bus master */
134 pci_write_config16(dev, PCI_COMMAND,
135 PCI_COMMAND_MEMORY | PCI_COMMAND_IO);
** CID 1452604: Possible Control flow issues (DEADCODE)
/src/cpu/intel/common/common_init.c: 93 in set_feature_ctrl_lock()
________________________________________________________________________________________________________
*** CID 1452604: Possible Control flow issues (DEADCODE)
/src/cpu/intel/common/common_init.c: 93 in set_feature_ctrl_lock()
87 if (lock) {
88 /* Set lock bit */
89 msr.lo |= (1 << 0);
90 wrmsr(IA32_FEATURE_CONTROL, msr);
91 }
92
>>> CID 1452604: Possible Control flow issues (DEADCODE)
>>> Execution cannot reach the expression ""unlocked"" inside this
>>> statement: "printk(7, "IA32_FEATURE_CON...".
93 printk(BIOS_DEBUG, "IA32_FEATURE_CONTROL status: %s\n",
94 lock ? "locked" : "unlocked");
95 }
96
97 /*
98 * Init cppc_config in a way that's appropriate for Intel
** CID 1452603: Control flow issues (DEADCODE)
/src/drivers/i2c/ww_ring/ww_ring.c: 391 in ww_ring_init()
________________________________________________________________________________________________________
*** CID 1452603: Control flow issues (DEADCODE)
/src/drivers/i2c/ww_ring/ww_ring.c: 391 in ww_ring_init()
385 ledc->dev_addr = 0; /* Mark disabled. */
386 }
387
388 printk(BIOS_INFO, "WW_RING: initialized %d out of %d\n", count,
i);
389 if (count != i) {
390 if (count)
>>> CID 1452603: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(4, "WW_RING: will ke...".
391 printk(BIOS_WARNING,
392 "WW_RING: will keep going anyway\n");
393 else
394 printk(BIOS_WARNING,
395 "WW_RING: LED ring not present\n");
396 }
** CID 1452602: Control flow issues (UNREACHABLE)
/src/cpu/x86/smm/smm_module_loaderv2.c: 461 in smm_setup_relocation_handler()
________________________________________________________________________________________________________
*** CID 1452602: Control flow issues (UNREACHABLE)
/src/cpu/x86/smm/smm_module_loaderv2.c: 461 in smm_setup_relocation_handler()
455 * of concurrent stack users to be CONFIG_MAX_CPUS. */
456 if (params->num_concurrent_stacks == 0)
457 params->num_concurrent_stacks = CONFIG_MAX_CPUS;
458
459 return smm_module_setup_stub(smram, SMM_DEFAULT_SIZE,
460 params, fxsave_area_relocation, smram);
>>> CID 1452602: Control flow issues (UNREACHABLE)
>>> This code cannot be reached: "printk(8, "%s: exit\n", <an...".
461 printk(BIOS_SPEW, "%s: exit\n", __func__);
462 }
463
464 /*
465 *The SMM module is placed within the provided region in the following
466 * manner:
** CID 1452601: Control flow issues (DEADCODE)
/src/drivers/ipmi/ipmi_fru.c: 43 in ipmi_read_fru()
________________________________________________________________________________________________________
*** CID 1452601: Control flow issues (DEADCODE)
/src/drivers/ipmi/ipmi_fru.c: 43 in ipmi_read_fru()
37 ret = ipmi_kcs_message(port, IPMI_NETFN_STORAGE, 0x0,
38 IPMI_READ_FRU_DATA, (const unsigned
char *) req,
39 sizeof(*req), (unsigned char *) &rsp,
sizeof(rsp));
40 if (rsp.resp.completion_code == 0x81) {
41 /* Device is busy */
42 if (retry_count == MAX_FRU_BUSY_RETRY) {
>>> CID 1452601: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(3, "IPMI: %s command...".
43 printk(BIOS_ERR, "IPMI: %s command
failed, "
44 "device busy timeout\n",
__func__);
45 return CB_ERR;
46 }
47 printk(BIOS_ERR, "IPMI: FRU device is busy, "
48 "retry count:%d\n", retry_count);
** CID 1261216: Control flow issues (DEADCODE)
/src/soc/samsung/exynos5420/dp_lowlevel.c: 448 in
exynos_dp_start_aux_transaction()
________________________________________________________________________________________________________
*** CID 1261216: Control flow issues (DEADCODE)
/src/soc/samsung/exynos5420/dp_lowlevel.c: 448 in
exynos_dp_start_aux_transaction()
442
443 retry_cnt = 10;
444 while (retry_cnt) {
445 reg = lread32(&dp_regs->int_sta);
446 if (!(reg & RPLY_RECEIV)) {
447 if (retry_cnt == 0) {
>>> CID 1261216: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(3, "DP Reply Timeout...".
448 printk(BIOS_ERR, "DP Reply
Timeout!!\n");
449 ret = -1;
450 return ret;
451 }
452 mdelay(1);
453 retry_cnt--;
** CID 1261189: Control flow issues (DEADCODE)
/src/soc/nvidia/tegra124/dp.c: 243 in tegra_dc_dpaux_read_chunk()
________________________________________________________________________________________________________
*** CID 1261189: Control flow issues (DEADCODE)
/src/soc/nvidia/tegra124/dp.c: 243 in tegra_dc_dpaux_read_chunk()
237 timeout_retries);
238 /* clear the error bits */
239 tegra_dpaux_writel(dp, DPAUX_DP_AUXSTAT,
240 *aux_stat);
241 continue; /* retry */
242 } else {
>>> CID 1261189: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(3, "dp: aux read got...".
243 printk(BIOS_ERR, "dp: aux read got
error"
244 " (0x%x)\n", *aux_stat);
245 return -1;
246 }
247 }
248
** CID 1261055: Control flow issues (DEADCODE)
/src/soc/nvidia/tegra124/dp.c: 145 in tegra_dc_dpaux_write_chunk()
________________________________________________________________________________________________________
*** CID 1261055: Control flow issues (DEADCODE)
/src/soc/nvidia/tegra124/dp.c: 145 in tegra_dc_dpaux_write_chunk()
139 printk(BIOS_INFO, "dp: aux write retry
(0x%x) -- %d\n",
140 *aux_stat, timeout_retries);
141 /* clear the error bits */
142 tegra_dpaux_writel(dp,
DPAUX_DP_AUXSTAT, *aux_stat);
143 continue;
144 } else {
>>> CID 1261055: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(3, "dp: aux write go...".
145 printk(BIOS_ERR, "dp: aux write got
error (0x%x)\n",
146 *aux_stat);
147 return -1;
148 }
149 }
150
** CID 1261018: Control flow issues (DEADCODE)
/src/soc/samsung/exynos5420/dp.c: 785 in exynos_dp_config_video()
________________________________________________________________________________________________________
*** CID 1261018: Control flow issues (DEADCODE)
/src/soc/samsung/exynos5420/dp.c: 785 in exynos_dp_config_video()
779 if (edp_info->video_info.master_mode == 0) {
780 retry_cnt = 10;
781 while (retry_cnt) {
782 ret =
exynos_dp_is_slave_video_stream_clock_on();
783 if (ret != EXYNOS_DP_SUCCESS) {
784 if (retry_cnt == 0) {
>>> CID 1261018: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(3, "DP stream_clock_...".
785 printk(BIOS_ERR, "DP
stream_clock_on failed\n");
786 return ret;
787 }
788 retry_cnt--;
789 mdelay(1);
790 } else {
** CID 1260932: Control flow issues (DEADCODE)
/src/soc/nvidia/tegra124/dp.c: 258 in tegra_dc_dpaux_read_chunk()
________________________________________________________________________________________________________
*** CID 1260932: Control flow issues (DEADCODE)
/src/soc/nvidia/tegra124/dp.c: 258 in tegra_dc_dpaux_read_chunk()
252 printk(BIOS_INFO, "dp: aux read defer
(0x%x) -- %d\n",
253 *aux_stat, defer_retries);
254 /* clear the error bits */
255 tegra_dpaux_writel(dp,
DPAUX_DP_AUXSTAT, *aux_stat);
256 continue;
257 } else {
>>> CID 1260932: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(6, "dp: aux read def...".
258 printk(BIOS_INFO, "dp: aux read defer
exceeds max retries "
259 "(0x%x)\n", *aux_stat);
260 return -1;
261 }
262 }
263
** CID 1260909: Control flow issues (DEADCODE)
/src/cpu/x86/mp_init.c: 431 in start_aps()
________________________________________________________________________________________________________
*** CID 1260909: Control flow issues (DEADCODE)
/src/cpu/x86/mp_init.c: 431 in start_aps()
425 return 0;
426
427 /* The vector is sent as a 4k aligned address in one byte. */
428 sipi_vector = sipi_vector_location >> 12;
429
430 if (sipi_vector > max_vector_loc) {
>>> CID 1260909: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(2, "SIPI vector too ...".
431 printk(BIOS_CRIT, "SIPI vector too large! 0x%08x\n",
432 sipi_vector);
433 return -1;
434 }
435
436 printk(BIOS_DEBUG, "Attempting to start %d APs\n", ap_count);
** CID 1260903: Control flow issues (DEADCODE)
/src/soc/samsung/exynos5420/dp.c: 173 in exynos_dp_handle_edid()
________________________________________________________________________________________________________
*** CID 1260903: Control flow issues (DEADCODE)
/src/soc/samsung/exynos5420/dp.c: 173 in exynos_dp_handle_edid()
167 while (retry_cnt) {
168 /* Read DPCD 0x0000-0x000b */
169 ret = exynos_dp_read_bytes_from_dpcd(DPCD_DPCD_REV, 12,
170 buf);
171 if (ret != EXYNOS_DP_SUCCESS) {
172 if (retry_cnt == 0) {
>>> CID 1260903: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(3, "DP read_byte_fro...".
173 printk(BIOS_ERR, "DP
read_byte_from_dpcd() failed\n");
174 return ret;
175 }
176 retry_cnt--;
177 } else
178 break;
** CID 1260846: Control flow issues (DEADCODE)
/src/soc/intel/braswell/southcluster.c: 109 in write_pci_config_irqs()
________________________________________________________________________________________________________
*** CID 1260846: Control flow issues (DEADCODE)
/src/soc/intel/braswell/southcluster.c: 109 in write_pci_config_irqs()
103 uint16_t parent_bdf = 0;
104 uint8_t pirq = 0;
105 uint8_t device_num = 0;
106 const struct soc_irq_route *ir = &global_soc_irq_route;
107
108 if (ir == NULL) {
>>> CID 1260846: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(4, "Warning: Can't w...".
109 printk(BIOS_WARNING, "Warning: Can't write PCI IRQ
assignments "
110 "because 'global_braswell_irq_route' structure
does not exist\n");
111 return;
112 }
113
114 /*
** CID 1260827: Control flow issues (DEADCODE)
/src/soc/samsung/exynos5420/dp_lowlevel.c: 666 in
exynos_dp_read_bytes_from_dpcd()
________________________________________________________________________________________________________
*** CID 1260827: Control flow issues (DEADCODE)
/src/soc/samsung/exynos5420/dp_lowlevel.c: 666 in
exynos_dp_read_bytes_from_dpcd()
660 lwrite32(reg, &dp_regs->aux_ch_ctl1);
661
662 /* Start AUX transaction */
663 ret = exynos_dp_start_aux_transaction();
664 if (ret != EXYNOS_DP_SUCCESS) {
665 if (retry_cnt == 0) {
>>> CID 1260827: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(3, "DP Aux Transacti...".
666 printk(BIOS_ERR, "DP Aux
Transaction failed\n");
667 return ret;
668 }
669 retry_cnt--;
670 } else
671 break;
** CID 1260783: Control flow issues (DEADCODE)
/src/soc/nvidia/tegra124/dp.c: 160 in tegra_dc_dpaux_write_chunk()
________________________________________________________________________________________________________
*** CID 1260783: Control flow issues (DEADCODE)
/src/soc/nvidia/tegra124/dp.c: 160 in tegra_dc_dpaux_write_chunk()
154 printk(BIOS_INFO, "dp: aux write defer
(0x%x) -- %d\n",
155 *aux_stat, defer_retries);
156 /* clear the error bits */
157 tegra_dpaux_writel(dp,
DPAUX_DP_AUXSTAT, *aux_stat);
158 continue;
159 } else {
>>> CID 1260783: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "printk(3, "dp: aux write de...".
160 printk(BIOS_ERR, "dp: aux write defer
exceeds max retries "
161 "(0x%x)\n", *aux_stat);
162 return -1;
163 }
164 }
165
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yq2SfQfrHt3Prsn4qSLrYIrajINpiFX8l0vrlNSf8iCrS27qY0Cr0DkycwNUgGZJj8-3D0vcq_L-2FDzr14mnrsJO5b1wX1hp9b1MAQygl7x-2B74RAaH2cn29JAyyBUHYVnRYW7YN8uREcgcuNbYC9K47XsK3vf-2FewpxysofL4h-2F5qZ6edzWIjhKp4lQBkWAUP13JZ1pP5xvGuJmTgANwmka6QbiA4cXygDJSSBjZLqEvmZuZ-2F94AAV7mi9xlrXgd3bbj21mRuRShkqxdxHe1f0-2Fzz4rHPHiOdexP8zbJv4wX7baMR0JsKbA-3D
_______________________________________________
coreboot mailing list -- [email protected]
To unsubscribe send an email to [email protected]