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>
This commit is contained in:
committed by
mergify[bot]
parent
495809a614
commit
12d3d60f51
@ -44,8 +44,6 @@ STATIC BOOLEAN mAcceptAllMemoryAtEBS = TRUE;
|
|||||||
|
|
||||||
STATIC EFI_EVENT mAcceptAllMemoryEvent = NULL;
|
STATIC EFI_EVENT mAcceptAllMemoryEvent = NULL;
|
||||||
|
|
||||||
#define IS_ALIGNED_(x, y) ((((x) & ((y) - 1)) == 0))
|
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@ -60,8 +58,8 @@ AmdSevMemoryAccept (
|
|||||||
// multiple of SIZE_4KB. Use an assert instead of returning an erros since
|
// multiple of SIZE_4KB. Use an assert instead of returning an erros since
|
||||||
// this is an EDK2-internal protocol.
|
// this is an EDK2-internal protocol.
|
||||||
//
|
//
|
||||||
ASSERT (IS_ALIGNED_ (StartAddress, SIZE_4KB));
|
ASSERT (IS_ALIGNED (StartAddress, SIZE_4KB));
|
||||||
ASSERT (IS_ALIGNED_ (Size, SIZE_4KB));
|
ASSERT (IS_ALIGNED (Size, SIZE_4KB));
|
||||||
ASSERT (Size != 0);
|
ASSERT (Size != 0);
|
||||||
|
|
||||||
MemEncryptSevSnpPreValidateSystemRam (
|
MemEncryptSevSnpPreValidateSystemRam (
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
#include "SnpPageStateChange.h"
|
#include "SnpPageStateChange.h"
|
||||||
|
|
||||||
#define IS_ALIGNED_(x, y) ((((x) & (y - 1)) == 0))
|
|
||||||
#define PAGES_PER_LARGE_ENTRY 512
|
#define PAGES_PER_LARGE_ENTRY 512
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
@ -150,7 +149,7 @@ BuildPageStateBuffer (
|
|||||||
//
|
//
|
||||||
// Is this a 2MB aligned page? Check if we can use the Large RMP entry.
|
// 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))
|
((EndAddress - BaseAddress) >= SIZE_2MB))
|
||||||
{
|
{
|
||||||
RmpPageSize = PvalidatePageSize2MB;
|
RmpPageSize = PvalidatePageSize2MB;
|
||||||
|
Reference in New Issue
Block a user