Hi,

Please find the latest report on new defect(s) introduced to coreboot found 
with Coverity Scan.

1 new defect(s) introduced to coreboot found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1490493:    (OVERFLOW_BEFORE_WIDEN)
/src/soc/intel/baytrail/northcluster.c: 85 in nc_read_resources()
/src/soc/intel/baytrail/northcluster.c: 84 in nc_read_resources()


________________________________________________________________________________________________________
*** CID 1490493:    (OVERFLOW_BEFORE_WIDEN)
/src/soc/intel/baytrail/northcluster.c: 85 in nc_read_resources()
79      /* 0 -> 0xa0000 */
80      ram_from_to(dev, index++, 0, 0xa0000);
81     
82      /* The SMMRR registers are 1MiB granularity with smmrrh being
83       * inclusive of the SMM region. */
84      smmrrl = (iosf_bunit_read(BUNIT_SMRRL) & 0xffff) * MiB;
>>>     CID 1490493:    (OVERFLOW_BEFORE_WIDEN)
>>>     Potentially overflowing expression "((iosf_bunit_read(47) & 0xffffU) + 
>>> 1U) * 1048576U" 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).
85      smmrrh = ((iosf_bunit_read(BUNIT_SMRRH) & 0xffff) + 1) * MiB;
86     
87      /* 0xc0000 -> smrrl - cacheable and usable */
88      ram_from_to(dev, index++, 0xc0000, smmrrl);
89     
90      if (smmrrh > smmrrl)
/src/soc/intel/baytrail/northcluster.c: 84 in nc_read_resources()
78     
79      /* 0 -> 0xa0000 */
80      ram_from_to(dev, index++, 0, 0xa0000);
81     
82      /* The SMMRR registers are 1MiB granularity with smmrrh being
83       * inclusive of the SMM region. */
>>>     CID 1490493:    (OVERFLOW_BEFORE_WIDEN)
>>>     Potentially overflowing expression "(iosf_bunit_read(46) & 0xffffU) * 
>>> 1048576U" 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).
84      smmrrl = (iosf_bunit_read(BUNIT_SMRRL) & 0xffff) * MiB;
85      smmrrh = ((iosf_bunit_read(BUNIT_SMRRH) & 0xffff) + 1) * MiB;
86     
87      /* 0xc0000 -> smrrl - cacheable and usable */
88      ram_from_to(dev, index++, 0xc0000, smmrrl);
89     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yq2SfQfrHt3Prsn4qSLrYIrajINpiFX8l0vrlNSf8iCrS27qY0Cr0DkycwNUgGZJj8-3D34WY_L-2FDzr14mnrsJO5b1wX1hp9b1MAQygl7x-2B74RAaH2cn1AnQdln9pZV1MbmpSbvalhWbfdlPUzZRsmkwwurbBzIHivyC3SSOtYN1-2FXtj-2BhO8kJvg2kTfx4njsyYjhS8s7XNzmLyQuexOwfEXyK-2F4KeRDfYgk3t9gdT2M5M4TOQ14J2dYf-2BPvwJJQp1PT0ZVn-2BqLEeDAwR1Ek89ZRBQgpfKkw-3D-3D

_______________________________________________
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-le...@coreboot.org

Reply via email to