Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
sb/lynxpoint: hook up smmstore
Adapted from implementation in sb/intel/common.
Test: build/boot variants of google/{beltino,slippy} with Tianocore and SMMSTORE enabled
Change-Id: I64f520d17146206b8b9b41fc4f827539c5cfd507 Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/southbridge/intel/lynxpoint/smihandler.c 1 file changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/39189/1
diff --git a/src/southbridge/intel/lynxpoint/smihandler.c b/src/southbridge/intel/lynxpoint/smihandler.c index 72c3447..44fef1c 100644 --- a/src/southbridge/intel/lynxpoint/smihandler.c +++ b/src/southbridge/intel/lynxpoint/smihandler.c @@ -29,7 +29,7 @@ #include <southbridge/intel/common/finalize.h> #include <northbridge/intel/haswell/haswell.h> #include <cpu/intel/haswell/haswell.h> - +#include <smmstore.h> #include "me.h" #include "pch.h" #include "nvs.h" @@ -266,6 +266,26 @@ *ret = gsmi_exec(sub_command, param); }
+static void southbridge_smi_store(void) +{ + u8 sub_command, ret; + em64t101_smm_state_save_area_t *io_smi = + smi_apmc_find_state_save(APM_CNT_SMMSTORE); + uint32_t reg_ebx; + + if (!io_smi) + return; + /* Command and return value in EAX */ + sub_command = (io_smi->rax >> 8) & 0xff; + + /* Parameter buffer in EBX */ + reg_ebx = io_smi->rbx; + + /* drivers/smmstore/smi.c */ + ret = smmstore_exec(sub_command, (void *)reg_ebx); + io_smi->rax = ret; +} + static void southbridge_smi_apmc(void) { u8 reg8; @@ -332,6 +352,10 @@ if (CONFIG(ELOG_GSMI)) southbridge_smi_gsmi(); break; + case APM_CNT_SMMSTORE: + if (CONFIG(SMMSTORE)) + southbridge_smi_store(); + break; }
mainboard_smi_apmc(reg8);
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/39189/1/src/southbridge/intel/lynxp... File src/southbridge/intel/lynxpoint/smihandler.c:
https://review.coreboot.org/c/coreboot/+/39189/1/src/southbridge/intel/lynxp... PS1, Line 286: io_smi->rax = ret; code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/39189/1/src/southbridge/intel/lynxp... PS1, Line 286: io_smi->rax = ret; please, no spaces at the start of a line
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/39189/1/src/southbridge/intel/lynxp... File src/southbridge/intel/lynxpoint/smihandler.c:
https://review.coreboot.org/c/coreboot/+/39189/1/src/southbridge/intel/lynxp... PS1, Line 286: io_smi->rax = ret;
code indent should use tabs where possible
Hmmmmm...
Hello Patrick Rudolph, Angel Pons, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39189
to look at the new patch set (#2).
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
sb/lynxpoint: hook up smmstore
Adapted from implementation in sb/intel/common.
Test: build/boot variants of google/{beltino,slippy} with Tianocore and SMMSTORE enabled
Change-Id: I64f520d17146206b8b9b41fc4f827539c5cfd507 Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/southbridge/intel/lynxpoint/smihandler.c 1 file changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/39189/2
Matt DeVillier has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39189/1/src/southbridge/intel/lynxp... File src/southbridge/intel/lynxpoint/smihandler.c:
https://review.coreboot.org/c/coreboot/+/39189/1/src/southbridge/intel/lynxp... PS1, Line 286: io_smi->rax = ret;
Hmmmmm...
Done
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
Patch Set 2: Code-Review+1
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
Patch Set 2:
(1 comment)
Can this function be put in some common location to not duplicate it for four chipsets?
https://review.coreboot.org/c/coreboot/+/39189/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39189/1//COMMIT_MSG@9 PS1, Line 9: Adapted from implementation in sb/intel/common. Why can’t the common implementation not be used?
Matt DeVillier has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39189/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39189/1//COMMIT_MSG@9 PS1, Line 9: Adapted from implementation in sb/intel/common.
Why can’t the common implementation not be used?
the smihandler implementations for sb/common, lynxpoint, broadwell, baytrail, and braswell are all just different enough that it would be problematic to combine them
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
Patch Set 2: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
Patch Set 2: Code-Review+2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39189/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39189/1//COMMIT_MSG@9 PS1, Line 9: Adapted from implementation in sb/intel/common.
the smihandler implementations for sb/common, lynxpoint, broadwell, baytrail, and braswell are all j […]
Ack
Matt DeVillier has submitted this change. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
sb/lynxpoint: hook up smmstore
Adapted from implementation in sb/intel/common.
Test: build/boot variants of google/{beltino,slippy} with Tianocore and SMMSTORE enabled
Change-Id: I64f520d17146206b8b9b41fc4f827539c5cfd507 Signed-off-by: Matt DeVillier matt.devillier@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/39189 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: Arthur Heymans arthur@aheymans.xyz Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/southbridge/intel/lynxpoint/smihandler.c 1 file changed, 25 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Arthur Heymans: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/southbridge/intel/lynxpoint/smihandler.c b/src/southbridge/intel/lynxpoint/smihandler.c index 72c3447..4ac4ff9 100644 --- a/src/southbridge/intel/lynxpoint/smihandler.c +++ b/src/southbridge/intel/lynxpoint/smihandler.c @@ -29,7 +29,7 @@ #include <southbridge/intel/common/finalize.h> #include <northbridge/intel/haswell/haswell.h> #include <cpu/intel/haswell/haswell.h> - +#include <smmstore.h> #include "me.h" #include "pch.h" #include "nvs.h" @@ -266,6 +266,26 @@ *ret = gsmi_exec(sub_command, param); }
+static void southbridge_smi_store(void) +{ + u8 sub_command, ret; + em64t101_smm_state_save_area_t *io_smi = + smi_apmc_find_state_save(APM_CNT_SMMSTORE); + uint32_t reg_ebx; + + if (!io_smi) + return; + /* Command and return value in EAX */ + sub_command = (io_smi->rax >> 8) & 0xff; + + /* Parameter buffer in EBX */ + reg_ebx = io_smi->rbx; + + /* drivers/smmstore/smi.c */ + ret = smmstore_exec(sub_command, (void *)reg_ebx); + io_smi->rax = ret; +} + static void southbridge_smi_apmc(void) { u8 reg8; @@ -332,6 +352,10 @@ if (CONFIG(ELOG_GSMI)) southbridge_smi_gsmi(); break; + case APM_CNT_SMMSTORE: + if (CONFIG(SMMSTORE)) + southbridge_smi_store(); + break; }
mainboard_smi_apmc(reg8);
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39189 )
Change subject: sb/lynxpoint: hook up smmstore ......................................................................
Patch Set 3:
Automatic boot test returned (PASS/FAIL/TOTAL): 3/0/3 Emulation targets: EMULATION_QEMU_X86_Q35 using payload TianoCore : SUCCESS : https://lava.9esec.io/r/1080 EMULATION_QEMU_X86_Q35 using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/1079 EMULATION_QEMU_X86_I440FX using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/1078
Please note: This test is under development and might not be accurate at all!