Page MenuHomeFreeBSD

efirt: add hooks for diverging EFI implementations
ClosedPublic

Authored by royger on Feb 12 2021, 4:02 PM.
Tags
None
Referenced Files
F105968428: D28620.diff
Mon, Dec 23, 6:13 AM
Unknown Object (File)
Thu, Dec 12, 10:26 PM
Unknown Object (File)
Nov 12 2024, 8:17 PM
Unknown Object (File)
Oct 5 2024, 7:56 AM
Unknown Object (File)
Oct 5 2024, 6:01 AM
Unknown Object (File)
Oct 2 2024, 6:43 PM
Unknown Object (File)
Oct 2 2024, 2:32 PM
Unknown Object (File)
Oct 1 2024, 12:05 AM
Subscribers

Details

Summary

Introduce a set of hooks for MI EFI public functions, so that a new
implementation can be done. This will be used to implement the Xen PV
EFI interface that's used when running FreeBSD as a Xen dom0 from UEFI
firmware. Also make the efi_status_to_errno non-static since it will
be used to evaluate status return values from the PV interface.

No functional change indented.

Sponsored by: Citrix Systems R&D

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37012
Build 33901: arc lint + arc unit

Event Timeline

For the reference, the user of this new interface is at: https://reviews.freebsd.org/D28621

Seems fine. The log could be a little clearer that FreeBSD needs to implement the EFI interfaces for pvefi, but if you can't make it clearer both the code and commit message are OK. And a comment where suggested would give the reader the proper context for the 'why' which wasn't immediately obvious to me.

sys/sys/efi.h
182–201

Might make sense to add that we either call the real efi firmware, or virtualize it for VMs in some kind of comment here.

This revision is now accepted and ready to land.Feb 12 2021, 5:44 PM
sys/dev/efidev/efirt.c
568

Should this be const.

I prefer to have this structure static, and use const struct efi_ops *active_efi_ops or such for calls, initialized at boot or module load.

  • Add comment in efi_ops struct to describe the intended usage.
  • Introduce active_efi_ops as a pointer to the currently in-use efi_ops.
This revision now requires review to proceed.Feb 15 2021, 9:34 AM
This revision is now accepted and ready to land.Feb 15 2021, 9:52 AM