From f1b9006fd62e116be03b79e964fb19799870ee0c Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 8 Jun 2020 16:42:13 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/42197 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/soc/intel/skylake/smmrelocate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/skylake/smmrelocate.c b/src/soc/intel/skylake/smmrelocate.c index cb83d615fd..476ab9376c 100644 --- a/src/soc/intel/skylake/smmrelocate.c +++ b/src/soc/intel/skylake/smmrelocate.c @@ -150,7 +150,7 @@ static void fill_in_relocation_params(struct smm_relocation_params *params) uintptr_t tseg_base; size_t tseg_size; /* 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_subregion(SMM_SUBREGION_CHIPSET, ¶ms->ied_base, ¶ms->ied_size); @@ -181,7 +181,7 @@ static void setup_ied_area(struct smm_relocation_params *params) memcpy(ied_base, &ied, sizeof(ied)); /* 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, -- cgit v1.2.3