Attention is currently required from: Hung-Te Lin, Jarried Lin, Shunxi Zhang, Yu-Ping Wu.
Hello Hung-Te Lin, Yidi Lin, Yu-Ping Wu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/85978?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: soc/mediatek/mt8196: Add RTC driver
......................................................................
soc/mediatek/mt8196: Add RTC driver
Add RTC drivers for MT6685.
TEST=build pass.
BUG=b:317009620
Change-Id: I3dd337eaa3eed3012ddea300f7e04f2b63fb2daa
Signed-off-by: Shunxi Zhang <ot_shunxi.zhang(a)mediatek.com>
---
M src/soc/mediatek/common/include/soc/rtc_common.h
M src/soc/mediatek/common/rtc_osc_init.c
M src/soc/mediatek/mt8196/Makefile.mk
A src/soc/mediatek/mt8196/include/soc/mt6685_hw.h
A src/soc/mediatek/mt8196/include/soc/mt6685_rtc.h
A src/soc/mediatek/mt8196/include/soc/mt6685_rtc_hw.h
A src/soc/mediatek/mt8196/include/soc/rtc.h
A src/soc/mediatek/mt8196/mt6685_rtc.c
8 files changed, 1,976 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/85978/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/85978?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I3dd337eaa3eed3012ddea300f7e04f2b63fb2daa
Gerrit-Change-Number: 85978
Gerrit-PatchSet: 4
Gerrit-Owner: Jarried Lin <jarried.lin(a)mediatek.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Shunxi Zhang <ot_shunxi.zhang(a)mediatek.corp-partner.google.com>
Gerrit-Attention: Shunxi Zhang <ot_shunxi.zhang(a)mediatek.corp-partner.google.com>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Jarried Lin <jarried.lin(a)mediatek.com>
Attention is currently required from: Jayvik Desai, Pranava Y N, Tongtong Pan.
Weimin Wu has posted comments on this change by Tongtong Pan. ( https://review.coreboot.org/c/coreboot/+/85965?usp=email )
Change subject: mb/google/fatcat/var/felino: Modify the felino config for probing TPM I2C
......................................................................
Patch Set 3: Code-Review+1
--
To view, visit https://review.coreboot.org/c/coreboot/+/85965?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I093c0bad181f133e601f3270de68c0848f847ccf
Gerrit-Change-Number: 85965
Gerrit-PatchSet: 3
Gerrit-Owner: Tongtong Pan <pantongtong(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: Jayvik Desai <jayvik(a)google.com>
Gerrit-Reviewer: Pranava Y N <pranavayn(a)google.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Weimin Wu <wuweimin(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Dolan Liu <liuyong5(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Jayvik Desai <jayvik(a)google.com>
Gerrit-Attention: Tongtong Pan <pantongtong(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Pranava Y N <pranavayn(a)google.com>
Gerrit-Comment-Date: Mon, 20 Jan 2025 03:43:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Hung-Te Lin, Yidi Lin.
Hello Hung-Te Lin, Yidi Lin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/86059?usp=email
to look at the new patch set (#2).
Change subject: soc/mediatek/mt8196: Rename mtk_pwrsel.* to pwrsel.*
......................................................................
soc/mediatek/mt8196: Rename mtk_pwrsel.* to pwrsel.*
As the mtk_pwrsel.{c,h} files are already under the soc/mediatek
directory, drop the file name prefix "mtk_" from them.
BUG=b:317009620
TEST=none
Change-Id: I28131d44067c33b5d8682a85cc8a73fc42604de3
Signed-off-by: Yu-Ping Wu <yupingso(a)chromium.org>
---
M src/mainboard/google/rauru/romstage.c
M src/soc/mediatek/mt8196/Makefile.mk
R src/soc/mediatek/mt8196/include/soc/pwrsel.h
R src/soc/mediatek/mt8196/pwrsel.c
4 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/86059/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/86059?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I28131d44067c33b5d8682a85cc8a73fc42604de3
Gerrit-Change-Number: 86059
Gerrit-PatchSet: 2
Gerrit-Owner: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Attention is currently required from: Jayvik Desai, Pranava Y N, Tongtong Pan, Weimin Wu.
Subrata Banik has posted comments on this change by Tongtong Pan. ( https://review.coreboot.org/c/coreboot/+/85965?usp=email )
Change subject: mb/google/fatcat/var/felino: Modify the felino config for probing TPM I2C
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/85965?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I093c0bad181f133e601f3270de68c0848f847ccf
Gerrit-Change-Number: 85965
Gerrit-PatchSet: 3
Gerrit-Owner: Tongtong Pan <pantongtong(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: Jayvik Desai <jayvik(a)google.com>
Gerrit-Reviewer: Pranava Y N <pranavayn(a)google.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Weimin Wu <wuweimin(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Dolan Liu <liuyong5(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Jayvik Desai <jayvik(a)google.com>
Gerrit-Attention: Weimin Wu <wuweimin(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Tongtong Pan <pantongtong(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Pranava Y N <pranavayn(a)google.com>
Gerrit-Comment-Date: Mon, 20 Jan 2025 03:38:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Jayvik Desai, Pranava Y N, Subrata Banik, Weimin Wu.
Hello Jayvik Desai, Pranava Y N, Subrata Banik, Weimin Wu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/85965?usp=email
to look at the new patch set (#3).
Change subject: mb/google/fatcat/var/felino: Modify the felino config for probing TPM I2C
......................................................................
mb/google/fatcat/var/felino: Modify the felino config for probing TPM I2C
Modify the configuration to detect TPM I2C correctly.
BUG=b:388982526
TEST=abuild -v -a -x -c max -p none -t google/fatcat -b felino
Change-Id: I093c0bad181f133e601f3270de68c0848f847ccf
Signed-off-by: Tongtong Pan <pantongtong(a)huaqin.corp-partner.google.com>
---
M src/mainboard/google/fatcat/Kconfig
M src/mainboard/google/fatcat/variants/felino/gpio.c
M src/mainboard/google/fatcat/variants/felino/overridetree.cb
3 files changed, 14 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/85965/3
--
To view, visit https://review.coreboot.org/c/coreboot/+/85965?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I093c0bad181f133e601f3270de68c0848f847ccf
Gerrit-Change-Number: 85965
Gerrit-PatchSet: 3
Gerrit-Owner: Tongtong Pan <pantongtong(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: Jayvik Desai <jayvik(a)google.com>
Gerrit-Reviewer: Pranava Y N <pranavayn(a)google.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Weimin Wu <wuweimin(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Dolan Liu <liuyong5(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Jayvik Desai <jayvik(a)google.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Weimin Wu <wuweimin(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Pranava Y N <pranavayn(a)google.com>
Attention is currently required from: Jayvik Desai, Pranava Y N, Subrata Banik, Weimin Wu.
Tongtong Pan has posted comments on this change by Tongtong Pan. ( https://review.coreboot.org/c/coreboot/+/85965?usp=email )
Change subject: mb/google/fatcat/var/felino: Modify the felino config for probing TPM I2C
......................................................................
Patch Set 2:
(5 comments)
File src/mainboard/google/fatcat/variants/felino/gpio.c:
https://review.coreboot.org/c/coreboot/+/85965/comment/b6c289fa_acd110c7?us… :
PS1, Line 281: PAD_CFG_GPI_APIC
> locking make sense for ramstage but I won't lock a PAD with interrupt configuration
Done
https://review.coreboot.org/c/coreboot/+/85965/comment/653c3ff2_8fc1ee5e?us… :
PS1, Line 407: PAD_CFG_GPI_APIC_LOCK
> please don't use lock macro for early GPIO configuration
Done
https://review.coreboot.org/c/coreboot/+/85965/comment/d2df5fe0_2de33919?us… :
PS1, Line 422: PAD_CFG_GPI_APIC_LOCK
> same as above
Done
https://review.coreboot.org/c/coreboot/+/85965/comment/5f404074_e3e084bb?us… :
PS1, Line 415: PAD_CFG_NF(GPP_C04, NONE, DEEP, NF1),
:
: /* GPP_H21: PCH_I2C_GSC_SDA */
: PAD_CFG_NF(GPP_H21, NONE, DEEP, NF1),
: /* GPP_H22: PCH_I2C_GSC_SCL */
: PAD_CFG_NF(GPP_H22, NONE, DEEP, NF1),
: /* GPP_F15: SPI_TPM_INT_N */
: PAD_CFG_GPI_APIC_LOCK(GPP_F15, NONE, LEVEL, INVERT, LOCK_CONFIG),
> I don't think it's necessary to add these in romstage.
Done
File src/mainboard/google/fatcat/variants/felino/overridetree.cb:
https://review.coreboot.org/c/coreboot/+/85965/comment/29b43427_88a690ab?us… :
PS1, Line 50: register "serial_io_i2c_mode" = "{
: [PchSerialIoIndexI2C0] = PchSerialIoPci,
: [PchSerialIoIndexI2C1] = PchSerialIoPci,
: [PchSerialIoIndexI2C4] = PchSerialIoPci,
: }"
> looking at the below description I2C0 seems unused ? is this required to be enabled for making i2c1 […]
Yes,i2c0 is function 0; hence it needs to be enabled when any of i2c1-5 is enabled.
--
To view, visit https://review.coreboot.org/c/coreboot/+/85965?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I093c0bad181f133e601f3270de68c0848f847ccf
Gerrit-Change-Number: 85965
Gerrit-PatchSet: 2
Gerrit-Owner: Tongtong Pan <pantongtong(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: Jayvik Desai <jayvik(a)google.com>
Gerrit-Reviewer: Pranava Y N <pranavayn(a)google.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Weimin Wu <wuweimin(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Dolan Liu <liuyong5(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Jayvik Desai <jayvik(a)google.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Weimin Wu <wuweimin(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Pranava Y N <pranavayn(a)google.com>
Gerrit-Comment-Date: Mon, 20 Jan 2025 03:34:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Subrata Banik <subratabanik(a)google.com>
Comment-In-Reply-To: Weimin Wu <wuweimin(a)huaqin.corp-partner.google.com>
Attention is currently required from: Pranava Y N, Tongtong Pan.
Hello Pranava Y N, Subrata Banik, Weimin Wu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/85965?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: mb/google/fatcat/var/felino: Modify the felino config for probing TPM I2C
......................................................................
mb/google/fatcat/var/felino: Modify the felino config for probing TPM I2C
Modify the configuration to detect TPM I2C correctly.
BUG=b:388982526
TEST=abuild -v -a -x -c max -p none -t google/fatcat -b felino
Change-Id: I093c0bad181f133e601f3270de68c0848f847ccf
Signed-off-by: Tongtong Pan <pantongtong(a)huaqin.corp-partner.google.com>
---
M src/mainboard/google/fatcat/Kconfig
M src/mainboard/google/fatcat/variants/felino/gpio.c
M src/mainboard/google/fatcat/variants/felino/overridetree.cb
3 files changed, 13 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/85965/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/85965?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I093c0bad181f133e601f3270de68c0848f847ccf
Gerrit-Change-Number: 85965
Gerrit-PatchSet: 2
Gerrit-Owner: Tongtong Pan <pantongtong(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: Pranava Y N <pranavayn(a)google.com>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Weimin Wu <wuweimin(a)huaqin.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Dolan Liu <liuyong5(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Tongtong Pan <pantongtong(a)huaqin.corp-partner.google.com>
Gerrit-Attention: Pranava Y N <pranavayn(a)google.com>
Elyes Haouas has submitted this change. ( https://review.coreboot.org/c/coreboot/+/86040?usp=email )
Change subject: tree: Handle NULL pointer returned by smm_get_save_state()
......................................................................
tree: Handle NULL pointer returned by smm_get_save_state()
Since commit 64d9e8568172402d8078c2c80ba994da16f4745b
("cpu/x86/smm_module_hander: Set up a save state map"), the
smm_get_save_state() function can return a NULL pointer. Therefore, it
is crucial to ensure that code properly handles the potential for a
NULL pointer return value from smm_get_save_state().
Change-Id: Ie263393ca7d9d6b5e9868c5f73240fc788116cd0
Signed-off-by: Jeremy Compostella <jeremy.compostella(a)intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86040
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas(a)noos.fr>
---
M src/soc/amd/common/block/cpu/smm/smi_apmc.c
M src/soc/intel/braswell/smihandler.c
M src/soc/intel/broadwell/pch/smihandler.c
M src/soc/intel/denverton_ns/smihandler.c
M src/southbridge/intel/common/smihandler.c
M src/southbridge/intel/lynxpoint/smihandler.c
6 files changed, 12 insertions(+), 0 deletions(-)
Approvals:
Elyes Haouas: Looks good to me, approved
build bot (Jenkins): Verified
diff --git a/src/soc/amd/common/block/cpu/smm/smi_apmc.c b/src/soc/amd/common/block/cpu/smm/smi_apmc.c
index 9df6ae3..7c98405 100644
--- a/src/soc/amd/common/block/cpu/smm/smi_apmc.c
+++ b/src/soc/amd/common/block/cpu/smm/smi_apmc.c
@@ -33,6 +33,8 @@
/* Check all nodes looking for the one that issued the IO */
for (core = 0; core < CONFIG_MAX_CPUS; core++) {
state = smm_get_save_state(core);
+ if (!state)
+ continue;
smm_io_trap = state->smm_io_trap_offset;
/* Check for Valid IO Trap Word (bit1==1) */
if (!(smm_io_trap & SMM_IO_TRAP_VALID))
diff --git a/src/soc/intel/braswell/smihandler.c b/src/soc/intel/braswell/smihandler.c
index d2588cf..617ee10 100644
--- a/src/soc/intel/braswell/smihandler.c
+++ b/src/soc/intel/braswell/smihandler.c
@@ -176,6 +176,8 @@
/* Check all nodes looking for the one that issued the IO */
for (node = 0; node < CONFIG_MAX_CPUS; node++) {
state = smm_get_save_state(node);
+ if (!state)
+ continue;
/* Check for Synchronous IO (bit0==1) */
if (!(state->io_misc_info & (1 << 0)))
diff --git a/src/soc/intel/broadwell/pch/smihandler.c b/src/soc/intel/broadwell/pch/smihandler.c
index 99906d9..890167b 100644
--- a/src/soc/intel/broadwell/pch/smihandler.c
+++ b/src/soc/intel/broadwell/pch/smihandler.c
@@ -228,6 +228,8 @@
/* Check all nodes looking for the one that issued the IO */
for (node = 0; node < CONFIG_MAX_CPUS; node++) {
state = smm_get_save_state(node);
+ if (!state)
+ continue;
/* Check for Synchronous IO (bit0 == 1) */
if (!(state->io_misc_info & (1 << 0)))
diff --git a/src/soc/intel/denverton_ns/smihandler.c b/src/soc/intel/denverton_ns/smihandler.c
index 3bdc2a4..88d3e80 100644
--- a/src/soc/intel/denverton_ns/smihandler.c
+++ b/src/soc/intel/denverton_ns/smihandler.c
@@ -141,6 +141,8 @@
/* Check all nodes looking for the one that issued the IO */
for (node = 0; node < CONFIG_MAX_CPUS; node++) {
state = smm_get_save_state(node);
+ if (!state)
+ continue;
/* Check for Synchronous IO (bit0==1) */
if (!(state->io_misc_info & (1 << 0)))
diff --git a/src/southbridge/intel/common/smihandler.c b/src/southbridge/intel/common/smihandler.c
index 798f2f1..b1a6a66 100644
--- a/src/southbridge/intel/common/smihandler.c
+++ b/src/southbridge/intel/common/smihandler.c
@@ -205,6 +205,8 @@
/* Check all nodes looking for the one that issued the IO */
for (node = 0; node < CONFIG_MAX_CPUS; node++) {
state = smm_get_save_state(node);
+ if (!state)
+ continue;
/* Check for Synchronous IO (bit0 == 1) */
if (!(state->io_misc_info & (1 << 0)))
diff --git a/src/southbridge/intel/lynxpoint/smihandler.c b/src/southbridge/intel/lynxpoint/smihandler.c
index 8caafb7..838b448 100644
--- a/src/southbridge/intel/lynxpoint/smihandler.c
+++ b/src/southbridge/intel/lynxpoint/smihandler.c
@@ -177,6 +177,8 @@
/* Check all nodes looking for the one that issued the IO */
for (node = 0; node < CONFIG_MAX_CPUS; node++) {
state = smm_get_save_state(node);
+ if (!state)
+ continue;
/* Check for Synchronous IO (bit0 == 1) */
if (!(state->io_misc_info & (1 << 0)))
--
To view, visit https://review.coreboot.org/c/coreboot/+/86040?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ie263393ca7d9d6b5e9868c5f73240fc788116cd0
Gerrit-Change-Number: 86040
Gerrit-PatchSet: 2
Gerrit-Owner: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Reviewer: Elyes Haouas <ehaouas(a)noos.fr>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Intel coreboot Reviewers <intel_coreboot_reviewers(a)intel.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Jeff Daly <jeffd(a)silicom-usa.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Vanessa Eusebio <vanessa.f.eusebio(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Elyes Haouas has submitted this change. ( https://review.coreboot.org/c/coreboot/+/86038?usp=email )
Change subject: cpu/x86/smm: Fix smm_get_save_state() returning invalid pointer
......................................................................
cpu/x86/smm: Fix smm_get_save_state() returning invalid pointer
The smm_get_save_state() function returns an invalid pointer (negative
pointer) when the cpu variable is equal to the number of CPUs. This
leads to a hang when the pointer is used to access the save state.
TEST=No unexpected hangs in System Management Mode (SMM) were detected
on fatcat.
Change-Id: I09f969105190a004372c43cb1542f5b716da1eda
Signed-off-by: Jeremy Compostella <jeremy.compostella(a)intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86038
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas(a)noos.fr>
Reviewed-by: Jamie Ryu <jamie.m.ryu(a)intel.com>
---
M src/cpu/x86/smm/smm_module_handler.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Elyes Haouas: Looks good to me, approved
build bot (Jenkins): Verified
Jamie Ryu: Looks good to me, approved
diff --git a/src/cpu/x86/smm/smm_module_handler.c b/src/cpu/x86/smm/smm_module_handler.c
index 899ee2f..d25b5f4 100644
--- a/src/cpu/x86/smm/smm_module_handler.c
+++ b/src/cpu/x86/smm/smm_module_handler.c
@@ -106,7 +106,7 @@
void *smm_get_save_state(int cpu)
{
- if (cpu > smm_runtime.num_cpus)
+ if (cpu >= smm_runtime.num_cpus)
return NULL;
return (void *)(smm_runtime.save_state_top[cpu] -
--
To view, visit https://review.coreboot.org/c/coreboot/+/86038?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I09f969105190a004372c43cb1542f5b716da1eda
Gerrit-Change-Number: 86038
Gerrit-PatchSet: 3
Gerrit-Owner: Jérémy Compostella <jeremy.compostella(a)intel.com>
Gerrit-Reviewer: Arthur Heymans <arthur.heymans(a)9elements.com>
Gerrit-Reviewer: Elyes Haouas <ehaouas(a)noos.fr>
Gerrit-Reviewer: Intel coreboot Reviewers <intel_coreboot_reviewers(a)intel.com>
Gerrit-Reviewer: Jamie Ryu <jamie.m.ryu(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>