diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2021-02-15 16:19:33 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-03-19 11:29:20 +0000 |
commit | 1dfa46ecfd6c0bcbfb10d6e3c051806f5e62c2ff (patch) | |
tree | f94420698b469a41f7ede3144cfd2210402082fd /src/cpu/x86/mp_init.c | |
parent | 823b1a827046ccfc00835bfbce95824dd644e9f9 (diff) |
cpu/x86/mp_init.c: Copy the stub parameter start32_offset into ramstage
Keep a copy of start32_offset into ramstage to avoid needing to pass
arguments, calling from assembly. Doing this in C code is better than
assembly.
Change-Id: Iac04358e377026f45293bbee03e30d792df407fd
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50765
Reviewed-by: Eugene Myers <cedarhouse1@comcast.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/cpu/x86/mp_init.c')
-rw-r--r-- | src/cpu/x86/mp_init.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index e70c142cc5..26b1ccabe2 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -686,6 +686,7 @@ struct mp_state { uintptr_t perm_smbase; size_t perm_smsize; size_t smm_save_state_size; + uintptr_t reloc_start32_offset; int do_smm; } mp_state; @@ -755,7 +756,7 @@ static void asmlinkage smm_do_relocation(void *arg) stm_setup(mseg, p->cpu, perm_smbase, mp_state.perm_smbase, - runtime->start32_offset); + mp_state.reloc_start32_offset); } } @@ -796,6 +797,8 @@ static int install_relocation_handler(int num_cpus, size_t save_state_size) } adjust_smm_apic_id_map(&smm_params); + mp_state.reloc_start32_offset = smm_params.stub_params->start32_offset; + return 0; } |