Martin Roth has posted comments on this change. ( https://review.coreboot.org/27033 )
Change subject: x86 smm: Increase SMM stack size to 2K
......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/27033/2//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/27033/2//COMMIT_MSG@7
PS2, Line 7: x86 smm: Increase SMM stack size to 2K
:
: GSMI Set Event Log is taking more than 1K in stack. This causes the
: stack to overflow into the adjacent stack. This has the side effect of
: causing any CPU waiting for the SMI handler to complete to crash when
: the lock is unlocked because the return pointer has been smashed.
:
: BUG=b:80539294
: TEST=built on grunt and tested by running `halt` from the OS.
Probably want to update this now:
cpu/x86: Make SMM stack size configurable
--
To view, visit https://review.coreboot.org/27033
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: Ib170c7d03909ef3d20831726b285178a75007b06
Gerrit-Change-Number: 27033
Gerrit-PatchSet: 2
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 12 Jun 2018 16:00:29 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Hello Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/27033
to look at the new patch set (#2).
Change subject: x86 smm: Increase SMM stack size to 2K
......................................................................
x86 smm: Increase SMM stack size to 2K
GSMI Set Event Log is taking more than 1K in stack. This causes the
stack to overflow into the adjacent stack. This has the side effect of
causing any CPU waiting for the SMI handler to complete to crash when
the lock is unlocked because the return pointer has been smashed.
BUG=b:80539294
TEST=built on grunt and tested by running `halt` from the OS.
Change-Id: Ib170c7d03909ef3d20831726b285178a75007b06
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
---
M src/cpu/x86/Kconfig
M src/cpu/x86/mp_init.c
2 files changed, 9 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/27033/2
--
To view, visit https://review.coreboot.org/27033
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib170c7d03909ef3d20831726b285178a75007b06
Gerrit-Change-Number: 27033
Gerrit-PatchSet: 2
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Martin Roth has posted comments on this change. ( https://review.coreboot.org/27033 )
Change subject: x86 smm: Increase SMM stack size to 2K
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/27033/1/src/cpu/x86/Kconfig
File src/cpu/x86/Kconfig:
https://review.coreboot.org/#/c/27033/1/src/cpu/x86/Kconfig@117
PS1, Line 117: 0x800
can we set this to 1k here and override it to 2k in stoney instead of changing it globally?
--
To view, visit https://review.coreboot.org/27033
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: Ib170c7d03909ef3d20831726b285178a75007b06
Gerrit-Change-Number: 27033
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Comment-Date: Tue, 12 Jun 2018 15:41:58 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/27033
Change subject: x86 smm: Increase SMM stack size to 2K
......................................................................
x86 smm: Increase SMM stack size to 2K
GSMI Set Event Log is taking more than 1K in stack. This causes the
stack to overflow into the adjacent stack. This has the side effect of
causing any CPU waiting for the SMI handler to complete to crash when
the lock is unlocked because the return pointer has been smashed.
BUG=b:80539294
TEST=built on grunt and tested by running `halt` from the OS.
Change-Id: Ib170c7d03909ef3d20831726b285178a75007b06
Signed-off-by: Raul E Rangel <rrangel(a)chromium.org>
---
M src/cpu/x86/Kconfig
M src/cpu/x86/mp_init.c
2 files changed, 9 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/27033/1
diff --git a/src/cpu/x86/Kconfig b/src/cpu/x86/Kconfig
index a20febb..1c5514e 100644
--- a/src/cpu/x86/Kconfig
+++ b/src/cpu/x86/Kconfig
@@ -112,6 +112,14 @@
This option determines the size of the heap within the SMM handler
modules.
+config SMM_MODULE_STACK_SIZE
+ hex
+ default 0x800
+ depends on SMM_TSEG
+ help
+ This option determines the size of the stack within the SMM handler
+ modules.
+
config SMM_LAPIC_REMAP_MITIGATION
bool
default y if NORTHBRIDGE_INTEL_I945
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index a696cd0..9fd10f7 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -792,7 +792,7 @@
/* There are num_cpus concurrent stacks and num_cpus concurrent save
* state areas. Lastly, set the stack size to 1KiB. */
struct smm_loader_params smm_params = {
- .per_cpu_stack_size = 1 * KiB,
+ .per_cpu_stack_size = CONFIG_SMM_MODULE_STACK_SIZE,
.num_concurrent_stacks = num_cpus,
.per_cpu_save_state_size = save_state_size,
.num_concurrent_save_states = num_cpus,
--
To view, visit https://review.coreboot.org/27033
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: Ib170c7d03909ef3d20831726b285178a75007b06
Gerrit-Change-Number: 27033
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>