intel/apollolake: Replace smm_region_info() with smm_region()
Implementation remains the same. Change-Id: I8483bb8e5bba66b4854597f58ddcfe59aac17ae0 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34702 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
parent
b2a5f0b9c2
commit
dc6c322fda
|
@ -214,7 +214,7 @@ static void get_smm_info(uintptr_t *perm_smbase, size_t *perm_smsize,
|
|||
const uint32_t rmask = ~((1 << 12) - 1);
|
||||
|
||||
/* Initialize global tracking state. */
|
||||
smm_region_info(&smm_base, &smm_size);
|
||||
smm_region(&smm_base, &smm_size);
|
||||
smm_subregion(SMM_SUBREGION_HANDLER, &handler_base, &handler_size);
|
||||
|
||||
relo_attrs.smbase = (uint32_t)smm_base;
|
||||
|
|
|
@ -43,6 +43,12 @@ void *cbmem_top(void)
|
|||
return tolum;
|
||||
}
|
||||
|
||||
void smm_region(void **start, size_t *size)
|
||||
{
|
||||
*start = (void *)sa_get_tseg_base();
|
||||
*size = sa_get_tseg_size();
|
||||
}
|
||||
|
||||
int smm_subregion(int sub, void **start, size_t *size)
|
||||
{
|
||||
uintptr_t sub_base;
|
||||
|
@ -50,7 +56,7 @@ int smm_subregion(int sub, void **start, size_t *size)
|
|||
void *smm_base;
|
||||
const size_t cache_size = CONFIG_SMM_RESERVED_SIZE;
|
||||
|
||||
smm_region_info(&smm_base, &sub_size);
|
||||
smm_region(&smm_base, &sub_size);
|
||||
sub_base = (uintptr_t)smm_base;
|
||||
|
||||
assert(sub_size > CONFIG_SMM_RESERVED_SIZE);
|
||||
|
|
|
@ -257,7 +257,7 @@ asmlinkage void car_stage_entry(void)
|
|||
* when relocating the SMM handler as well as using the TSEG
|
||||
* region for other purposes.
|
||||
*/
|
||||
smm_region_info(&smm_base, &smm_size);
|
||||
smm_region(&smm_base, &smm_size);
|
||||
tseg_base = (uintptr_t)smm_base;
|
||||
postcar_frame_add_mtrr(&pcf, tseg_base, smm_size, MTRR_TYPE_WRBACK);
|
||||
|
||||
|
|
|
@ -104,9 +104,3 @@ void smm_setup_structures(void *gnvs, void *tcg, void *smi1)
|
|||
"d" (APM_CNT)
|
||||
);
|
||||
}
|
||||
|
||||
void smm_region_info(void **start, size_t *size)
|
||||
{
|
||||
*start = (void *)sa_get_tseg_base();
|
||||
*size = sa_get_tseg_size();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue