Is this handled by the UEFI firmware or by for the GRUB grubx64.efi
bootloader?
I looked at https://wiki.osdev.org/UEFI which claims:
UEFI firmware ... also prepares a protected mode environment with flat segmentation and for x86-64 CPUs, a long mode environment with identity-mapped paging. The A20 gate is enabled as well.
But could not find any official sources to back up this information. The UEFI specification does not mention this.
The linux kernel provides a efi-stub that can act as a bootloader, but after checking its source I can not see if it enables A20 or not. So I still do not know if its the job of UEFI firmware or the job of the bootloader.
(I want to write my own bootloader for UEFI and want to understand what setup does UEFI firmware provide "out of the box" and what part must be implemented by me)