From a6d7c00f1df9b19e73e44c97b6eb49ae1dc754ea Mon Sep 17 00:00:00 2001 From: Maulik V Vaghela Date: Sun, 12 Jan 2020 00:50:57 +0530 Subject: arch/x86/post.c: Hide cmos_post_code from SMM context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/38370 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/arch/x86/post.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/arch') 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); } -- cgit v1.2.3