kernel: iopmroot bridge driver -- IOPMrootDomain0 node and /dev/iopmroot user client for sleep request, acknowledgement and state
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- operating-systems
Direzione di ricerca
Start by creating the three new files outlined in the design: the kernel driver src-overlay/sys/dev/iokit/iokit_pmroot.c, the ABI header src-overlay/sys/sys/iopmroot.h, and the config entry src-overlay/conf/files.iopmroot. Implement the IOPMrootDomain0 pseudo-device, /dev/iopmroot user client with the specified ioctl handlers, property publishing, and event subscriptions as described. Validate your work against the acceptance criteria: confirm the node appears in ioreg -c IOPMrootDomain, test the full sleep request/acknowledgement/S3/resume flow in QEMU, and verify that an error acknowledgement cancels sleep.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The kernel half of "pmconfigd plays IOPMrootDomain". A new pseudo-driver publishes the node Apple's code looks for, and a character device stands in for RootDomainUserClient.
Design
New src-overlay/sys/dev/iokit/iokit_pmroot.c (~800-1000 LOC), src-overlay/sys/sys/iopmroot.h (ABI), src-overlay/conf/files.iopmroot -- all standard, no module.
- Node: a newbus pseudo-device
IOPMrootDomain0(child ofacpi0on x86, ofnexus0elsewhere), soiokit_registry.cmints it an id with no registry changes andIOServiceMatching("IOPMrootDomain")matches by class name /dev/iopmroot(root:operator 0660), one open per pmconfigd; the fd carries the K1 listener registration:IOPMROOT_SLEEP{reason}-> records reason/PID, callsacpi_ReqSleepState(sc, suspend_sx)IOPMROOT_ACK{serial, allow|errno}->acpi_AckSleepState(sc->acpi_clone, ...); an error cancels (clearsacpi_next_sstate)IOPMROOT_GETSTATE(sleep supported, clamshell, AC, last sleep/wake reason),IOPMROOT_SETCLAMSHELLSLEEP,IOPMROOT_SETPROP(System Shutdown->kern.suspend_blocked;SleepDisabled)
- Subscribes: the K1 listener (
Suspend),power_suspend_early(stamp sleep time / UUID),power_resume(wake),acpi_acad_event,acpi_sleep_event/acpi_wakeup_event, and the K3 hook forLid,Button,CMBAT,Thermal - Publishes on the node (via K5):
Last Sleep Reason,Wake Reason,Wake Type,AppleClamshellState,AppleClamshellCausesSleep,IOPMSystemSleepType= 2,IOSleepSupported(fromhw.acpi.supported_sleep_state),Supported Features,SleepWakeUUID,System Capabilities - Emits (via K6): "sleep requested {serial, reason}", "did wake",
kIOPMMessageClamshellStateChange,kIOPMMessageSystemPowerEventOccurred(thermal0xcc) - Timestamps:
kern.sleeptime/kern.waketimewith xnu semantics, which pmconfigd andIOPMGetLastWakeTimeread and FreeBSD lacks
The kernel mints the acknowledgement serial even in v1, so it already has its final meaning if R1 moves the fan-out into the kernel.
Acceptance
-
ioreg -c IOPMrootDomainshows the node and its properties - a sleep request -> listener message ->
IOPMROOT_ACK-> S3 -> resume -> "did wake", in QEMU -
IOPMROOT_ACKwith an error cancels the sleep
K4 in epic nextbsd/nextbsd#490 (E17 Power management). Depends on: nextbsd/nextbsd-kernel#238 (K1), nextbsd/nextbsd-kernel#240 (K3), nextbsd/nextbsd-kernel#241 (K5), nextbsd/nextbsd-kernel#242 (K6).
Plan: https://pkgdemon.github.io/nextbsd-power-management-plan.html · Draft: https://pkgdemon.github.io/nextbsd-e17-tickets.html#k4
- Lingua principale
- C
- Stelle
- 12
- Fork
- 3
- Merge medio
- 2h 9m
- PR unite (30g)
- 74
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nextbsd/nextbsd-kernel
-
area:bluetooth area:desktop bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
nextbsd/nextbsd-kernel#236 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area:vm bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
nextbsd/nextbsd-kernel#226 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
nextbsd/nextbsd-kernel#361 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
nextbsd/nextbsd-kernel#360 ·
I maintainer di solito rispondono entro 1 giorno
-
compat/mach: Mach VM calls on another task (mach_vm_read/write/region) for debuggers and toolsApertaarea:mach area:research enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
nextbsd/nextbsd-kernel#304 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nextbsd/nextbsd-kernel
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
zephyrproject-rtos/zephyr#123881 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
ly05010419/MacNativeGames#1252 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 2 giorni
-
Component - Build
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Description of the bugApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
HarbourMasters/Lighthouse#655 ·
I maintainer di solito rispondono entro 1 giorno