Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
K
kernel
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 12
    • Merge Requests 12
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • redox-os
  • kernel
  • Merge Requests
  • !175

Open
Opened Mar 13, 2021 by 4lDO2@4lDO2🖖Maintainer
  • Report abuse
Report abuse

Move most of ACPI to userspace

  • Overview 0
  • Commits 9
  • Changes 28

This MR removes all AML code, as well as FADT and DMAR table parsing from the kernel. They are now handled in userspace instead.

Only the most essential ACPI functionality is kept, which includes finding the RSDP if not already pointed to by UEFI. It also currently parses the MADT, for starting application processors, and HPET, for a better timer. In the future, we might even move those to userspace as well, and have an ACPI-independent interface for specifying what timer IRQ to use, and what APIC IDs to use when enabling CPUs.

The only non-trivial part left, is whether or not the shutdown logic is good enough. Previously, killing kmain of the bootstrap processor (always PID 1), caused it to run the regular SYS_EXIT() code (like setting the context status), and shutdown the system shortly after. Now, it does nothing except calling kstop directly in that handler, and then waiting for userspace (probably acpid) to receive an event from the kernel/acpi:kstop pipe, and finally waiting for one second before falling back to other shutdown mechanisms. I have however verified that shutdown works properly, at least on QEMU.

Edited Apr 05, 2021 by 4lDO2
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: redox-os/kernel!175
Source branch: outsource-most-acpi