Julien Viard de Galbert has uploaded this change for review. ( https://review.coreboot.org/25429
Change subject: soc/intel/common/block/acpi: fix P-States extra entry
......................................................................
soc/intel/common/block/acpi: fix P-States extra entry
The ratio_max step is appearing twice when PSS_RATIO_STEP is 1
This is because in this case there are no rounding down of ratio_max in
the for loop.
Change-Id: I91090b4d87eb82b57055c24271d679d1cbb3b7a7
Signed-off-by: Julien Viard de Galbert <jviarddegalbert(a)online.net>
---
M src/soc/intel/common/block/acpi/acpi.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/25429/1
diff --git a/src/soc/intel/common/block/acpi/acpi.c b/src/soc/intel/common/block/acpi/acpi.c
index ae0617d..68fe944 100644
--- a/src/soc/intel/common/block/acpi/acpi.c
+++ b/src/soc/intel/common/block/acpi/acpi.c
@@ -324,7 +324,9 @@
/* Determine ratio points */
ratio_step = PSS_RATIO_STEP;
- num_entries = ((ratio_max - ratio_min) / ratio_step) + 1;
+ num_entries = ((ratio_max - ratio_min) / ratio_step);
+ if (PSS_RATIO_STEP != 1)
+ num_entries += 1;
if (num_entries > PSS_MAX_ENTRIES) {
ratio_step += 1;
num_entries = ((ratio_max - ratio_min) / ratio_step) + 1;
--
To view, visit https://review.coreboot.org/25429
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I91090b4d87eb82b57055c24271d679d1cbb3b7a7
Gerrit-Change-Number: 25429
Gerrit-PatchSet: 1
Gerrit-Owner: Julien Viard de Galbert <jviarddegalbert(a)online.net>
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/25425 )
Change subject: soc/intel/skylake: ME status value is over status array boundary
......................................................................
Patch Set 1: Verified+1
Build Successful
https://qa.coreboot.org/job/coreboot-gerrit/69194/ : SUCCESS
https://qa.coreboot.org/job/coreboot-checkpatch/23543/ : SUCCESS
--
To view, visit https://review.coreboot.org/25425
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5de569c62b94b0595d3d3ea254f50e312e8c11a4
Gerrit-Change-Number: 25425
Gerrit-PatchSet: 1
Gerrit-Owner: Kane Chen <kane.chen(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Thu, 29 Mar 2018 11:56:50 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Kane Chen has uploaded this change for review. ( https://review.coreboot.org/25425
Change subject: soc/intel/skylake: ME status value is over status array boundary
......................................................................
soc/intel/skylake: ME status value is over status array boundary
me_progress_rom_values array provides detailed information maps to
ME HFSTS2 register value.
There is a chance that ME status value might be over the size of
me_progress_rom_values.
This commit adds a check before access the array.
BUG=b:77247550
Change-Id: I5de569c62b94b0595d3d3ea254f50e312e8c11a4
Signed-off-by: Kane Chen <kane.chen(a)intel.com>
---
M src/soc/intel/skylake/me.c
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/25425/1
diff --git a/src/soc/intel/skylake/me.c b/src/soc/intel/skylake/me.c
index 9a721bc..a23172e 100644
--- a/src/soc/intel/skylake/me.c
+++ b/src/soc/intel/skylake/me.c
@@ -346,8 +346,14 @@
printk(BIOS_DEBUG, "ME: Progress Phase State : ");
switch (hfs2.fields.progress_code) {
case ME_HFS2_PHASE_ROM: /* ROM Phase */
- printk(BIOS_DEBUG, "%s",
- me_progress_rom_values[hfs2.fields.current_state]);
+ if (hfs2.fields.current_state
+ < ARRAY_SIZE(me_progress_rom_values)
+ && me_progress_rom_values[hfs2.fields.current_state])
+ printk(BIOS_DEBUG, "%s",
+ me_progress_rom_values[
+ hfs2.fields.current_state]);
+ else
+ printk(BIOS_DEBUG, "0x%02x", hfs2.fields.current_state);
break;
case ME_HFS2_PHASE_UKERNEL: /* uKernel Phase */
--
To view, visit https://review.coreboot.org/25425
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5de569c62b94b0595d3d3ea254f50e312e8c11a4
Gerrit-Change-Number: 25425
Gerrit-PatchSet: 1
Gerrit-Owner: Kane Chen <kane.chen(a)intel.com>