summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2020-06-08 16:42:13 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-06-10 18:35:28 +0000
commitf1b9006fd62e116be03b79e964fb19799870ee0c (patch)
treec6cbda275aea14b3432efe5aa32f8f281cd0129e /src/soc/intel
parent67a537c35af2720259044036eaa03788783b11dc (diff)
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>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/skylake/smmrelocate.c4
1 files changed, 2 insertions, 2 deletions
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, &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));
/* 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,