summaryrefslogtreecommitdiff
path: root/src/arch/x86/post.c
diff options
context:
space:
mode:
authorMaulik V Vaghela <maulik.v.vaghela@intel.com>2020-01-12 00:50:57 +0530
committerPatrick Georgi <pgeorgi@google.com>2020-01-18 10:57:59 +0000
commita6d7c00f1df9b19e73e44c97b6eb49ae1dc754ea (patch)
tree966c250b30ef8c1b29ebb8b8126e28ba03181660 /src/arch/x86/post.c
parent3c015a06b7397a1f5598cbbb91e562b5d1c96a80 (diff)
downloadcoreboot-a6d7c00f1df9b19e73e44c97b6eb49ae1dc754ea.tar.xz
arch/x86/post.c: Hide cmos_post_code from SMM context
Code in SMM segment using cmos_post_code will give compiler error since cmos_post_code function is not getting compiled during SMM stage. Also as per patch discussion, CMOS uses a split IO transaction and it's not really safe to call cmos_post_code from SMM context. Thus we'll hide the call for SMM context. Change-Id: Iffdcccaad48e7ad96e068d07046630fbe4297e65 Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38370 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/arch/x86/post.c')
-rw-r--r--src/arch/x86/post.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86/post.c b/src/arch/x86/post.c
index 0a20babae1..b9cd26b50a 100644
--- a/src/arch/x86/post.c
+++ b/src/arch/x86/post.c
@@ -21,6 +21,6 @@ void arch_post_code(uint8_t value)
if (CONFIG(POST_IO))
outb(value, CONFIG_POST_IO_PORT);
- if (CONFIG(CMOS_POST))
+ if (CONFIG(CMOS_POST) && !ENV_SMM)
cmos_post_code(value);
}