decisions DECIDED

149. May the kernel answer on an endpoint, where §121 leaves no userspace holder?

2026-09-15, and the answer is no. Raised 2026-09-09 by the maintainer. Resolved not by picking one of its three options but by dissolving its premise. This section asked what to do given that §121 leaves no userspace holder on x86, and on 2026-09-15 calef reopened §121 to give x86 exactly that holder (the port-range capability). So the kernel does not answer on an endpoint; x86's console is a userspace driver like the other two. See the resolution at the end. (Number provisional until the merge queue lands it.)

What is blocked: x86_64 reaching an interactive shell at all, and therefore milestone 182, and therefore the whole "every architecture boots to swish" half of the parity target.

The question, in one sentence

On aarch64 and riscv64, swish does not talk to a UART. It talks to a console server over an endpoint, and that server is components/src/console.rs, an unprivileged process holding the UART's page as a capability. On x86_64 there is no such server and there cannot be one, so the question is whether a kernel thread may park on the same rendezvous and answer the same protocol.

Why there cannot be one, which is settled rather than open

DECISIONS §121 ratified option 2 permanently: x86's legacy port-I/O devices stay in the kernel, and only MMIO devices get the mapping-based capability. COM1 on xenon is the built-in port at 3F8h, IRQ 4 (notes/xenon-firmware.md, read off the firmware screen), so it is port I/O, so it is kernel-resident, and that is a decision rather than a gap.

This section does not reopen §121 and must not be read as doing so. §121 decided where the driver lives. This decides how a program reaches it, which §121 raised and did not answer: its own text says what is blocked is "a userspace console or input driver on x86", and leaves the consequence for the shell unstated.

What the tree already provides, measured rather than assumed

So the mechanism needs no new object type, no new system call number, and no change to the surface (§10, §16). That is the strongest argument here and it is worth stating plainly: this is the option that does not grow the boundary.

The options

Option 1: a kernel thread parks on a rendezvous and answers the console protocol. swish is byte-identical on all three architectures and never learns where its console server lives. The divergence §121 requires stays entirely below the interface.

Option 2: a console system call. The kernel exposes a write/read pair and swish calls it directly on x86.

Option 3: reach the shell through the graphical stack instead, which is what milestone 182 currently assumes. The framebuffer is MMIO, so the existing mapping model works untouched.

Recommendation

Option 1, and the effort test (§92 (a caretaker is supervised), and the seventh question) comes out the same way. If all three cost the same, option 1 is still the one to pick, because it is the only one where the interface does not diverge. It is not the cheapest to build; option 2 is.

The denial-of-service objection is real and is the part that wants designing rather than assuming. The shape that answers it is a service thread that never blocks on a client: it may block waiting for a message, which is the ordinary parked-server case, but must not park inside handling one.

What this deliberately does not decide

Whether the kernel should serve IPC generally, to expose facts only it knows (preemption counts, scheduler state, the machine description). calef raised that in the same conversation and it is a better question than this one, but it is a different question. The two were deliberately separated so that the general case is not decided on the momentum of the narrow one:

This section (console) Kernel introspection
Kernel holds a device yes no
On the data path every byte one question, then done
Blocks a kernel thread indefinitely yes no
swish works without it no yes
Architectures x86 only, a divergence all three, parity
Why we would do it forced by the hardware chosen, because it beats a system call

That last row is why they are separate. One is a concession with no alternative; the other is a design we would pick freely. A reader citing this section for the general case is misreading it, and the introspection question should get its own section when there is an actual fact to expose rather than in the abstract.

BUGS

Resolved 2026-09-15: the premise was removed, not one of the options chosen

This section's question was conditional: given that §121 keeps x86's serial driver in the kernel, is a kernel thread serving the console the least-bad way to reach a prompt? It listed a fourth path only implicitly, by citing §121: change §121 so there is a userspace holder. That is what calef did.

§121 was reopened and reversed to its own option 1 (the port-range capability); x86's console and input become userspace drivers holding a (base, count) port capability. So every option this section weighed is moot: there is no kernel-resident console driver to serve behind an endpoint, no console system call, and no need to reach the shell through graphics. swish talks to a userspace console server on x86 exactly as it does on aarch64 and riscv64, and this section's recommended option 1 (the kernel thread) is not built.

Why the recommendation here lost, recorded because it was argued for. This section recommended the kernel thread on the strength of the interface-does-not-diverge test, and it was right that the client stays identical. What it undervalued is that the kernel thread keeps a device driver in the kernel, which is the one thing §14 (the project's direction)'s thesis says userspace should hold. It also undervalued that the endpoint's ability to hide the driver's location is a reason to migrate later, not a reason to build the kernel version first. calef ruled straight to the userspace driver (DECISIONS §121 (what a device capability is), milestone 299 (the x86 port-range capability)), accepting a slower path to the x86 prompt in exchange for not shipping a kernel-resident driver at all. The BUGS below, about a kernel-resident IPC server's denial-of-service surface and its place in the trusted computing base, are retired by that choice rather than answered: there is no kernel-resident server.