# K2036–K2040: CPU online and offline states The kernel serializes a bounded registry for the validated topology. The boot CPU stays online. Other CPUs begin unconfirmed; an actual level-zero firmware AFFINITY_INFO OFF response is needed before their first CPU_ON. Each startup advances a checked private generation and binds a unique aligned mailbox to the immutable entry. A successful CPU_ON return only enters Starting. Online needs both a genuine entry receipt and firmware ON confirmation for that CPU. A nonzero or unknown CPU_ON result quarantines the resources. Only a subsequent firmware OFF observation can recover them. Drain stops admission and may be cancelled before quiescence. Actual CPU registers must show masked interrupts, a disabled physical timer and no pending or active IRQ; all task, timer and IRQ owners must have departed before the private off request is issued. The entry and mailbox remain owned until firmware AFFINITY_INFO reports OFF. Neither an acknowledgement nor a parked CPU proves this. ON and ON_PENDING cannot release resources. Repeated startup cycles reject earlier generation tokens. Every rejected operation leaves the state unchanged. Closing requires all secondary CPUs confirmed off. Only nonzero CPU_ON results intentionally change state into quarantine. The guest experiment will perform two actual CPU_ON / CPU_OFF cycles on three secondaries, retaining independent generation receipts, firmware calls and physical snapshots. Its stackless entry admits no tasks or interrupt owners. Full scheduler hotplug is a later integration task. Protocol references: ARM Trusted Firmware PSCI definitions and implementation; QEMU target/arm/tcg/psci.c. No external implementation code is copied. https://github.com/ARM-software/arm-trusted-firmware/blob/master/include/lib/psci/psci.h https://github.com/qemu/qemu/blob/master/target/arm/tcg/psci.c