kernel: iopmroot bridge driver -- IOPMrootDomain0 node and /dev/iopmroot user client for sleep request, acknowledgement and state
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- c
- Área
- operating-systems
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C
- Estrellas
- 12
- Forks
- 3
- Merge medio
- 7 h 1 min
- PR fusionados (30 d)
- 7
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nextbsd/nextbsd-kernel
-
area:bluetooth bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
nextbsd/nextbsd-kernel#236 ·
Los mantenedores suelen responder en 1 día
-
area:vm bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
nextbsd/nextbsd-kernel#226 ·
Los mantenedores suelen responder en 1 día
-
area:network enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
nextbsd/nextbsd-kernel#53 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
nextbsd/nextbsd-kernel#254 ·
Los mantenedores suelen responder en 1 día
-
linsysfs: create DRM sysfs nodes for platform-bus GPUs so Linux libdrm finds vc4/v3d on the Pi 5Abiertoarea:linux area:rpi5 enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 47/100
nextbsd/nextbsd-kernel#248 ·
Los mantenedores suelen responder en 1 día
Todos los issues de nextbsd/nextbsd-kernel
Issues similares
-
backlog bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
EchoTools/nevr-runtime#653 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
InfiniTimeOrg/InfiniTime#2492 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
system: coco
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
FujiNetWIFI/fujinet-config#274 ·
Los mantenedores suelen responder en 1 día
-
base-files: 82_config_generate: regenerate /etc/board.json if 0-bytes / truncated after power cutAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
openwrt/openwrt#25940 · 5 comentarios ·
Los mantenedores suelen responder en 1 día