From 68f5f62fca990471f6c252f964bf350e35ff68b5 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 29 May 2015 21:43:42 +0200 Subject: [PATCH] autoport/bd82x6x: Fix off-by-one error Change-Id: Ibd5c8a1364ab183f72e12cc9b450a36200fe3fde Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/10371 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- util/autoport/bd82x6x.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/autoport/bd82x6x.go b/util/autoport/bd82x6x.go index 91538bd0d1..4a0f5031e8 100644 --- a/util/autoport/bd82x6x.go +++ b/util/autoport/bd82x6x.go @@ -105,7 +105,7 @@ func ich9GetFlashSize(ctx Context) { highflkb := uint32(0) for reg := uint16(0); reg < 5; reg++ { fl := (inteltool.RCBA[0x3854+4*reg] >> 16) & 0x1fff - flkb := fl << 2 + flkb := (fl + 1) << 2 if flkb > highflkb { highflkb = flkb }