soc/intel/skylake: Use unit macros KiB and MiB

Unify the file with the Cannon Lake version
`src/soc/intel/cannonlake/smmrelocate.c`.

Change-Id: Id4815836e93081b61f4c09b8b3ed81199d3ff409
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42197
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Paul Menzel 2020-06-08 16:42:13 +02:00 committed by Patrick Georgi
parent 67a537c35a
commit f1b9006fd6
1 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ static void fill_in_relocation_params(struct smm_relocation_params *params)
uintptr_t tseg_base; uintptr_t tseg_base;
size_t tseg_size; size_t tseg_size;
/* All range registers are aligned to 4KiB */ /* All range registers are aligned to 4KiB */
const u32 rmask = ~((1 << 12) - 1); const u32 rmask = ~(4 * KiB - 1);
smm_region(&tseg_base, &tseg_size); smm_region(&tseg_base, &tseg_size);
smm_subregion(SMM_SUBREGION_CHIPSET, &params->ied_base, &params->ied_size); smm_subregion(SMM_SUBREGION_CHIPSET, &params->ied_base, &params->ied_size);
@ -181,7 +181,7 @@ static void setup_ied_area(struct smm_relocation_params *params)
memcpy(ied_base, &ied, sizeof(ied)); memcpy(ied_base, &ied, sizeof(ied));
/* Zero out 32KiB at IEDBASE + 1MiB */ /* Zero out 32KiB at IEDBASE + 1MiB */
memset(ied_base + (1 << 20), 0, (32 << 10)); memset(ied_base + 1 * MiB, 0, 32 * KiB);
} }
void smm_info(uintptr_t *perm_smbase, size_t *perm_smsize, void smm_info(uintptr_t *perm_smbase, size_t *perm_smsize,