diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2021-02-10 02:26:10 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-02-11 01:44:24 +0000 |
commit | bc134812c3038b001d6b8a6c9fd30b1574e8517a (patch) | |
tree | 66cdd9b1bed347edde9f59a352ca45ed074efb8d /src/soc/amd/common/block/include/amdblocks | |
parent | a6fc2125e78eb7db537733ee7d33f59e723a27c1 (diff) |
soc/amd: factor out common SMM relocation code
The common code gets moved to soc/amd/common/block/cpu/smm, since it is
related to the CPU cores and soc/amd/common/block/smi is about the SMI/
SCI functionality in the FCH part. Also relocation_handler gets renamed
to smm_relocation_handler to keep it clear what it does, since it got
moved to another compilation unit.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I45224131dfd52247018c5ca19cb37c44062b03eb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50462
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/common/block/include/amdblocks')
-rw-r--r-- | src/soc/amd/common/block/include/amdblocks/smm.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/smm.h b/src/soc/amd/common/block/include/amdblocks/smm.h new file mode 100644 index 0000000000..0fbef42892 --- /dev/null +++ b/src/soc/amd/common/block/include/amdblocks/smm.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <cpu/x86/msr.h> +#include <types.h> + +struct smm_relocation_params { + msr_t tseg_base; + msr_t tseg_mask; +}; + +void get_smm_info(uintptr_t *perm_smbase, size_t *perm_smsize, size_t *smm_save_state_size); +void smm_relocation_handler(int cpu, uintptr_t curr_smbase, uintptr_t staggered_smbase); |