[coreboot-gerrit] Change in coreboot[master]: cpu/x86/smm/smm_module_loader.c: Avoid static analysis error "unused ...
Richard Spiegel (Code Review)
gerrit at coreboot.org
Sat Aug 11 01:13:13 CEST 2018
Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/28023
Change subject: cpu/x86/smm/smm_module_loader.c: Avoid static analysis error "unused value"
......................................................................
cpu/x86/smm/smm_module_loader.c: Avoid static analysis error "unused value"
In procedure smm_load_module, variables fxsave_size and fxsave_area are set
to 0 and NULL, but if CONFIG_SSE is enabled, they are overwritten. Change
the code setting the value to an "else" of the "if" testing CONFIG_SSE, thus
avoiding static analysis error.
BUG=b:112253891
TEST=Build and boot grunt.
Change-Id: I3042b037017a082378b53ee419c769c535632038
Signed-off-by: Richard Spiegel <richard.spiegel at silverbackltd.com>
---
M src/cpu/x86/smm/smm_module_loader.c
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/23/28023/1
diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c
index e92fa05..7972686 100644
--- a/src/cpu/x86/smm/smm_module_loader.c
+++ b/src/cpu/x86/smm/smm_module_loader.c
@@ -371,13 +371,14 @@
base += alignment_size;
}
- fxsave_size = 0;
- fxsave_area = NULL;
if (IS_ENABLED(CONFIG_SSE)) {
fxsave_size = FXSAVE_SIZE * params->num_concurrent_stacks;
/* FXSAVE area below all the stacks stack. */
fxsave_area = params->stack_top;
fxsave_area -= total_stack_size + fxsave_size;
+ } else {
+ fxsave_size = 0;
+ fxsave_area = NULL;
}
/* Does the required amount of memory exceed the SMRAM region size? */
--
To view, visit https://review.coreboot.org/28023
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: I3042b037017a082378b53ee419c769c535632038
Gerrit-Change-Number: 28023
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Spiegel <richard.spiegel at silverbackltd.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180810/5caf0a9b/attachment-0001.html>
More information about the coreboot-gerrit
mailing list