From 8f076f2be8ed0671c226fed1403183e6ad9fb83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 8 Jul 2019 09:16:13 +0300 Subject: [PATCH] soc/amd/stoneyridge,picasso: Switch SMM lock condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SMM_TSEG is a qualifier between TSEG and ASEG memory region. ASEG is deprecated and not supported for this platform in coreboot codebase. The SMM lock should be set based on whether SMM is installed or not, HAVE_SMI_HANDLER currently tells that. Change-Id: I9756f8a59ccfedd59d5b997b35313452dd0c4f46 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/34127 Reviewed-by: Richard Spiegel Reviewed-by: Marshall Dawson Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/soc/amd/picasso/finalize.c | 2 +- src/soc/amd/stoneyridge/finalize.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soc/amd/picasso/finalize.c b/src/soc/amd/picasso/finalize.c index 6572e1a201..5a4627a432 100644 --- a/src/soc/amd/picasso/finalize.c +++ b/src/soc/amd/picasso/finalize.c @@ -29,7 +29,7 @@ static void per_core_finalize(void *unused) if (hwcr.lo & SMM_LOCK) /* Skip if already locked, avoid GPF */ return; - if (CONFIG(SMM_TSEG)) { + if (CONFIG(HAVE_SMI_HANDLER)) { mask = rdmsr(SMM_MASK_MSR); mask.lo |= SMM_TSEG_VALID; wrmsr(SMM_MASK_MSR, mask); diff --git a/src/soc/amd/stoneyridge/finalize.c b/src/soc/amd/stoneyridge/finalize.c index 6572e1a201..5a4627a432 100644 --- a/src/soc/amd/stoneyridge/finalize.c +++ b/src/soc/amd/stoneyridge/finalize.c @@ -29,7 +29,7 @@ static void per_core_finalize(void *unused) if (hwcr.lo & SMM_LOCK) /* Skip if already locked, avoid GPF */ return; - if (CONFIG(SMM_TSEG)) { + if (CONFIG(HAVE_SMI_HANDLER)) { mask = rdmsr(SMM_MASK_MSR); mask.lo |= SMM_TSEG_VALID; wrmsr(SMM_MASK_MSR, mask);