+/**\r
+ Macro that converts a size, in bytes, to a number of EFI_PAGESs.\r
+\r
+ @param Size A size in bytes. This parameter is assumed to be type UINTN.\r
+ Passing in a parameter that is larger than UINTN may produce\r
+ unexpected results.\r
+\r
+ @return The number of EFI_PAGESs associated with the number of bytes specified\r
+ by Size.\r
+\r
+**/\r
+#define EFI_SIZE_TO_PAGES(Size) (((Size) >> EFI_PAGE_SHIFT) + (((Size) & EFI_PAGE_MASK) ? 1 : 0))\r
+\r
+/**\r
+ Macro that converts a number of EFI_PAGEs to a size in bytes.\r
+\r
+ @param Pages The number of EFI_PAGES. This parameter is assumed to be\r
+ type UINTN. Passing in a parameter that is larger than\r
+ UINTN may produce unexpected results.\r
+\r
+ @return The number of bytes associated with the number of EFI_PAGEs specified\r
+ by Pages.\r
+\r
+**/\r
+#define EFI_PAGES_TO_SIZE(Pages) ((Pages) << EFI_PAGE_SHIFT)\r
+\r
+///\r
+/// PE32+ Machine type for IA32 UEFI images.\r
+///\r
+#define EFI_IMAGE_MACHINE_IA32 0x014C\r
+\r
+///\r
+/// PE32+ Machine type for IA64 UEFI images.\r
+///\r
+#define EFI_IMAGE_MACHINE_IA64 0x0200\r
+\r
+///\r
+/// PE32+ Machine type for EBC UEFI images.\r
+///\r
+#define EFI_IMAGE_MACHINE_EBC 0x0EBC\r
+\r
+///\r
+/// PE32+ Machine type for X64 UEFI images.\r
+///\r
+#define EFI_IMAGE_MACHINE_X64 0x8664\r
+\r
+///\r
+/// PE32+ Machine type for ARM mixed ARM and Thumb/Thumb2 images.\r
+///\r
+#define EFI_IMAGE_MACHINE_ARMTHUMB_MIXED 0x01C2\r
+\r
+///\r
+/// PE32+ Machine type for AARCH64 A64 images.\r
+///\r
+#define EFI_IMAGE_MACHINE_AARCH64 0xAA64\r
+\r
+\r
+#if defined (MDE_CPU_IA32)\r
+\r
+#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \\r
+ ((Machine) == EFI_IMAGE_MACHINE_IA32)\r
+\r
+#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64)\r
+\r
+#elif defined (MDE_CPU_X64)\r
+\r
+#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \\r
+ ((Machine) == EFI_IMAGE_MACHINE_X64)\r