Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15960
-gerrit
commit 508e0752b1222cf3e305d546ae54ed76331471e7 Author: Patrick Georgi pgeorgi@chromium.org Date: Fri Jul 29 18:19:46 2016 +0200
sis/sis966: don't store a 32bit value in a 16bit variable
That only makes deviceid == 0 (because shifting a 16bit value by 16 bits, well...)
Change-Id: Iddca1de20760f92f70fe2d05886b488e5b48313d Signed-off-by: Patrick Georgi pgeorgi@chromium.org Found-by: Coverity Scan #1229558 --- src/southbridge/sis/sis966/sis966.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/southbridge/sis/sis966/sis966.c b/src/southbridge/sis/sis966/sis966.c index 308c604..6ac15db 100644 --- a/src/southbridge/sis/sis966/sis966.c +++ b/src/southbridge/sis/sis966/sis966.c @@ -71,9 +71,9 @@ void sis966_enable(device_t dev) int i;
if(dev->device==0x0000) { - vendorid = pci_read_config32(dev, PCI_VENDOR_ID); - deviceid = (vendorid>>16) & 0xffff; -// vendorid &= 0xffff; + reg = pci_read_config32(dev, PCI_VENDOR_ID); + deviceid = (reg >> 16) & 0xffff; + vendorid = reg & 0xffff; } else { // vendorid = dev->vendor; deviceid = dev->device;