summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Library
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2023-03-22 00:02:42 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-01 23:11:44 +0000
commit12d3d60f51550a7166f8f3e758866b53b9a88e73 (patch)
tree416d21f84156ab817fe8a93b21d4d5c78741a925 /OvmfPkg/Library
parent495809a614083bd8c43eb3323b65df36985f4a50 (diff)
downloadedk2-12d3d60f51550a7166f8f3e758866b53b9a88e73.tar.gz
edk2-12d3d60f51550a7166f8f3e758866b53b9a88e73.tar.bz2
edk2-12d3d60f51550a7166f8f3e758866b53b9a88e73.zip
OvmfPkg: Consume new alignment-related macros
This patch substitutes the macros that were renamed in the second patch with the new, shared alignment macros. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Diffstat (limited to 'OvmfPkg/Library')
-rw-r--r--OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c
index f35bba5deb..7a8878b1a9 100644
--- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c
+++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c
@@ -20,7 +20,6 @@
#include "SnpPageStateChange.h"
-#define IS_ALIGNED_(x, y) ((((x) & (y - 1)) == 0))
#define PAGES_PER_LARGE_ENTRY 512
STATIC
@@ -150,7 +149,7 @@ BuildPageStateBuffer (
//
// Is this a 2MB aligned page? Check if we can use the Large RMP entry.
//
- if (UseLargeEntry && IS_ALIGNED_ (BaseAddress, SIZE_2MB) &&
+ if (UseLargeEntry && IS_ALIGNED (BaseAddress, SIZE_2MB) &&
((EndAddress - BaseAddress) >= SIZE_2MB))
{
RmpPageSize = PvalidatePageSize2MB;