EFI_LOADED_IMAGE_PROTOCOL.
Quote:
Summary
Can be used on any image handle to obtain information about the loaded image.
Description
Each loaded image has an image handle that supports EFI_LOADED_IMAGE_PROTOCOL. When an image is started, it is passed the image handle for itself. The image can use the handle to obtain its relevant image data stored in the EFI_LOADED_IMAGE_PROTOCOL structure, such as its load options.
The protocol structure has ImageBase and ImageSize fields.
I'm not sure this is the best way of transition from the loader (which owns the memory map) into kernel, I am just out of x86 now. I even am not sure it will work that way, but that is what you've been asking about.
It's a context switch, right? Think of it as that. what is needed to do that right on x86? what the sequence? maybe it's not necessary to remap your loader into new address space? It is ready to jump into the kernel, why you would need its image be mapped into that new space?
But don't forget to preserve Runtime Services, ACPI etc.