From 333652c5b2dd3291a73f922e0b86c3ab9612f4b1 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Tue, 21 Sep 2021 10:56:35 -0600 Subject: cpu/x86/mp_init: Add comment to smm_do_relocation It took me a while to understand the SMM set up flow. This adds a clarifying comment. BUG=b:194391185, b:179699789 TEST=None Signed-off-by: Raul E Rangel Change-Id: I9c73e416b8c583cf870e7a29b0bd7dcc99c2f5f4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/57858 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Paul Menzel --- src/cpu/x86/mp_init.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index aa037f3001..f54a7b714d 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -714,6 +714,11 @@ static void smm_enable(void) mp_state.do_smm = 1; } +/* + * This code is built as part of ramstage, but it actually runs in SMM. This + * means that ENV_SMM is 0, but we are actually executing in the environment + * setup by the smm_stub. + */ static void asmlinkage smm_do_relocation(void *arg) { const struct smm_module_params *p; -- cgit v1.2.3