Move the memory map allocation before the ExitBootServices retry
loop to ensure no boot service calls occur between GetMemoryMap
and ExitBootServices. This simplifies the control flow by removing
the inner sizing loop and matches the strategy used by the Linux
EFI stub.
Original motivation:
Identified while investigating an ExitBootServices hang on
AMD AGESA 1.3.0.0a firmware (Gigabyte B650 GAMING X AX V2).
Signed-off-by: Christos Longros <chris.longros@gmail.com>