Skip to content

kboot: default J514M/T6034 native display and graphics - #32

Merged
maralcbr merged 12 commits into
integration/aurorafrom
carry/j514m-defaults
Nov 10, 2026
Merged

maralcbr merged 12 commits into
integration/aurorafrom
carry/j514m-defaults

Conversation

@maralcbr

@maralcbr maralcbr commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Carries Chris Kearney's m1n1#24 (J514M/T6034 native display and graphics handoff), rebased onto #31, with my sign-off and fixes for both Greptile findings. Chris has left the project. Authorship is kept on his three commits. Replaces #24. #31 is merged, so this diff is now only the J514M work and the CI fixes below.

 dt_set_m3_defaults()
   apple,t6031: j514c, j516c       -> t6031-dcp, -gpu
+  apple,t6034: j514m              -> t6034-dcp, -gpu
 dt_set_gpu()
+  T6034 -> dt_set_gpu_t6034: exact J514M + T6034, owner opt-in, measured identity, G15C handoff
 dt_measure_gpu_t6034()
-  return early on chosen.asahi,m3-defaults=0
   return early unless chosen.asahi,t6034-gpu is 1 or unset
  • Greptile P1 fixed: m3-defaults=0 with an owner's t6034-gpu=1 skipped the identity read, and the GPU then stayed disabled. Only the GPU switch decides now, as on T6031 (docs/m1-m3-handoff-sources.md).
  • Greptile P2 fixed: the J516M host scenario no longer expects "ADT: GPU: unsupported chip!", which the J514M-only dispatch no longer prints.
  • macOS CI fixed: both macOS jobs had been red on integration/aurora since early November.
    • The opt-out harness heap was 2MB-aligned by section attribute, which the macOS linker caps at 16K. Its allocator aligned offsets, not addresses, so the kernel slot was misaligned. The loader moved the kernel and finalize_uncompression() aborted. The allocator now aligns addresses, as src/heapblock.c does.
    • macos-14 is dropped from the matrix: GitHub retired the image, so the job never started.
  • Rebase conflicts were only in the defaults tests: J514M moves to the defaults list, and kboot: give the J504 the T8122 display and GPU defaults #25's J433 and J504 controls are kept.

