summaryrefslogtreecommitdiff
path: root/MdePkg/Include/Uefi
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-20 07:44:50 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-20 07:44:50 +0000
commit833bd94e28cc985c97dd0c07d7dec0eea3f023fd (patch)
tree4f3458a9a8243297bd5f90983d0d0dfc7a01ce1b /MdePkg/Include/Uefi
parent935456bbeb2068a2b7f220e44ee42f574fce0213 (diff)
downloadedk2-platforms-833bd94e28cc985c97dd0c07d7dec0eea3f023fd.tar.xz
Add macro EFI_SIZE_TO_PAGES/EFI_PAGES_TO_SIZE in UefiBaseType.h.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2689 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include/Uefi')
-rw-r--r--MdePkg/Include/Uefi/UefiBaseType.h3
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