diff options
Diffstat (limited to 'MdePkg/Include/Uefi')
-rw-r--r-- | MdePkg/Include/Uefi/UefiBaseType.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index 9218b1d311..e0c77f6b47 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -160,5 +160,8 @@ typedef union { #define EFI_PAGE_MASK 0xFFF
#define EFI_PAGE_SHIFT 12
+#define EFI_SIZE_TO_PAGES(a) (((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0))
+
+#define EFI_PAGES_TO_SIZE(a) ( (a) << EFI_PAGE_SHIFT)
#endif
|