diff options
author | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-20 07:44:50 +0000 |
---|---|---|
committer | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-06-20 07:44:50 +0000 |
commit | 833bd94e28cc985c97dd0c07d7dec0eea3f023fd (patch) | |
tree | 4f3458a9a8243297bd5f90983d0d0dfc7a01ce1b /MdePkg | |
parent | 935456bbeb2068a2b7f220e44ee42f574fce0213 (diff) | |
download | edk2-833bd94e28cc985c97dd0c07d7dec0eea3f023fd.tar.gz edk2-833bd94e28cc985c97dd0c07d7dec0eea3f023fd.tar.bz2 edk2-833bd94e28cc985c97dd0c07d7dec0eea3f023fd.zip |
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')
-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
|