Skip to content

Conversation

@heiher
Copy link
Contributor

@heiher heiher commented Dec 15, 2025

This commit adds basic efiapi ABI support for LoongArch by recognizing extern "efiapi" in the ABI map and inline asm clobber handling, and mapping it to the C calling convention.

This change is intentionally submitted ahead of the full LoongArch UEFI target support. While UEFI binaries are ultimately produced as PE images, LoongArch UEFI applications can already be developed by building ELF objects, applying relocation fixups, and converting them to PE in a later step. For such workflows, having efiapi properly recognized by the compiler is a prerequisite, even without a dedicated UEFI target.

Landing this ABI support early helps unblock LoongArch UEFI application and driver development, and allows the remaining UEFI-specific pieces to be introduced incrementally in follow-up patches.

MCP: rust-lang/compiler-team#953

This commit adds basic `efiapi` ABI support for LoongArch by recognizing
`extern "efiapi"` in the ABI map and inline asm clobber handling, and
mapping it to the C calling convention.

This change is intentionally submitted ahead of the full LoongArch UEFI
target support. While UEFI binaries are ultimately produced as PE images,
LoongArch UEFI applications can already be developed by building ELF
objects, applying relocation fixups, and converting them to PE in a
later step. For such workflows, having `efiapi` properly recognized by
the compiler is a prerequisite, even without a dedicated UEFI target.

Landing this ABI support early helps unblock LoongArch UEFI application
and driver development, and allows the remaining UEFI-specific pieces to
be introduced incrementally in follow-up patches.

MCP: rust-lang/compiler-team#953
@rustbot
Copy link
Collaborator

rustbot commented Dec 15, 2025

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 15, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 15, 2025

r? @mati865

rustbot has assigned @mati865.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@mati865
Copy link
Member

mati865 commented Dec 15, 2025

I'm not familiar enough to give a proper review here.

@rustbot reroll

@rustbot rustbot assigned davidtwco and unassigned mati865 Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants