[coreboot-gerrit] New patch to review for coreboot: 081c416 AMD model fxx powernow_acpi.c: Fix incorrect loop count
Scott Duplichan (scott@notabs.org)
gerrit at coreboot.org
Sat Dec 13 04:58:14 CET 2014
Scott Duplichan (scott at notabs.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7791
-gerrit
commit 081c416c520c151ad3f0c56166c6cd2511a7d467
Author: Scott Duplichan <scott at notabs.org>
Date: Fri Dec 12 21:57:01 2014 -0600
AMD model fxx powernow_acpi.c: Fix incorrect loop count
powernow_acpi.c array TDP has 20 entries, yet the loop that reads it
processes 21 entries. This causes a gcc 4.9.2 build failure. Limit
processing to 20 entries.
Change-Id: Ice173b276293184386cd8943a3213f3154f86458
Signed-off-by: Scott Duplichan <scott at notabs.org>
---
src/cpu/amd/model_fxx/powernow_acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/amd/model_fxx/powernow_acpi.c b/src/cpu/amd/model_fxx/powernow_acpi.c
index b71b940..1665cf6 100644
--- a/src/cpu/amd/model_fxx/powernow_acpi.c
+++ b/src/cpu/amd/model_fxx/powernow_acpi.c
@@ -160,7 +160,7 @@ static void pstates_algorithm(u32 pcontrol_blk, u8 plen, u8 onlyBSP)
0x3000) >> 12;
cpuid1 = cpuid(0x80000001);
pwr_lmt = ((cpuid1.ebx & 0x1C0) >> 5) | ((cpuid1.ebx & 0x4000) >> 14);
- for (index = 0; index <= sizeof(TDP) / sizeof(TDP[0]); index++)
+ for (index = 0; index < sizeof(TDP) / sizeof(TDP[0]); index++)
if (TDP[index].socket_type == CONFIG_CPU_SOCKET_TYPE &&
TDP[index].cmp_cap == cmp_cap &&
TDP[index].pwr_lmt == pwr_lmt) {
More information about the coreboot-gerrit
mailing list