Keeping a Snapdragon Laptop Talking After the Firmware Handoff
What a photograph, a framebuffer, and six USB cable pairings can establish about code running on an ASUS Zenbook A16.
There are two different ways for a laptop to tell you that it has booted your program. Firmware can print a message on the program’s behalf, or the program can draw one for itself after the firmware has stopped providing that service. Both messages look perfectly convincing in a photograph. For q1n1, the distinction matters. I wanted to know whether code was still running on the Snapdragon after the UEFI handoff, at the Arm exception level the bring-up tools expected. A message printed five instructions too early would answer a much easier question.
q1n1 adapts the bring-up ideas in Asahi Linux’s m1n1 to the ASUS Zenbook A16. The tested machine is the UX3607OA with a Snapdragon X2E-96-100. On an Apple Silicon Mac, m1n1 enters through Apple’s boot environment. The A16 loads q1n1 as a UEFI application. The useful part to carry over is the conversation with a second computer. The part that needs new engineering is everything the laptop must do to stay reachable once firmware stops answering its calls. Project overview and upstream attribution.
Finding the end of the firmware console
Before the handoff, the program can ask UEFI about the current display mode and memory layout. It can also print an error and return. Those conveniences make preflight useful. If the graphics protocol supplies a framebuffer address and usable dimensions, the next stage has somewhere to draw. If the processor reports its current exception level, the program can record where it started. A preflight result still describes an application inside the boot environment. There is another observation to make on the other side.
The handoff itself has a bookkeeping constraint. UEFI gives a caller a memory map and a key identifying that particular map. An allocation between reading the map and handing back its key can make the key stale. q1n1 reserves storage for the map before beginning that exchange. Inside the retry loop it obtains the map, records the descriptor information, and calls ExitBootServices with the returned key. An invalid key can trigger a fresh attempt. The loop avoids unrelated firmware calls such as printing another progress line. At this particular boundary, adding a diagnostic can change the state the diagnostic is supposed to describe. Memory-map capture and handoff.
Drawing a receipt for the handoff
A framebuffer is an area of memory containing the pixels being displayed. Starting a drawing routine requires surprisingly little information, but each piece has a job. The base locates the first pixel. Width and height bound the visible rectangle. The stride says how many pixels of storage separate two successive rows. The pixel format tells the writer which bits represent red, green, and blue. A glyph renderer can draw text using those values without asking firmware to draw a single character.
Consider an illustrative display with eight visible pixels on each row and a stride of ten. Pixel three on row two lives at index 23 when rows and columns start at zero. A calculation using visible width would choose index 19, which is padding at the end of the previous stored row. The first printed row could look entirely correct while the second is displaced and the third begins to wrap strangely. This is why the q1n1 renderer takes width and stride separately. Its initialization also checks the visible geometry against the size advertised for the framebuffer. Framebuffer geometry and pixel writes.
The first hardware record, dated September 16, 2026, reports exception level 2 at entry and again after the handoff. EL2 is the Arm execution level normally used by a hypervisor. The display showed the standalone q1n1 console along with the post-handoff status. A second boot reproduced the observation on the same firmware configuration. Reading the two fields separately matters here. This machine already entered at EL2. Exiting boot services did not itself promote the program to another execution level. First boot and repeat boot records.
From a photograph to a conversation
The photograph preserved a moment. It could show which message reached the screen, but a still image could not tell us whether a heartbeat kept advancing. The early binary also reported that USB serial was unimplemented. Reading a UART description from firmware meant that q1n1 had found some information about a port. It did not mean that a character had passed through a cable to another computer. A useful next milestone was a host receiving a reply generated by code on the A16 after the handoff.
USB brings a second distinction into the experiment. A connector on the enclosure is a physical location. Host and device are roles on a particular connection. The later q1n1 work supported both a serial-class device connection and a network-class connection with the A16 acting as host. A direct cable and a cable routed through a dock can therefore reach the same laptop by different paths. Remembering one serial-device name on the Mac would only find the path that happened to create that name.
In an early experiment a controller enumerated the Mac and the receive path saw 33 Ethernet frames. Three attempted echo requests yielded no reply. Those observations belonged in separate columns of the notebook. Enumeration identified a partner, incoming frames demonstrated one direction of traffic, and there was still no successful round trip. That separation narrowed the next question from “Does USB work?” to “What happens to the return path?” The initial two-port observations.
Moving the cable is part of the test
Independent state for each A16 controller allowed one connection to keep working while the other disappeared. On the Mac, candidate endpoints could be discovered and checked by asking for a valid protocol reply. That design had a physical test that a stationary laptop could never complete. Move the cable to the other port. See whether the old connection is retired, whether the new endpoint is found, and whether the next exchange belongs to the same running stage.
The qualification record describes a revealing failure during a cable move. Device mode could remain marked configured while the controller reported sustained suspend. Waiting exclusively for an explicit disconnect left discovery stuck. Treating every brief suspend as removal would disturb a healthy connection. The recorded fix accommodates short suspends and rechecks a port after an extended one. The native test models both cases. Physically moving the cable supplies the additional evidence that the model represents something this controller actually does. Cable movement and suspend behavior.
Three tested Mac ports and two A16 ports give six direct combinations. Every combination in the record passed a 256 KiB write/read comparison and 100 no-operation requests. The large transfer checks that the bytes returned agree with the bytes sent. The small requests exercise repeated framing. For the dock, one Mac port worked through the dock to both A16 ports, another showed no USB hub on that route, and the remaining pairings were untested. That table is useful precisely because its empty cells survive publication. A reader deciding which topology to repeat can see where the evidence ends. The physical pairing matrix.
What I would keep for the next port
I would keep the early photograph even after getting a much better console. It answers a question about the transition that a later successful USB session can obscure. I would also keep the exact firmware configuration with that photograph, the QEMU run that exercises the binary, and the cable matrix alongside the driver changes. They describe different parts of the system. One shows execution across the handoff on this board, one makes software regressions repeatable, and one records what happens when the physical connection changes.
The payoff for Snapintosh is a machine that can answer questions before a full guest operating system is ready. When an experiment stops producing output, there is a series of smaller observations to revisit. Did firmware start the program? Did the framebuffer show the post-handoff state? Did the selected endpoint return a reply from the current stage? That sequence has proved much more useful to document than a single claim that a laptop boots.