Paired with the J514M kernel change (replacing omacom/linux-aurora#372) and omacom/mesa#32. Ship order: this must not reach users before that kernel and a Mesa that accepts chip 0x6034. With today's Mesa, Hyprland finds no monitor on a cold boot.

Evidence

  • P1 test:
    • test_scoped_measurement_restores_power_and_never_enables_gpu now requires m3-defaults=0 plus t6034-gpu=1 to measure. It fails on the old code (verified) and passes with the fix.
    • The boot harness (test_j514m_defaults_and_owner_choices) adds both owner lines under m3-defaults=0.
  • Hardware (Scott's lab, Chris's 9488b7b with the kernel from linux-aurora#372, Faeric's J514M, j1107-053241-ccf1, no flags): Vulkan 1389 dispatches with 0 bad, GL 5 minutes with 0 bad, 0 DART faults. With mesa#32 staged, Hyprland ran at eDP-1 3024x1964@120.
  • CI: all five jobs green, macos-15 included (183 opt-out failures before, 0 after).
  • Audit: no Apple code, firmware bytes or reverse-engineering material in the carried commits.

Merge Danger

Door: two-way

Blast Radius: J514M only

Nothing changes for other boards; J516M stays untouched. An owner can turn it off with chosen.asahi,t6034-gpu=0, t6034-dcp=0 or m3-defaults=0. The power and reference values are J516C's and are unqualified on J514M. Power and thermal qualification, and confirmation of the display clock, are still open.

chriskearney and others added 10 commits November 8, 2026 07:19
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
The candidate build defaults both T6031 display and GPU switches on
J514C. Several comments still say it always requires manual config.
Describe the build-only exception at each handoff and firmware setup
site, retaining owner values and the normal-build behavior.

Cover chosen.asahi,t6031-dcp=0 separately: the explicit display opt-out
survives while the independent GPU switch still defaults on. Format the
new board table without reformatting inherited source.

The two production-body defaults/opt-out suites pass 139 tests, with
eight optional updater integration checks skipped. This revision changes
comments, table whitespace and tests only; the target keeps tested
Stage2 22bd961.

Assisted-by: Codex:GPT-6
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Give exact J514C/T6031 boots the same display and GPU defaults as
J516C without a build define or manual boot.bin enable line. Remove
the J514C_BRINGUP switch and update each handoff comment accordingly.
The defaults remain subordinate to explicit owner settings, master-off
and configuration-loss handling; T6034 is unchanged.

Exercise no-config Stage2 boots for both T6031 boards, independent
display/GPU opt-outs and loss handling. The production-body host suites
pass 155 tests, with eight optional updater integration cases skipped.

Assisted-by: Codex:GPT-6
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
The handoff guide still said J514C needed manual chosen lines despite the normal-build default. Describe both J514C and J516C defaults and owner opt-outs, and align host-test names and comments with the behavior they assert.

Assisted-by: Codex:GPT-6
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
The T8122 GPU guide still said the GPU setup is off by default and that the
table has no known G15G image, leakage fuse or power model. Normal builds now
set the GPU, display, stand-in power and leakage switches on J613, J615 and
J504, and the kernel starts the GPU on those boards. Describe the defaults,
the owner opt-outs and what remains unmeasured.

Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Scope a normal-boot diagnostic to the J514M and T6034 pair. Reuse the bounded G15C identity power closure with exact restoration, publish SoC-specific identity and firmware-header metadata, and export display clock and memory-controller facts. Leave the GPU and mailbox disabled so the stock kernel remains unbound. Honor explicit owner opt-outs and lost configuration.

Test normal boot, mismatched board/SoC, opt-outs, invalid SGX windows, failed power-on, faulted reads and failed restoration with the production probe and real libfdt. This measurement build is an intermediate diagnostic, not completed native graphics support.

Assisted-by: Codex:GPT-6
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Scope normal graphics defaults to the J514M and T6034 pair, with independent owner disables, master disable and lost-config handling. Keep T6031 and other T6034 boards on their separate paths.

The fresh J514M ADT supplies the checked internal DCP and DART addresses and the existing 14.7 DCP/PMP image UUIDs. Add a distinct pinned display handoff, PMP value namespace and firmware UUID list; retain all bounded mapping and power-state checks before publishing the handoff. Linux separately validates the complete GPU firmware identity.

Normal-build and owner-choice host tests pass for J514M while wrong boards and SoCs remain excluded. The display clock is independently measured as 400 MHz and represented by the kernel device tree.

Assisted-by: Codex:GPT-6
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Add the exact J514M T6034 GPU profile to the shared G15C setup. Its powered identity and firmware family are measured first with exact power restoration; the setup consumes that identity without additional GPU hardware access. Preserve per-board defaults, owner opt-outs, lost-config handling, DT/ADT windows, UAT reservations and family checks. Export an explicit T6034 list of stand-in power properties.

Use per-boot G15C state names so neither T6031 nor T6034 can be mistaken for the other profile. The kernel must independently match the full firmware digest before startup. Host production-body and default/opt-out suites pass 170 tests with eight unavailable optional cases; Stage2 compiles without a board enable build flag.

Assisted-by: Codex:GPT-6
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
chosen.asahi,m3-defaults=0 withholds the defaults but must keep an owner's own
lines, as it does on T6031. The T6034 measurement also returned early on
m3-defaults=0, so m3-defaults=0 with asahi,t6034-gpu=1 skipped the identity
read and the setup then disabled the GPU. Only the GPU switch decides now.

The measurement test asserted the old behaviour; it now checks that an owner's
GPU line still measures, and the boot harness covers both owner lines under
m3-defaults=0.

Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
The J514M-only T6034 dispatch returns without a message on a J516M, so the
scenario no longer finds "ADT: GPU: unsupported chip!". Check that nothing is
logged for T6034 alongside the unchanged tree and register checks.

Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
@maralcbr
maralcbr requested a review from scottjones as a code owner November 7, 2026 21:24
@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest change introduces no blocking issue; the earlier J514M test-coverage concern remains non-blocking.

Findings

  1. P2 J514M handoff remains untested ▶

Summary

Adds default display and GPU handoffs for J514M/T6034, with separate owner switches and a bounded GPU identity read.

  • J514M boots with separate T6034 display and GPU defaults.
  • J514M measures its G15C identity before GPU setup.
  • J514C Macs now get the T6031 display and GPU defaults.
  • T8122 notes now describe the M3 Air and Pro GPU setup.
  • CI no longer schedules the retired macOS 14 test job.

Reviews (3) · Last reviewed commit: "ci: drop the retired macos-14 runner fro..." · Reviewed by Greptile

static const struct { const char *optin; } g15_soc_t6034={"asahi,t6034-gpu"};
static void g15_disable(void *d) { disables++; }
static int dt_measure_gpu_t6034(void *d) { probes++; return 0; }
static int dt_set_gpu_g15(void *d,const void *soc) { assert(soc==&g15_soc_t6034);setups++;return 0; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 J514M handoff remains untested

The new selector test replaces dt_set_gpu_g15() with a counter, so it cannot catch failures in the actual g15_soc_t6034 setup. The existing T6034 host scenario uses J516M and only checks that nothing happens. Add a positive J514M host scenario that runs the real GPU and display handoffs and checks the resulting properties, reservations, and restored power state.

@scottjones

Copy link
Copy Markdown
Collaborator

Thanks Marcelo for the fixes, and Chris for #24. Results from our lab J514M (14" M3 Max, 30-core GPU):

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardware results are in my comment above (j1107-221524-d724): same numbers as #24. The new m3-defaults=0 owner-line path wasn't exercised in the lab.

The macOS linker caps section alignment at 16K, so the harness heap declared
aligned(2 << 20) lands on a 16K boundary there. Its bump allocator aligned
offsets within the heap rather than addresses, so the 2MB-aligned kernel slot
was not 2MB aligned in memory. The payload loader then moved the kernel, and
finalize_uncompression()'s reservation assert aborted every boot on the
macOS CI jobs. Align addresses as src/heapblock.c does and leave 2MB of slack
in place of the section alignment.

Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
GitHub no longer provides the macos-14 image ("The configuration
'macos-14-arm64-us-default' is not supported"), so that job is cancelled
before it starts on every run. macos-15 keeps the macOS + brew LLVM coverage.

Signed-off-by: Marcelo Alcantara <maralc@gmail.com>

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving at c6fef49. The two new commits are a test-harness fix and a CI matrix change; the five boot-code commits are identical to 9cee8f4, which passed on the J514M (j1107-221524-d724).

@techgyani

techgyani commented Nov 8, 2026 •

Copy link
Copy Markdown

Tested on a second J514M (14-inch M3 Max, 30-core GPU, per-cluster cores [8, 8, 7, 7]) at c6fef490, with the kernel from omacom/linux-aurora#408 and Mesa from omacom/mesa#33, defaults, no /etc/m1n1.conf: native display eDP-1 3024x1964 (mode reports 120 Hz, frames present at 60 Hz; kernel side, details in the link) and GPU rendering (Apple M3 Max (G15C B1)) work after a cold boot. Brightness control does not. The m3-defaults=0 owner path was not tested. Details, logs and load numbers: omacom/linux-aurora#333 (comment)

scottjones pushed a commit to scottjones/aura that referenced this pull request Nov 22, 2026
The 14" M3 Max with the 30-core GPU (J514M) is a T6034, and aura hands
it nothing: no display handoff, no PMP values, no GPU measurement or
setup, no firmware UUIDs or facts. It runs on the boot framebuffer, and
no config line changes that because the code is not there.

Add a separate T6034 profile, scoped to the exact J514M board and kept
apart from T6031 in its own chosen namespace:

- display: a dcp_soc entry for T6034 with the measured J514M register
  layout, pinned DCP image F493F03E-... and 14.7 interface, armed by
  chosen.asahi,t6034-dcp; dt_set_display() runs the fail-soft handoff
  for it;
- PMP: asahi,t6034-pmp with the T6031 interrupt and DART layout;
- firmware UUIDs and facts: asahi,t6034-fw-uuids and asahi,t6034-facts;
- GPU: g15_soc_t6034 (G15C, four clusters), armed by
  chosen.asahi,t6034-gpu. dt_measure_gpu_t6034() reuses the bounded
  G15C powered-identity probe and its exact power restoration, then
  publishes asahi,t6034-gpu-powered-identity; the setup uses that
  identity and never enables the GPU or its mailbox. The T6031 G15C
  globals and stand-in marker are shared, renamed g15_g15c_*;
- defaults: dt_set_m3_defaults() supplies chosen.asahi,t6034-dcp=1 and
  chosen.asahi,t6034-gpu=1 on a J514M, each on its own as on the J516C.
  An owner's =0 keeps that one off, chosen.asahi,m3-defaults=0 keeps an
  owner's own =1, and after a lost config line kboot drops every T6034
  line and skips the GPU measurement entirely.

The J516M stays untouched here. A J514M needs a matching kernel and
Mesa: the kernel decides whether it takes the display and GPU over.

New tests/python/test_t6034_measurement.py covers the scoped
measurement (power restored, GPU never enabled) and the owner opt-outs
before any probe; the defaults, opt-out and siliconforest suites cover
the J514M defaults and owner choices. They fail on the previous commit.
Two host harnesses that are not in CI needed the same changes to keep
building: the T6034 chip constant in tests/t8122_display_host/soc.h and
the renamed G15C hooks in tests/t8122_full_start.c (omacom has the same
gap).

Ported from omacom/m1n1 86825137, 2456131e, 9bc2c623, 1b0a304c,
9cee8f42 (omacom/m1n1#32). Not carried: 5863ad6b (aura already aligns the opt-out
harness heap its own way) and c6fef490 (aura's CI has no macos-14
runner).

Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Assisted-by: Claude:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
scottjones pushed a commit to scottjones/aura that referenced this pull request Nov 23, 2026
The 14" M3 Max with the 30-core GPU (J514M) is a T6034, and aura hands
it nothing: no display handoff, no PMP values, no GPU measurement or
setup, no firmware UUIDs or facts. It runs on the boot framebuffer, and
no config line changes that because the code is not there.

Add a separate T6034 profile, scoped to the exact J514M board and kept
apart from T6031 in its own chosen namespace:

- display: a dcp_soc entry for T6034 with the measured J514M register
  layout, pinned DCP image F493F03E-... and 14.7 interface, armed by
  chosen.asahi,t6034-dcp; dt_set_display() runs the fail-soft handoff
  for it;
- PMP: asahi,t6034-pmp with the T6031 interrupt and DART layout;
- firmware UUIDs and facts: asahi,t6034-fw-uuids and asahi,t6034-facts;
- GPU: g15_soc_t6034 (G15C, four clusters), armed by
  chosen.asahi,t6034-gpu. dt_measure_gpu_t6034() reuses the bounded
  G15C powered-identity probe and its exact power restoration, then
  publishes asahi,t6034-gpu-powered-identity; the setup uses that
  identity and never enables the GPU or its mailbox. The T6031 G15C
  globals and stand-in marker are shared, renamed g15_g15c_*;
- defaults: dt_set_m3_defaults() supplies chosen.asahi,t6034-dcp=1 and
  chosen.asahi,t6034-gpu=1 on a J514M, each on its own as on the J516C.
  An owner's =0 keeps that one off, chosen.asahi,m3-defaults=0 keeps an
  owner's own =1, and after a lost config line kboot drops every T6034
  line and skips the GPU measurement entirely.

The J516M stays untouched here. A J514M needs a matching kernel and
Mesa: the kernel decides whether it takes the display and GPU over.

New tests/python/test_t6034_measurement.py covers the scoped
measurement (power restored, GPU never enabled) and the owner opt-outs
before any probe; the defaults, opt-out and siliconforest suites cover
the J514M defaults and owner choices. They fail on the previous commit.
Two host harnesses that are not in CI needed the same changes to keep
building: the T6034 chip constant in tests/t8122_display_host/soc.h and
the renamed G15C hooks in tests/t8122_full_start.c (omacom has the same
gap).

Ported from omacom/m1n1 86825137, 2456131e, 9bc2c623, 1b0a304c,
9cee8f42 (omacom/m1n1#32). Not carried: 5863ad6b (aura already aligns the opt-out
harness heap its own way) and c6fef490 (aura's CI has no macos-14
runner).

Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
scottjones added a commit to scottjones/aura that referenced this pull request Nov 24, 2026
The 14" M3 Max with the 30-core GPU (J514M) is a T6034, and aura hands
it nothing: no display handoff, no PMP values, no GPU measurement or
setup, no firmware UUIDs or facts. It runs on the boot framebuffer, and
no config line changes that because the code is not there.

Add a separate T6034 profile, scoped to the exact J514M board and kept
apart from T6031 in its own chosen namespace:

- display: a dcp_soc entry for T6034 with the measured J514M register
  layout, pinned DCP image F493F03E-... and 14.7 interface, armed by
  chosen.asahi,t6034-dcp; dt_set_display() runs the fail-soft handoff
  for it;
- PMP: asahi,t6034-pmp with the T6031 interrupt and DART layout;
- firmware UUIDs and facts: asahi,t6034-fw-uuids and asahi,t6034-facts;
- GPU: g15_soc_t6034 (G15C, four clusters), armed by
  chosen.asahi,t6034-gpu. dt_measure_gpu_t6034() reuses the bounded
  G15C powered-identity probe and its exact power restoration, then
  publishes asahi,t6034-gpu-powered-identity; the setup uses that
  identity and never enables the GPU or its mailbox. The T6031 G15C
  globals and stand-in marker are shared, renamed g15_g15c_*;
- defaults: dt_set_m3_defaults() supplies chosen.asahi,t6034-dcp=1 and
  chosen.asahi,t6034-gpu=1 on a J514M, each on its own as on the J516C.
  An owner's =0 keeps that one off, chosen.asahi,m3-defaults=0 keeps an
  owner's own =1, and after a lost config line kboot drops every T6034
  line and skips the GPU measurement entirely.

The J516M stays untouched here. A J514M needs a matching kernel and
Mesa: the kernel decides whether it takes the display and GPU over.

New tests/python/test_t6034_measurement.py covers the scoped
measurement (power restored, GPU never enabled) and the owner opt-outs
before any probe; the defaults, opt-out and siliconforest suites cover
the J514M defaults and owner choices. They fail on the previous commit.
The measurement harness marks the G15C firmware and identity stand-ins
unused, so it also builds under clang 23 (-Wunused-but-set-global).
Two host harnesses that are not in CI needed the same changes to keep
building: the T6034 chip constant in tests/t8122_display_host/soc.h and
the renamed G15C hooks in tests/t8122_full_start.c (omacom has the same
gap).

Based on earlier work by Chris Kearney: this ports his omacom/m1n1
86825137, 2456131e and 9bc2c623 (MIT). Includes Marcelo Alcantara's fixes from omacom/m1n1#32:
1b0a304c (an owner's J514M GPU line still measures under
chosen.asahi,m3-defaults=0) and 9cee8f42 (a quiet J516M in the T6034
host scenario). Not carried: 5863ad6b (aura already aligns the opt-out
harness heap its own way) and c6fef490 (aura's CI has no macos-14
runner).

Signed-off-by: Scott Jones <scottajones@gmail.com>
rolotrealanis98 pushed a commit to rolotrealanis98/aura that referenced this pull request Nov 30, 2026
The 14" M3 Max with the 30-core GPU (J514M) is a T6034, and aura hands
it nothing: no display handoff, no PMP values, no GPU measurement or
setup, no firmware UUIDs or facts. It runs on the boot framebuffer, and
no config line changes that because the code is not there.

Add a separate T6034 profile, scoped to the exact J514M board and kept
apart from T6031 in its own chosen namespace:

- display: a dcp_soc entry for T6034 with the measured J514M register
  layout, pinned DCP image F493F03E-... and 14.7 interface, armed by
  chosen.asahi,t6034-dcp; dt_set_display() runs the fail-soft handoff
  for it;
- PMP: asahi,t6034-pmp with the T6031 interrupt and DART layout;
- firmware UUIDs and facts: asahi,t6034-fw-uuids and asahi,t6034-facts;
- GPU: g15_soc_t6034 (G15C, four clusters), armed by
  chosen.asahi,t6034-gpu. dt_measure_gpu_t6034() reuses the bounded
  G15C powered-identity probe and its exact power restoration, then
  publishes asahi,t6034-gpu-powered-identity; the setup uses that
  identity and never enables the GPU or its mailbox. The T6031 G15C
  globals and stand-in marker are shared, renamed g15_g15c_*;
- defaults: dt_set_m3_defaults() supplies chosen.asahi,t6034-dcp=1 and
  chosen.asahi,t6034-gpu=1 on a J514M, each on its own as on the J516C.
  An owner's =0 keeps that one off, chosen.asahi,m3-defaults=0 keeps an
  owner's own =1, and after a lost config line kboot drops every T6034
  line and skips the GPU measurement entirely.

The J516M stays untouched here. A J514M needs a matching kernel and
Mesa: the kernel decides whether it takes the display and GPU over.

New tests/python/test_t6034_measurement.py covers the scoped
measurement (power restored, GPU never enabled) and the owner opt-outs
before any probe; the defaults, opt-out and siliconforest suites cover
the J514M defaults and owner choices. They fail on the previous commit.
The measurement harness marks the G15C firmware and identity stand-ins
unused, so it also builds under clang 23 (-Wunused-but-set-global).
Two host harnesses that are not in CI needed the same changes to keep
building: the T6034 chip constant in tests/t8122_display_host/soc.h and
the renamed G15C hooks in tests/t8122_full_start.c (omacom has the same
gap).

Based on earlier work by Chris Kearney: this ports his omacom/m1n1
86825137, 2456131e and 9bc2c623 (MIT). Includes Marcelo Alcantara's fixes from omacom/m1n1#32:
1b0a304c (an owner's J514M GPU line still measures under
chosen.asahi,m3-defaults=0) and 9cee8f42 (a quiet J516M in the T6034
host scenario). Not carried: 5863ad6b (aura already aligns the opt-out
harness heap its own way) and c6fef490 (aura's CI has no macos-14
runner).

Signed-off-by: Scott Jones <scottajones@gmail.com>

[Ryan: rebased on main f417b84 (the G15C firmware handoff hook)]
Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants