The UEFI specification requires for the ARM 64bit architecture that if a 64 KiB page contains either of
EfiRuntimeServicesCode
EfiRuntimeServicesData
EfiReserved
EfiACPIMemoryNVS
then all 4KiB pages in the 64KiB page must use identical attributes.
We must ensure that the buffer allocated with AllocatePages() in handle_image() for which we set memory attributes does not contain any of the above memory types. The easiest way to fulfill the requirement is appropriate alignment and rounding of the used memory.
The UEFI specification requires for the ARM 64bit architecture that if a 64 KiB page contains either of
then all 4KiB pages in the 64KiB page must use identical attributes.
We must ensure that the buffer allocated with AllocatePages() in handle_image() for which we set memory attributes does not contain any of the above memory types. The easiest way to fulfill the requirement is appropriate alignment and rounding of the used memory.
Best regards
Heinrich