Hi,
Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.
2 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 2 of 2 defect(s)
** CID 1443794: Integer handling issues (OVERFLOW_BEFORE_WIDEN) /src/soc/amd/picasso/agesa_acpi.c: 555 in gen_crat_memory_entries()
________________________________________________________________________________________________________ *** CID 1443794: Integer handling issues (OVERFLOW_BEFORE_WIDEN) /src/soc/amd/picasso/agesa_acpi.c: 555 in gen_crat_memory_entries() 549 dram_limit_reg = data_fabric_read_reg32(0, DF_DRAM_LIMIT(dram_map_idx), 550 IOMS0_FABRIC_ID); 551 memory_length = 552 ((dram_limit_reg & DRAM_LIMIT_ADDR) >> DRAM_LIMIT_ADDR_SHFT) + 1 553 - ((dram_base_reg & DRAM_BASE_ADDR) >> DRAM_BASE_ADDR_SHFT); 554 memory_length = memory_length << 28;
CID 1443794: Integer handling issues (OVERFLOW_BEFORE_WIDEN) Potentially overflowing expression "(dram_base_reg & 0xfffff000U) << 16" with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "uint64_t" (64 bits, unsigned).
555 memory_base = (dram_base_reg & DRAM_BASE_ADDR) 556 << (28 - DRAM_BASE_ADDR_SHFT); 557 558 if (memory_base == 0) { 559 current = 560 create_crat_memory_entry(0, 0ull, 0xa0000ull, current);
** CID 1443793: Integer handling issues (OVERFLOW_BEFORE_WIDEN) /src/soc/amd/picasso/agesa_acpi.c: 573 in gen_crat_memory_entries()
________________________________________________________________________________________________________ *** CID 1443793: Integer handling issues (OVERFLOW_BEFORE_WIDEN) /src/soc/amd/picasso/agesa_acpi.c: 573 in gen_crat_memory_entries() 567 dram_hole_ctl = data_fabric_read_reg32(0, D18F0_DRAM_HOLE_CTL, 568 IOMS0_FABRIC_ID); 569 hole_base = (dram_hole_ctl & DRAM_HOLE_CTL_BASE); 570 size_below_hole = hole_base - memory_base; 571 current = create_crat_memory_entry(0, memory_base, 572 size_below_hole, current);
CID 1443793: Integer handling issues (OVERFLOW_BEFORE_WIDEN) Potentially overflowing expression "((dram_limit_reg & 0xfffff000U) >> 12) + 1U - 16U << 28" with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type "uint64_t" (64 bits, unsigned).
573 memory_length = (((dram_limit_reg & DRAM_LIMIT_ADDR) 574 >> DRAM_LIMIT_ADDR_SHFT) 575 + 1 - 0x10) 576 << 28; 577 memory_base = 0x100000000; 578 new_entries++;
________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0...