ResetSystem may return on ARM EBBR compatible systems

Open
#2,028 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust

Research direction

Start with the uefi::runtime::reset entry point and the EFI_RT_PROPERTIES_TABLE support described in EBBR v2.4.0. Compare that requirement with the ResetSystem signature in uefi-raw, then verify that runtime reset behavior is defined for systems where the service is unsupported; confirm the result with the relevant tests or checks available in the project.

Written by the indexing model from the issue text.

Description

According to EBBR v2.4.0:

ResetSystem() is required to be implemented in boot services, but it is optional for runtime services. During runtime services, the operating system should first attempt to use ResetSystem() to reset the system.

If firmware doesn’t support ResetSystem() during runtime services, then the call will immediately return, and the OS should fall back to an architecture or platform specific reset mechanism.

On AArch64 platforms, if ResetSystem() is not implemented then the Operating System should fall back to making a [PSCI] call to reset or shutdown the system.

This means that calling ResetSystem on an EBBR compatible system with the function signature defined in uefi-raw (which states that it doesn't return) is UB.

I think support for ResetSystem can be detected using EFI_RT_PROPERTIES_TABLE (Edit: Yes, the start of section 2.7 does confirm this), uefi::runtime::reset is a safe function and doesn't check for support using EFI_RT_PROPERTIES_TABLE before calling it.

Dominant language
Rust
Stars
1.7k
Forks
205
Avg merge
1d 20h
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-osdev/uefi-rs

All issues in rust-osdev/uefi-rs

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.