Attention is currently required from: Jérémy Compostella.
Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/79827?usp=email )
Change subject: arch/x86/include/smm: use inline asm from drivers/smmstore/ramstage ......................................................................
arch/x86/include/smm: use inline asm from drivers/smmstore/ramstage
call_smm is currently unused and the inline assembly code for more or less the same functionality in drivers/smmstore/ramstage is both easier to understand and also tells the compiler that this piece of code might change global memory. Also having too much in the clobber list might only have some performance impact, which should however be negligible compared to the SMI handler being called, while missing something in the clobber list might cause hard to debug problems.
This is a preparation to make drivers/smmstore/ramstage use call_smm instead of having its own inline assembly implementation for this.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I73837cab75429014897486b38a5c56f93a850f96 --- M src/arch/x86/include/smm.h 1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/79827/1
diff --git a/src/arch/x86/include/smm.h b/src/arch/x86/include/smm.h index e6db9dc..c0d96c0 100644 --- a/src/arch/x86/include/smm.h +++ b/src/arch/x86/include/smm.h @@ -13,8 +13,11 @@ { u32 res = 0; __asm__ __volatile__ ( - "outb %b0, %3" + "outb %%al, %%dx" : "=a" (res) - : "a" ((subcmd << 8) | cmd), "b" (arg), "i" (APM_CNT)); + : "a" ((subcmd << 8) | cmd), + "b" (arg), + "d" (APM_CNT) + : "memory"); return res; }