Repository navigation
fb, kboot: Faster framebuffer copy and quieter DCP handoff - #60
Merged
Merged
Conversation
fb_init() keeps what is on screen by copying the framebuffer into its shadow buffer. It mapped the framebuffer non-cacheable first and then read all of it through that mapping. On a 3456x2234 panel that is 30 MB of uncached reads, which took 1.28 s on the J616s, once in Stage 1 and again in the ESP Stage 2. Map the framebuffer cacheable for the copy, then switch it to non-cacheable as before. Nothing holds a cached copy of the framebuffer at this point, and the lines the copy brings in are invalidated before the mapping changes, so later writes still reach the screen directly. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A display handoff that goes as expected printed every dart-dcp and dart-disp0 stream register, each firmware segment, each stream's mapping summary, the __OS_LOG reservations and the firmware image line. That is about a hundred lines, and on the J616s boot console they took about a second. Print those details with dprintf, so they appear in DEBUG builds only. Warnings, failures, the power and CPU state lines, and the one-line result of each handoff are printed as before. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The handoff details now go through dprintf, which the host stand-in utils.h did not define, so the T6041 host test picked up the libc dprintf(int fd, ...) and failed to build. Define it as src/utils.h does, and build the T6041 host as DEBUG so the scenarios still see the details they check, such as an __OS_LOG inside a /memreserve/. Full pytest: 316 passed, 36 skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rolotrealanis98
added a commit
to rolotrealanis98/m1n1
that referenced
this pull request
Nov 7, 2026
Port Aura's measured T6050 GP-port bring-up (aurora-silicon/aura PR aurora-silicon#60/aurora-silicon#61, src/pcie_t6050.c, Jeff Queisser) to the J716s N1 on apcie0 port 0: the GP power closure and the shared GP PHY (stages A and S, only while no GP port has a link), then the port's reset table, config tunables, reset handshake, Gen3 x1 DBI policy, lane PHY, PERST# and LTSSM (B-E), the bus numbers and the endpoint's ID (F, 106b:1900 or 1901) and Linux's adoption preconditions (G). Every address comes from the ADT (apcie0 reg[16..21], pci-bridge0, gpio0, dart-apcie0). Storage (ANS, NVMe, its SART and power) is compared with a reference before and after each stage that touches shared state. A failed check before the training only refuses it; a change after a stage returns N1_STORAGE_LOST, and kboot_setup_n1() then resets the SoC through the watchdog after 15 s instead of booting a kernel that may not mount its root. Any other stop leaves port 0 and its DART disabled, even if the link came up (a stage G failure). It only runs when the payload sets chosen.asahi,t6050-n1=1; =2 also writes the N1's reset release through the SMC first (pci-bridge0 function-reset: pKW4 "gP13", template 0x00800000, written as template | 1). adt_getprop_copy() returns the copied length, so the function-reset descriptor is taken only when the whole descriptor was copied. Adds pmgr_psreg_by_name(), and makes pmgr_power_is_on() skip virtual devices: T6050 has a no_ps APCIE_PHY_SW beside the real one. Adds tunables_check_local_addr() (Aura's read-back with per-record strobe bits excused) and kboot_get_chosen(). Signed-off-by: Rolando Trevino <rolotrealanis@gmail.com> Assisted-by: LLM Claude
rolotrealanis98
added a commit
to rolotrealanis98/m1n1
that referenced
this pull request
Nov 8, 2026
Port Aura's measured T6050 GP-port bring-up (aurora-silicon/aura PR aurora-silicon#60/aurora-silicon#61, src/pcie_t6050.c, Jeff Queisser) to the J716s N1 on apcie0 port 0: the GP power closure and the shared GP PHY (stages A and S, only while no GP port has a link), then the port's reset table, config tunables, reset handshake, Gen3 x1 DBI policy, lane PHY, PERST# and LTSSM (B-E), the bus numbers and the endpoint's ID (F, 106b:1900 or 1901) and Linux's adoption preconditions (G). Every address comes from the ADT (apcie0 reg[16..21], pci-bridge0, gpio0, dart-apcie0). Storage (ANS, NVMe, its SART and power) is compared with a reference before and after each stage that touches shared state. A failed check before the training only refuses it; a change after a stage, or after a stage that stopped partway (checked again on every stop once the reference is taken), returns N1_STORAGE_LOST, and kboot_setup_n1() then resets the SoC through the watchdog after 15 s instead of booting a kernel that may not mount its root. Any other stop leaves port 0 and its DART disabled, even if the link came up (a stage G failure). It only runs when the payload sets chosen.asahi,t6050-n1=1; =2 also writes the N1's reset release through the SMC first (pci-bridge0 function-reset: pKW4 "gP13", template 0x00800000, written as template | 1). adt_getprop_copy() returns the copied length, so the function-reset descriptor is taken only when the whole descriptor was copied. Adds pmgr_psreg_by_name(), and makes pmgr_power_is_on() skip virtual devices: T6050 has a no_ps APCIE_PHY_SW beside the real one. Adds tunables_check_local_addr() (Aura's read-back with per-record strobe bits excused), and kboot_get_chosen(), kboot_chosen_param() for the other kboot files. Signed-off-by: Rolando Trevino <rolotrealanis@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two changes that shorten the m1n1 part of every boot. Both apply to all SoCs.
Framebuffer copy
fb_init()keeps what is on screen by copying the boot framebuffer into its shadow buffer. It mapped the framebuffer non-cacheable first and then read all of it through that mapping. On the J616s panel (3456x2234) that is 30 MB of uncached reads, and it took 1.28 s in Stage 1 and again in the ESP Stage 2.DCP handoff output
dprintf, so only DEBUG builds print them. Warnings, failures, the power and CPU state lines and the one-line result of each handoff are unchanged.Testing on the J616s
RELEASE=1 CHAINLOADING=1 ESP_STAGE2=1, with the default flags and withCFG=DEBUG, with no new warnings.🤖 Generated with Claude Code