From 29c7622d08c95a48e10785cc1bc5cffc6874fe94 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Fri, 21 May 2021 09:58:46 +0200 Subject: [PATCH] cpu/x86/mp_init.c: Fix building with no smihandler The build fails because smm_stub_size() tries to find a symbol that won't be present. Change-Id: I73fee3cf26c0e37cca03299c6730f7b4f1ef6685 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/54754 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Paul Menzel --- src/cpu/x86/mp_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index 46cb585d55..709e7a2218 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -1072,6 +1072,9 @@ static void fill_mp_state(struct mp_state *state, const struct mp_ops *ops) if (ops->get_cpu_count != NULL) state->cpu_count = ops->get_cpu_count(); + if (!is_smm_enabled()) + return; + if (ops->get_smm_info != NULL) ops->get_smm_info(&state->perm_smbase, &state->perm_smsize, &state->smm_real_save_state_size);