summaryrefslogtreecommitdiff
path: root/include/peimage.h
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2024-02-17 17:35:37 +0000
committerSteve McIntyre <steve@einval.com>2024-05-03 14:36:51 +0100
commitf898e219b4b06cf2bb7af18b5cc7a00754d3d274 (patch)
treec535b3ff1b13388dbaa7072c7f5ec78f5d73ee53 /include/peimage.h
parent3cf4042d82ef314f19e9f7bd4f86c4b59efd8233 (diff)
downloadefi-boot-shim-f898e219b4b06cf2bb7af18b5cc7a00754d3d274.tar.gz
efi-boot-shim-f898e219b4b06cf2bb7af18b5cc7a00754d3d274.zip
New upstream version 15.8
Diffstat (limited to 'include/peimage.h')
-rw-r--r--include/peimage.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/peimage.h b/include/peimage.h
index e97b29c4..6eef1051 100644
--- a/include/peimage.h
+++ b/include/peimage.h
@@ -29,6 +29,9 @@
#define ALIGN_VALUE(Value, Alignment) ((Value) + (((Alignment) - (Value)) & ((Alignment) - 1)))
#define ALIGN_POINTER(Pointer, Alignment) ((VOID *) (ALIGN_VALUE ((UINTN)(Pointer), (Alignment))))
+// Check if `val` is evenly aligned to the page size.
+#define IS_PAGE_ALIGNED(val) (!((val) & EFI_PAGE_MASK))
+
//
// PE32+ Subsystem type for EFI images
//