rust-osdev / rust-osdev/acpi

Feature request: Pm1EventRegisterBlock status get and clear

Open
#323 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
245
Forks
93
Avg merge
2d 8h
Merged PRs (30d)
15

Description

From the struct's docs

The register grouping contains two registers - a STS status register that can be read to determine if an event has fired (and written to clear), and an EN enabling register to control whether an event should fire.

Currently the struct has a high level set_event_enabled but no function for getting which events fired and acknowledging / clearing them.

I want to handle the power button in my OS. So far with this library's high level functions I enabled the event and get an interrupt when I press the power button, but I will need to get/clear events.

I will probably make a PR for this.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the Pm1EventRegisterBlock documentation and its existing set_event_enabled method. Trace how the status and enabling registers are represented, then expose high-level operations to read which events fired and clear them; done means the power-button use case can query and acknowledge the event.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.