amd/stoneyridge: Move TValid and SmmLock to end of POST

Delay making TSEG valid until the end of POST.  After the CPU setup,
there are times where coreboot needs to access the SMRAM from outside
of SMM.  Also relocate locking of the SMM settings from the CPU init
to the end of POST (or just before resuming).

Change-Id: I70b7e33e7045d397e41f571caff6a2acbb64eaab
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/23437
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Marshall Dawson
2018-01-24 12:07:11 -07:00
committed by Martin Roth
parent 34fa425308
commit 2a5e15ce11
4 changed files with 62 additions and 6 deletions

View File

@@ -76,7 +76,7 @@ static void get_smm_info(uintptr_t *perm_smbase, size_t *perm_smsize,
relo_attrs.smbase = (uint32_t)smm_base;
relo_attrs.tseg_base = relo_attrs.smbase;
relo_attrs.tseg_mask = ALIGN_DOWN(~(smm_size - 1), 128 * KiB);
relo_attrs.tseg_mask |= SMM_TSEG_WB | SMM_TSEG_VALID;
relo_attrs.tseg_mask |= SMM_TSEG_WB;
*perm_smbase = (uintptr_t)handler_base;
*perm_smsize = handler_size;