armv8: Refactor EFI loader