From 24e6daa2bcfb64bbe871f76d8e9774d67f247717 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 22 Mar 2023 00:02:39 -0700 Subject: OvmfPkg: Rename IS_ALIGNED macros to avoid name collisions This patch is a preparation for the patches that follow. The subsequent patches will introduce and integrate new alignment-related macros, which collide with existing definitions in OvmfPkg. Temporarily rename them to avoid build failure, till they can be substituted with the new, shared definitions. Signed-off-by: Gerd Hoffmann Reviewed-by: Michael D Kinney Reviewed-by: Jiewen Yao Acked-by: Tom Lendacky --- OvmfPkg/AmdSevDxe/AmdSevDxe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OvmfPkg/AmdSevDxe') diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c index a726498e27..71a1eaaf0a 100644 --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c @@ -44,7 +44,7 @@ STATIC BOOLEAN mAcceptAllMemoryAtEBS = TRUE; STATIC EFI_EVENT mAcceptAllMemoryEvent = NULL; -#define IS_ALIGNED(x, y) ((((x) & ((y) - 1)) == 0)) +#define IS_ALIGNED_(x, y) ((((x) & ((y) - 1)) == 0)) STATIC EFI_STATUS @@ -60,8 +60,8 @@ AmdSevMemoryAccept ( // multiple of SIZE_4KB. Use an assert instead of returning an erros since // this is an EDK2-internal protocol. // - ASSERT (IS_ALIGNED (StartAddress, SIZE_4KB)); - ASSERT (IS_ALIGNED (Size, SIZE_4KB)); + ASSERT (IS_ALIGNED_ (StartAddress, SIZE_4KB)); + ASSERT (IS_ALIGNED_ (Size, SIZE_4KB)); ASSERT (Size != 0); MemEncryptSevSnpPreValidateSystemRam ( -- cgit