Submitted by: byuu <byuu AT tutanota.com> (previous version)
Details
- Reviewers
imp byuu_tutanota.com - Group Reviewers
manpages - Commits
- rS342108: efirt: When present, attempt to use EFI runtime services to shutdown
Unlike byuu's original submission, I left efi_reset_system(void) alone for two
reasons:
- Potential out of tree consumers (maybe Netflix?)
- Laziness: Changing the signature requires updating efirt.9
I would be happy to switch efi_reset_system() to the enum-taking variety if
that seems better.
I made the efi_poweroff knob the default setting on EFIRT-enabled systems, but
do not feel strongly about it. We could make it off by default if you prefer.
We could similarly handle RB_REBOOT / whatever shutdown_final events with
"rt_reset" calls. Again, if you feel strongly about it, I can add that
support. I am considering adding the same functionality to the IPMI
shutdown_final event handler anyway -- we use a different IPMI reset mode than
the one in FreeBSD base tree at ISLN.
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 21508 Build 20821: arc lint + arc unit
Event Timeline
Netflix doesn't use efi_system_reset() in our version of FreeBSD. Changing the signature is likely fine.
sys/dev/efidev/efirt.c | ||
---|---|---|
115 | Small quibble. | |
468 | We (NFLX) don't do anything out of tree with this. | |
sys/sys/efi.h | ||
44–45 | as there's more than 2, maybe having explicit values would be good. Maybe they should have been explicit all the time. |
- Use explicit terminology in sysctl text.
- Change type of efi_reset_system(9), and document in efirt.9 (which needs cleanup, but that will be left for future work).
- Explicitly define enum efi_reset values.
efirt is unloadable; be sure to unregister our eventhandler if the module is unloaded.